@oneplatformdev/ui 0.1.99-beta.7 → 0.1.99-beta.71
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/Accordion/Accordion.d.ts +1 -1
- package/Accordion/Accordion.d.ts.map +1 -1
- package/Accordion/Accordion.js +48 -26
- package/Accordion/Accordion.js.map +1 -1
- package/AlertDialog/AlertDialog.stories.js +3 -2
- package/AlertDialog/AlertDialog.stories.js.map +1 -1
- package/AlertDialog/AlertDialogRoot.d.ts.map +1 -1
- package/AlertDialog/AlertDialogRoot.js +26 -24
- package/AlertDialog/AlertDialogRoot.js.map +1 -1
- package/Badge/badgeVariants.d.ts +1 -1
- package/Button/Button.d.ts +7 -1
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.js +49 -51
- package/Button/Button.js.map +1 -1
- package/Button/Button.types.d.ts +12 -0
- package/Button/Button.types.d.ts.map +1 -1
- package/Button/Button.utils.d.ts +3 -0
- package/Button/Button.utils.d.ts.map +1 -0
- package/Button/Button.utils.js +14 -0
- package/Button/Button.utils.js.map +1 -0
- package/Button/ButtonCounterBadge.d.ts +7 -0
- package/Button/ButtonCounterBadge.d.ts.map +1 -0
- package/Button/ButtonCounterBadge.js +20 -0
- package/Button/ButtonCounterBadge.js.map +1 -0
- package/Button/buttonVariants.d.ts +11 -20
- package/Button/buttonVariants.d.ts.map +1 -1
- package/Button/buttonVariants.js +76 -12
- package/Button/buttonVariants.js.map +1 -1
- package/Button/index.d.ts +1 -0
- package/Button/index.d.ts.map +1 -1
- package/Button/index.js +6 -3
- package/Button/index.js.map +1 -1
- package/ButtonIcon/ButtonIcon.d.ts +6 -1
- package/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/ButtonIcon/ButtonIcon.js +69 -51
- package/ButtonIcon/ButtonIcon.js.map +1 -1
- package/ButtonIcon/ButtonIcon.stories.js +94 -65
- package/ButtonIcon/ButtonIcon.stories.js.map +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.js +7 -6
- package/ButtonIcon/buttonIconVariants.js.map +1 -1
- package/CHANGELOG.md +751 -0
- package/Calendar/Calendar.js +5 -4
- package/Calendar/Calendar.js.map +1 -1
- package/Combobox/Combobox.d.ts +1 -1
- package/Combobox/Combobox.d.ts.map +1 -1
- package/Combobox/Combobox.js +206 -191
- package/Combobox/Combobox.js.map +1 -1
- package/Combobox/Combobox.stories.js +208 -0
- package/Combobox/Combobox.stories.js.map +1 -0
- package/Combobox/Combobox.types.d.ts +34 -19
- package/Combobox/Combobox.types.d.ts.map +1 -1
- package/Combobox/ComboboxOptionItem.d.ts +2 -3
- package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
- package/Combobox/ComboboxOptionItem.js +44 -21
- package/Combobox/ComboboxOptionItem.js.map +1 -1
- package/Combobox/ComboboxOptions.d.ts +2 -2
- package/Combobox/ComboboxOptions.d.ts.map +1 -1
- package/Combobox/ComboboxOptions.js +49 -49
- package/Combobox/ComboboxOptions.js.map +1 -1
- package/Command/Command.d.ts.map +1 -1
- package/Command/Command.js +10 -7
- package/Command/Command.js.map +1 -1
- package/DataTable/DataTable.js +16 -15
- package/DataTable/DataTable.js.map +1 -1
- package/Dialog/Dialog.d.ts.map +1 -1
- package/Dialog/Dialog.js +35 -24
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/Dialog.types.d.ts +4 -0
- package/Dialog/Dialog.types.d.ts.map +1 -0
- package/Dialog/Dialog.types.js +2 -0
- package/Dialog/Dialog.types.js.map +1 -0
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.d.ts.map +1 -1
- package/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/DropdownMenu/DropdownMenu.js +33 -20
- package/DropdownMenu/DropdownMenu.js.map +1 -1
- package/Form/Form.d.ts.map +1 -1
- package/Form/Form.js.map +1 -1
- package/Form/FormRenderControl.d.ts +1 -1
- package/Form/FormRenderControl.d.ts.map +1 -1
- package/Form/FormRenderControl.js +54 -14
- package/Form/FormRenderControl.js.map +1 -1
- package/Form/FormRenderControl.types.d.ts +4 -1
- package/Form/FormRenderControl.types.d.ts.map +1 -1
- package/FormCombobox/FormCombobox.d.ts.map +1 -1
- package/FormCombobox/FormCombobox.js +15 -13
- package/FormCombobox/FormCombobox.js.map +1 -1
- package/FormDatePicker/FormDatePicker.d.ts.map +1 -1
- package/FormDatePicker/FormDatePicker.js +18 -16
- package/FormDatePicker/FormDatePicker.js.map +1 -1
- package/FormDropzone/FormDropzone.d.ts.map +1 -1
- package/FormDropzone/FormDropzone.js +11 -9
- package/FormDropzone/FormDropzone.js.map +1 -1
- package/FormInput/FormInput.d.ts.map +1 -1
- package/FormInput/FormInput.js +27 -25
- package/FormInput/FormInput.js.map +1 -1
- package/FormSelect/FormSelect.d.ts.map +1 -1
- package/FormSelect/FormSelect.js +21 -17
- package/FormSelect/FormSelect.js.map +1 -1
- package/FormTextarea/FormTextarea.d.ts.map +1 -1
- package/FormTextarea/FormTextarea.js +15 -13
- package/FormTextarea/FormTextarea.js.map +1 -1
- package/InfoBlock/InfoBlock.d.ts +7 -0
- package/InfoBlock/InfoBlock.d.ts.map +1 -0
- package/InfoBlock/InfoBlock.js +27 -0
- package/InfoBlock/InfoBlock.js.map +1 -0
- package/InfoBlock/InfoBlock.stories.js +14 -0
- package/InfoBlock/InfoBlock.stories.js.map +1 -0
- package/InfoBlock/InfoBlock.types.d.ts +8 -0
- package/InfoBlock/InfoBlock.types.d.ts.map +1 -0
- package/InfoBlock/InfoBlock.types.js +2 -0
- package/InfoBlock/InfoBlock.types.js.map +1 -0
- package/InfoBlock/index.d.ts +3 -0
- package/InfoBlock/index.d.ts.map +1 -0
- package/InfoBlock/index.js +5 -0
- package/InfoBlock/index.js.map +1 -0
- package/InfoBlock/infoBlockVariants.d.ts +6 -0
- package/InfoBlock/infoBlockVariants.d.ts.map +1 -0
- package/InfoBlock/infoBlockVariants.js +26 -0
- package/InfoBlock/infoBlockVariants.js.map +1 -0
- package/Input/Input.js +1 -1
- package/Input/Input.js.map +1 -1
- package/Input/inputVariants.d.ts.map +1 -1
- package/Input/inputVariants.js +5 -4
- package/Input/inputVariants.js.map +1 -1
- package/LoadedIcon/LoadedIcon.d.ts.map +1 -1
- package/LoadedIcon/LoadedIcon.js +3 -1
- package/LoadedIcon/LoadedIcon.js.map +1 -1
- package/LoadingMask/LoadingMask.d.ts +1 -2
- package/LoadingMask/LoadingMask.d.ts.map +1 -1
- package/LoadingMask/LoadingMask.js +8 -8
- package/LoadingMask/LoadingMask.js.map +1 -1
- package/LoadingMask/LoadingMask.types.d.ts +1 -0
- package/LoadingMask/LoadingMask.types.d.ts.map +1 -1
- package/Resizable/Resizable.d.ts +5 -20
- package/Resizable/Resizable.d.ts.map +1 -1
- package/Resizable/Resizable.js +48 -31
- package/Resizable/Resizable.js.map +1 -1
- package/Resizable/Resizable.stories.js +140 -0
- package/Resizable/Resizable.stories.js.map +1 -0
- package/Search/Search.d.ts.map +1 -1
- package/Search/Search.js +41 -32
- package/Search/Search.js.map +1 -1
- package/Search/Search.stories.js +17 -0
- package/Search/Search.stories.js.map +1 -0
- package/TablePagination/TablePagination.js +9 -8
- package/TablePagination/TablePagination.js.map +1 -1
- package/Textarea/Textarea.d.ts.map +1 -1
- package/Textarea/Textarea.js +48 -43
- package/Textarea/Textarea.js.map +1 -1
- package/Textarea/Textarea.stories.js +1 -1
- package/Textarea/Textarea.stories.js.map +1 -1
- package/Textarea/Textarea.types.d.ts +3 -1
- package/Textarea/Textarea.types.d.ts.map +1 -1
- package/Tooltip/Tooltip.d.ts.map +1 -1
- package/Tooltip/Tooltip.js +41 -29
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tooltip/Tooltip.types.d.ts +1 -0
- package/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/Tooltip/tooltipVariants.d.ts +4 -0
- package/Tooltip/tooltipVariants.d.ts.map +1 -0
- package/Tooltip/tooltipVariants.js +23 -0
- package/Tooltip/tooltipVariants.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +335 -330
- package/index.js.map +1 -1
- package/package.json +4 -4
package/FormSelect/FormSelect.js
CHANGED
|
@@ -1,47 +1,51 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { FormControl as
|
|
3
|
-
import { FormRenderControl as
|
|
2
|
+
import { FormControl as u } from "../Form/Form.js";
|
|
3
|
+
import { FormRenderControl as x } from "../Form/FormRenderControl.js";
|
|
4
4
|
import "@radix-ui/react-select";
|
|
5
5
|
import "lucide-react";
|
|
6
6
|
import "@oneplatformdev/utils";
|
|
7
|
-
import { Select as
|
|
8
|
-
const
|
|
7
|
+
import { Select as F } from "../Select/Select.js";
|
|
8
|
+
const V = (m) => {
|
|
9
9
|
const {
|
|
10
10
|
value: i = void 0,
|
|
11
11
|
form: p,
|
|
12
12
|
label: a,
|
|
13
|
-
|
|
13
|
+
tooltip: l,
|
|
14
|
+
tooltipProps: g,
|
|
15
|
+
name: s,
|
|
14
16
|
options: c = [],
|
|
15
|
-
onChange:
|
|
16
|
-
containerProps:
|
|
17
|
-
renderTrigger:
|
|
17
|
+
onChange: h,
|
|
18
|
+
containerProps: C,
|
|
19
|
+
renderTrigger: d,
|
|
18
20
|
onChangePrepare: n,
|
|
19
|
-
...
|
|
21
|
+
...f
|
|
20
22
|
} = m;
|
|
21
23
|
return /* @__PURE__ */ e(
|
|
22
|
-
|
|
24
|
+
x,
|
|
23
25
|
{
|
|
24
26
|
form: p,
|
|
25
|
-
name:
|
|
27
|
+
name: s,
|
|
28
|
+
tooltip: l,
|
|
29
|
+
tooltipProps: g,
|
|
26
30
|
label: a,
|
|
27
|
-
containerProps:
|
|
31
|
+
containerProps: C,
|
|
28
32
|
render: ({ field: t }) => /* @__PURE__ */ e(
|
|
29
|
-
|
|
33
|
+
F,
|
|
30
34
|
{
|
|
31
35
|
value: t.value ?? (i || ""),
|
|
32
36
|
options: c,
|
|
33
37
|
onChange: (r) => {
|
|
34
38
|
const o = n ? n(r) : r;
|
|
35
|
-
t.onChange(o),
|
|
39
|
+
t.onChange(o), h?.(r, o);
|
|
36
40
|
},
|
|
37
|
-
renderTrigger: (r, o) => /* @__PURE__ */ e(
|
|
38
|
-
...
|
|
41
|
+
renderTrigger: (r, o) => /* @__PURE__ */ e(u, { children: d?.(r, o) || o }),
|
|
42
|
+
...f
|
|
39
43
|
}
|
|
40
44
|
)
|
|
41
45
|
}
|
|
42
46
|
);
|
|
43
47
|
};
|
|
44
48
|
export {
|
|
45
|
-
|
|
49
|
+
V as FormSelect
|
|
46
50
|
};
|
|
47
51
|
//# sourceMappingURL=FormSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSelect.js","sources":["../../src/FormSelect/FormSelect.tsx"],"sourcesContent":["import { FormControl, FormRenderControl } from '../Form';\nimport { Select } from '../Select';\nimport { FormSelectProps } from './FormSelect.types';\nimport { FieldValues } from 'react-hook-form';\n\n// TODO: add description\nexport const FormSelect = <Data extends FieldValues, ExtendOptionData>(\n props: FormSelectProps<Data, ExtendOptionData>\n) => {\n const {\n value = undefined,\n form,\n label,\n name,\n options = [],\n onChange,\n containerProps,\n renderTrigger,\n onChangePrepare,\n ...rest\n } = props;\n\n return (\n <FormRenderControl\n form={form}\n name={name}\n label={label}\n containerProps={containerProps}\n render={({ field }) => (\n <Select<ExtendOptionData>\n value={field.value ?? (value || '')}\n options={options}\n onChange={(value) => {\n const nextValue = onChangePrepare ? onChangePrepare(value) : value;\n field.onChange(nextValue);\n onChange?.(value, nextValue);\n }}\n renderTrigger={(p, defaultComponent) => {\n return (\n <FormControl>\n {renderTrigger?.(p, defaultComponent) || defaultComponent}\n </FormControl>\n )\n }}\n {...rest}\n />\n )}\n />\n );\n};\n"],"names":["FormSelect","props","value","form","label","name","options","onChange","containerProps","renderTrigger","onChangePrepare","rest","jsx","FormRenderControl","field","Select","nextValue","p","defaultComponent","FormControl"],"mappings":";;;;;;;AAMO,MAAMA,IAAa,CACxBC,MACG;AACH,QAAM;AAAA,IACJ,OAAAC,IAAQ;AAAA,IACR,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC,IAAU,CAAA;AAAA,IACV,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"FormSelect.js","sources":["../../src/FormSelect/FormSelect.tsx"],"sourcesContent":["import { FormControl, FormRenderControl } from '../Form';\nimport { Select } from '../Select';\nimport { FormSelectProps } from './FormSelect.types';\nimport { FieldValues } from 'react-hook-form';\n\n// TODO: add description\nexport const FormSelect = <Data extends FieldValues, ExtendOptionData>(\n props: FormSelectProps<Data, ExtendOptionData>\n) => {\n const {\n value = undefined,\n form,\n label,\n tooltip,\n tooltipProps,\n name,\n options = [],\n onChange,\n containerProps,\n renderTrigger,\n onChangePrepare,\n ...rest\n } = props;\n\n return (\n <FormRenderControl\n form={form}\n name={name}\n tooltip={tooltip}\n tooltipProps={tooltipProps}\n label={label}\n containerProps={containerProps}\n render={({ field }) => (\n <Select<ExtendOptionData>\n value={field.value ?? (value || '')}\n options={options}\n onChange={(value) => {\n const nextValue = onChangePrepare ? onChangePrepare(value) : value;\n field.onChange(nextValue);\n onChange?.(value, nextValue);\n }}\n renderTrigger={(p, defaultComponent) => {\n return (\n <FormControl>\n {renderTrigger?.(p, defaultComponent) || defaultComponent}\n </FormControl>\n )\n }}\n {...rest}\n />\n )}\n />\n );\n};\n"],"names":["FormSelect","props","value","form","label","tooltip","tooltipProps","name","options","onChange","containerProps","renderTrigger","onChangePrepare","rest","jsx","FormRenderControl","field","Select","nextValue","p","defaultComponent","FormControl"],"mappings":";;;;;;;AAMO,MAAMA,IAAa,CACxBC,MACG;AACH,QAAM;AAAA,IACJ,OAAAC,IAAQ;AAAA,IACR,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC,IAAU,CAAA;AAAA,IACV,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDZ;AAEJ,SACE,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAZ;AAAA,MACA,MAAAI;AAAA,MACA,SAAAF;AAAA,MACA,cAAAC;AAAA,MACA,OAAAF;AAAA,MACA,gBAAAM;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAM,EAAA,MACT,gBAAAF;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,OAAOD,EAAM,UAAUd,KAAS;AAAA,UAChC,SAAAM;AAAA,UACA,UAAU,CAACN,MAAU;AACnB,kBAAMgB,IAAYN,IAAkBA,EAAgBV,CAAK,IAAIA;AAC7D,YAAAc,EAAM,SAASE,CAAS,GACxBT,IAAWP,GAAOgB,CAAS;AAAA,UAC7B;AAAA,UACA,eAAe,CAACC,GAAGC,wBAEdC,GAAA,EACE,UAAAV,IAAgBQ,GAAGC,CAAgB,KAAKA,GAC3C;AAAA,UAGH,GAAGP;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAIR;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormTextarea.d.ts","sourceRoot":"","sources":["../../src/FormTextarea/FormTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,WAAW,EACnD,OAAO,iBAAiB,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"FormTextarea.d.ts","sourceRoot":"","sources":["../../src/FormTextarea/FormTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,WAAW,EACnD,OAAO,iBAAiB,CAAC,IAAI,CAAC,4CAsB/B,CAAC"}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { FormControl as
|
|
3
|
-
import { FormRenderControl as
|
|
4
|
-
import { Textarea as
|
|
5
|
-
const
|
|
6
|
-
const { form:
|
|
2
|
+
import { FormControl as s } from "../Form/Form.js";
|
|
3
|
+
import { FormRenderControl as c } from "../Form/FormRenderControl.js";
|
|
4
|
+
import { Textarea as f } from "../Textarea/Textarea.js";
|
|
5
|
+
const v = (t) => {
|
|
6
|
+
const { form: e, label: m, tooltip: n, tooltipProps: a, name: p, containerProps: l, ...i } = t;
|
|
7
7
|
return /* @__PURE__ */ r(
|
|
8
|
-
|
|
8
|
+
c,
|
|
9
9
|
{
|
|
10
|
-
form:
|
|
11
|
-
|
|
10
|
+
form: e,
|
|
11
|
+
tooltip: n,
|
|
12
|
+
tooltipProps: a,
|
|
13
|
+
name: p,
|
|
12
14
|
label: m,
|
|
13
|
-
containerProps:
|
|
14
|
-
render: ({ field: o }) => /* @__PURE__ */ r(
|
|
15
|
-
|
|
15
|
+
containerProps: l,
|
|
16
|
+
render: ({ field: o }) => /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(
|
|
17
|
+
f,
|
|
16
18
|
{
|
|
17
19
|
...o,
|
|
18
20
|
value: o.value || "",
|
|
19
|
-
...
|
|
21
|
+
...i
|
|
20
22
|
}
|
|
21
23
|
) })
|
|
22
24
|
}
|
|
23
25
|
);
|
|
24
26
|
};
|
|
25
27
|
export {
|
|
26
|
-
|
|
28
|
+
v as FormTextarea
|
|
27
29
|
};
|
|
28
30
|
//# sourceMappingURL=FormTextarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormTextarea.js","sources":["../../src/FormTextarea/FormTextarea.tsx"],"sourcesContent":["import { FormControl, FormRenderControl } from '../Form';\nimport { FormTextareaProps } from './FormTextarea.types';\nimport { FieldValues } from 'react-hook-form';\nimport { Textarea } from '../Textarea';\n\n// TODO: add description\nexport const FormTextarea = <Data extends FieldValues>(\n props: FormTextareaProps<Data>\n) => {\nconst { form, label, name, containerProps, ...rest } = props;\n return (\n <FormRenderControl\n form={form}\n name={name}\n label={label}\n containerProps={containerProps}\n render={({ field }) => (\n <FormControl>\n <Textarea\n {...field}\n value={field.value || ''}\n {...rest}\n />\n </FormControl>\n )}\n />\n )\n};\n"],"names":["FormTextarea","props","form","label","name","containerProps","rest","jsx","FormRenderControl","field","FormControl","Textarea"],"mappings":";;;;AAMO,MAAMA,IAAe,CAC1BC,MACG;AACL,QAAM,EAAE,MAAAC,GAAM,OAAAC,GAAO,MAAAC,GAAM,gBAAAC,GAAgB,GAAGC,
|
|
1
|
+
{"version":3,"file":"FormTextarea.js","sources":["../../src/FormTextarea/FormTextarea.tsx"],"sourcesContent":["import { FormControl, FormRenderControl } from '../Form';\nimport { FormTextareaProps } from './FormTextarea.types';\nimport { FieldValues } from 'react-hook-form';\nimport { Textarea } from '../Textarea';\n\n// TODO: add description\nexport const FormTextarea = <Data extends FieldValues>(\n props: FormTextareaProps<Data>\n) => {\nconst { form, label, tooltip, tooltipProps, name, containerProps, ...rest } = props;\n return (\n <FormRenderControl\n form={form}\n tooltip={tooltip}\n tooltipProps={tooltipProps}\n name={name}\n label={label}\n containerProps={containerProps}\n render={({ field }) => (\n <FormControl>\n <Textarea\n {...field}\n value={field.value || ''}\n {...rest}\n />\n </FormControl>\n )}\n />\n )\n};\n"],"names":["FormTextarea","props","form","label","tooltip","tooltipProps","name","containerProps","rest","jsx","FormRenderControl","field","FormControl","Textarea"],"mappings":";;;;AAMO,MAAMA,IAAe,CAC1BC,MACG;AACL,QAAM,EAAE,MAAAC,GAAM,OAAAC,GAAO,SAAAC,GAAS,cAAAC,GAAc,MAAAC,GAAM,gBAAAC,GAAgB,GAAGC,EAAA,IAASP;AAC1E,SACI,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,MAAAR;AAAA,MACA,SAAAE;AAAA,MACA,cAAAC;AAAA,MACA,MAAAC;AAAA,MACA,OAAAH;AAAA,MACA,gBAAAI;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAI,EAAA,wBACRC,GAAA,EACC,UAAA,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACE,GAAGF;AAAA,UACJ,OAAOA,EAAM,SAAS;AAAA,UACrB,GAAGH;AAAA,QAAA;AAAA,MAAA,EACN,CACF;AAAA,IAAA;AAAA,EAAA;AAId;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBtE,eAAO,MAAM,SAAS;YAAW,cAAc;;CAiB9C,CAAA;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m } from "@oneplatformdev/utils";
|
|
3
|
+
import { infoBlockVariants as p } from "./infoBlockVariants.js";
|
|
4
|
+
import { isValidElement as f, createElement as d } from "react";
|
|
5
|
+
import { TriangleAlertIcon as h } from "lucide-react";
|
|
6
|
+
const u = (r) => r ? f(r) ? r : d(r) : null, w = {
|
|
7
|
+
error: /* @__PURE__ */ e(h, { className: "fill-[#DC2626] text-white!" })
|
|
8
|
+
}, N = (r) => {
|
|
9
|
+
const { className: t, variant: n = "error", content: a, icon: i, children: o, ...l } = r;
|
|
10
|
+
return /* @__PURE__ */ e(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
...l,
|
|
14
|
+
className: m(p({ className: t, variant: n })),
|
|
15
|
+
children: o ?? /* @__PURE__ */ s(c, { children: [
|
|
16
|
+
u(i ?? w[n]),
|
|
17
|
+
/* @__PURE__ */ e("span", { className: "whitespace-pre-wrap wrap-break-word line-clamp-10", children: a })
|
|
18
|
+
] })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
N.displayName = "InfoBlock";
|
|
23
|
+
export {
|
|
24
|
+
N as InfoBlock,
|
|
25
|
+
N as default
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=InfoBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.js","sources":["../../src/InfoBlock/InfoBlock.tsx"],"sourcesContent":["import { InfoBlockIconType, InfoBlockProps } from \"./InfoBlock.types\";\nimport { cn } from \"@oneplatformdev/utils\";\nimport { infoBlockVariants } from \"./infoBlockVariants\";\nimport { createElement, isValidElement } from \"react\";\nimport { TriangleAlertIcon } from \"lucide-react\";\n\nconst renderInnerIcon = (Icon?: InfoBlockIconType) => {\n if (!Icon) return null;\n if (isValidElement(Icon)) return Icon;\n return createElement(Icon);\n};\n\nconst iconByVariant: Record<NonNullable<InfoBlockProps['variant']>, InfoBlockIconType> = {\n error: <TriangleAlertIcon className='fill-[#DC2626] text-white!'/>\n}\n\nexport const InfoBlock = (props: InfoBlockProps) => {\n const { className, variant = 'error', content, icon, children, ...rest } = props;\n return (\n <div\n {...rest}\n className={cn(infoBlockVariants({ className, variant }))}\n >\n {children ?? (\n <>\n {renderInnerIcon(icon ?? iconByVariant[variant!])}\n <span className='whitespace-pre-wrap wrap-break-word line-clamp-10'>\n {content}\n </span>\n </>\n )}\n </div>\n )\n}\nInfoBlock.displayName = 'InfoBlock';\nexport default InfoBlock;\n\n"],"names":["renderInnerIcon","Icon","isValidElement","createElement","iconByVariant","jsx","TriangleAlertIcon","InfoBlock","props","className","variant","content","icon","children","rest","cn","infoBlockVariants","jsxs","Fragment"],"mappings":";;;;;AAMA,MAAMA,IAAkB,CAACC,MAClBA,IACDC,EAAeD,CAAI,IAAUA,IAC1BE,EAAcF,CAAI,IAFP,MAKdG,IAAmF;AAAA,EACvF,OAAO,gBAAAC,EAACC,GAAA,EAAkB,WAAU,6BAAA,CAA4B;AAClE,GAEaC,IAAY,CAACC,MAA0B;AAClD,QAAM,EAAE,WAAAC,GAAW,SAAAC,IAAU,SAAS,SAAAC,GAAS,MAAAC,GAAM,UAAAC,GAAU,GAAGC,EAAA,IAASN;AAC3E,SACE,gBAAAH;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGS;AAAA,MACJ,WAAWC,EAAGC,EAAkB,EAAE,WAAAP,GAAW,SAAAC,EAAA,CAAS,CAAC;AAAA,MAEtD,eACC,gBAAAO,EAAAC,GAAA,EACG,UAAA;AAAA,QAAAlB,EAAgBY,KAAQR,EAAcM,CAAQ,CAAC;AAAA,QAChD,gBAAAL,EAAC,QAAA,EAAK,WAAU,qDACb,UAAAM,EAAA,CACH;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAIR;AACAJ,EAAU,cAAc;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InfoBlock as o } from "./InfoBlock.js";
|
|
2
|
+
const n = {
|
|
3
|
+
title: "UI/InfoBlock",
|
|
4
|
+
component: o
|
|
5
|
+
}, e = {
|
|
6
|
+
args: {
|
|
7
|
+
content: "Увага! Перш ніж архівувати підрозділ “Підрозділ дизану”, переведіть співробітників до іншого - інакше вони будуть автоматично звільнені. Підрозділ буде преміщено до розділу “Архів”."
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
e as Default,
|
|
12
|
+
n as default
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=InfoBlock.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.stories.js","sources":["../../src/InfoBlock/InfoBlock.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react-vite';\n\nimport { InfoBlock } from './InfoBlock';\n\nconst meta = {\n title: 'UI/InfoBlock',\n component: InfoBlock,\n} satisfies Meta<typeof InfoBlock>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {\n args: {\n content: 'Увага! Перш ніж архівувати підрозділ “Підрозділ дизану”, переведіть співробітників до іншого - інакше вони будуть автоматично звільнені. Підрозділ буде преміщено до розділу “Архів”.'\n }\n};\n"],"names":["meta","InfoBlock","Default"],"mappings":";AAIA,MAAMA,IAAO;AAAA,EACX,OAAO;AAAA,EACP,WAAWC;AACb,GAMaC,IAAiB;AAAA,EAC5B,MAAM;AAAA,IACJ,SAAS;AAAA,EAAA;AAEb;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InfoBlockVariantsProps } from './infoBlockVariants';
|
|
2
|
+
import { ComponentType, HTMLAttributes, PropsWithChildren, ReactElement, ReactNode, SVGProps } from 'react';
|
|
3
|
+
export type InfoBlockIconType = ComponentType<SVGProps<SVGSVGElement>> | ReactElement<SVGProps<SVGSVGElement>>;
|
|
4
|
+
export interface InfoBlockProps extends PropsWithChildren, InfoBlockVariantsProps, Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
|
|
5
|
+
content?: ReactNode;
|
|
6
|
+
icon?: InfoBlockIconType;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=InfoBlock.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.types.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,iBAAiB,GACzB,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GACtC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE1C,MAAM,WAAW,cACf,SAAQ,iBAAiB,EACvB,sBAAsB,EACtB,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,mBAAmB,mBAAmB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const infoBlockVariants: (props?: ({
|
|
3
|
+
variant?: "error" | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export type InfoBlockVariantsProps = VariantProps<typeof infoBlockVariants>;
|
|
6
|
+
//# sourceMappingURL=infoBlockVariants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoBlockVariants.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/infoBlockVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,iBAAiB;;8EAoB7B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cva as r } from "class-variance-authority";
|
|
2
|
+
const a = r(
|
|
3
|
+
[
|
|
4
|
+
"flex items-start gap-2",
|
|
5
|
+
"p-2.5 rounded-lg",
|
|
6
|
+
"font-medium text-base leading-normal text-[#06080D]",
|
|
7
|
+
"whitespace-pre-wrap break-words",
|
|
8
|
+
"[&>p]:m-0 [&>p]:p-0",
|
|
9
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-5",
|
|
10
|
+
"transition-transform duration-200 [&_svg]:transition-transform [&_svg]:duration-200"
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
error: "bg-[#DC26260F] [&>svg]:text-[#DC2626]"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: "error"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
a as infoBlockVariants
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=infoBlockVariants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoBlockVariants.js","sources":["../../src/InfoBlock/infoBlockVariants.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const infoBlockVariants = cva(\n [\n 'flex items-start gap-2',\n 'p-2.5 rounded-lg',\n 'font-medium text-base leading-normal text-[#06080D]',\n 'whitespace-pre-wrap break-words',\n '[&>p]:m-0 [&>p]:p-0',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-5\",\n 'transition-transform duration-200 [&_svg]:transition-transform [&_svg]:duration-200',\n ],\n {\n variants: {\n variant: {\n error: 'bg-[#DC26260F] [&>svg]:text-[#DC2626]',\n },\n },\n defaultVariants: {\n variant: 'error',\n },\n }\n)\n\nexport type InfoBlockVariantsProps = VariantProps<typeof infoBlockVariants>;\n"],"names":["infoBlockVariants","cva"],"mappings":";AAEO,MAAMA,IAAoBC;AAAA,EAC/B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;"}
|
package/Input/Input.js
CHANGED
package/Input/Input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../src/Input/Input.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Eye, EyeOff } from 'lucide-react';\nimport { inputVariants } from './inputVariants';\n\nimport { cn } from '@oneplatformdev/utils';\nimport { InputProps } from './Input.types';\n\nexport const BaseInput = React.forwardRef<HTMLInputElement, InputProps>(\n (props, ref) => {\n const {\n className,\n variant,\n type,\n slotProps: { input, wrapper } = {},\n onChange,\n onTransform,\n fullSize = false,\n ...rest\n } = props;\n const {\n startAdornment,\n className: classNameInputSlotProps,\n ...restInputSlotProps\n } = input || {};\n return (\n <div\n {...(wrapper || {})}\n className={cn(\n 'relative',\n fullSize && 'w-full',\n wrapper?.className\n )}>\n {Boolean(startAdornment) && (\n <span className=\"absolute left-[10px] top-1/2 -translate-y-1/2\">\n {startAdornment}\n </span>\n )}\n <input\n type={type}\n className={cn(\n inputVariants({ variant, className }),\n Boolean(startAdornment) && 'pl-
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../src/Input/Input.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Eye, EyeOff } from 'lucide-react';\nimport { inputVariants } from './inputVariants';\n\nimport { cn } from '@oneplatformdev/utils';\nimport { InputProps } from './Input.types';\n\nexport const BaseInput = React.forwardRef<HTMLInputElement, InputProps>(\n (props, ref) => {\n const {\n className,\n variant,\n type,\n slotProps: { input, wrapper } = {},\n onChange,\n onTransform,\n fullSize = false,\n ...rest\n } = props;\n const {\n startAdornment,\n className: classNameInputSlotProps,\n ...restInputSlotProps\n } = input || {};\n return (\n <div\n {...(wrapper || {})}\n className={cn(\n 'relative',\n fullSize && 'w-full',\n wrapper?.className\n )}>\n {Boolean(startAdornment) && (\n <span className=\"absolute left-[10px] top-1/2 -translate-y-1/2\">\n {startAdornment}\n </span>\n )}\n <input\n type={type}\n className={cn(\n inputVariants({ variant, className }),\n Boolean(startAdornment) && 'pl-10',\n classNameInputSlotProps,\n fullSize && 'min-w-auto',\n )}\n ref={ref}\n {...restInputSlotProps}\n {...rest}\n onChange={(e) => {\n if (typeof onTransform?.(e.target.value, e) === 'string') {\n e.target.value = onTransform(e.target.value, e);\n }\n if (onChange) onChange(e);\n }}\n />\n </div>\n );\n }\n);\nBaseInput.displayName = 'Input';\n\nexport const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n (props, ref) => {\n const [isVisible, setIsVisible] = useState<boolean>(false);\n\n const inputType = isVisible ? 'text' : 'password';\n\n const toggleVisibility = () => {\n setIsVisible(!isVisible);\n };\n\n return (\n <div {...(props?.slotProps?.wrapper || {})} className={cn('relative', props?.slotProps?.wrapper?.className)}>\n <BaseInput {...props} type={inputType} className=\"pr-8\" ref={ref} />\n <VisibilityButton isVisible={isVisible} onClick={toggleVisibility} />\n </div>\n );\n }\n);\nPasswordInput.displayName = 'PasswordInput';\n\ntype VisibilityButtonProps = {\n isVisible: boolean\n onClick: () => void\n}\n\nconst VisibilityButton = ({ isVisible, onClick }:VisibilityButtonProps) => (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"absolute top-1/2 right-3 transform -translate-y-1/2\"\n >\n {isVisible ? <Eye size={16} /> : <EyeOff size={16} />}\n </button>\n);\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ type, ...props }, ref) => {\n if (type === 'password') return <PasswordInput type={type} {...props} ref={ref} />;\n return <BaseInput type={type} {...props} ref={ref} />;\n }\n);\nInput.displayName = 'Input';\n"],"names":["BaseInput","React","props","ref","className","variant","type","input","wrapper","onChange","onTransform","fullSize","rest","startAdornment","classNameInputSlotProps","restInputSlotProps","jsxs","cn","jsx","inputVariants","e","PasswordInput","isVisible","setIsVisible","useState","inputType","toggleVisibility","VisibilityButton","onClick","Eye","EyeOff","Input"],"mappings":";;;;;AAOO,MAAMA,IAAYC,EAAM;AAAA,EAC7B,CAACC,GAAOC,MAAQ;AACd,UAAM;AAAA,MACJ,WAAAC;AAAA,MACA,SAAAC;AAAA,MACA,MAAAC;AAAA,MACA,WAAW,EAAE,OAAAC,GAAO,SAAAC,EAAA,IAAY,CAAA;AAAA,MAChC,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,UAAAC,IAAW;AAAA,MACX,GAAGC;AAAA,IAAA,IACDV,GACE;AAAA,MACJ,gBAAAW;AAAA,MACA,WAAWC;AAAA,MACX,GAAGC;AAAA,IAAA,IACDR,KAAS,CAAA;AACb,WACE,gBAAAS;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAIR,KAAW,CAAA;AAAA,QAChB,WAAWS;AAAA,UACT;AAAA,UACAN,KAAY;AAAA,UACZH,GAAS;AAAA,QAAA;AAAA,QAEV,UAAA;AAAA,UAAA,EAAQK,KACP,gBAAAK,EAAC,QAAA,EAAK,WAAU,iDACb,UAAAL,GACH;AAAA,UAEF,gBAAAK;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAAZ;AAAA,cACA,WAAWW;AAAA,gBACTE,EAAc,EAAE,SAAAd,GAAS,WAAAD,GAAW;AAAA,gBACpC,EAAQS,KAAmB;AAAA,gBAC3BC;AAAA,gBACAH,KAAY;AAAA,cAAA;AAAA,cAEd,KAAAR;AAAA,cACC,GAAGY;AAAA,cACH,GAAGH;AAAA,cACJ,UAAU,CAACQ,MAAM;AACf,gBAAI,OAAOV,IAAcU,EAAE,OAAO,OAAOA,CAAC,KAAM,aAC9CA,EAAE,OAAO,QAAQV,EAAYU,EAAE,OAAO,OAAOA,CAAC,IAE5CX,OAAmBW,CAAC;AAAA,cAC1B;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACApB,EAAU,cAAc;AAEjB,MAAMqB,IAAgBpB,EAAM;AAAA,EACjC,CAACC,GAAOC,MAAQ;AACd,UAAM,CAACmB,GAAWC,CAAY,IAAIC,EAAkB,EAAK,GAEnDC,IAAYH,IAAY,SAAS,YAEjCI,IAAmB,MAAM;AAC7B,MAAAH,EAAa,CAACD,CAAS;AAAA,IACzB;AAEA,WACE,gBAAAN,EAAC,OAAA,EAAK,GAAId,GAAO,WAAW,WAAW,CAAA,GAAK,WAAWe,EAAG,YAAYf,GAAO,WAAW,SAAS,SAAS,GACxG,UAAA;AAAA,MAAA,gBAAAgB,EAAClB,KAAW,GAAGE,GAAO,MAAMuB,GAAW,WAAU,QAAO,KAAAtB,GAAU;AAAA,MAClE,gBAAAe,EAACS,GAAA,EAAiB,WAAAL,GAAsB,SAASI,EAAA,CAAkB;AAAA,IAAA,GACrE;AAAA,EAEJ;AACF;AACAL,EAAc,cAAc;AAO5B,MAAMM,IAAmB,CAAC,EAAE,WAAAL,GAAW,SAAAM,QACrC,gBAAAV;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,SAAAU;AAAA,IACA,WAAU;AAAA,IAET,UAAAN,sBAAaO,GAAA,EAAI,MAAM,IAAI,IAAK,gBAAAX,EAACY,GAAA,EAAO,MAAM,GAAA,CAAI;AAAA,EAAA;AACrD,GAGWC,IAAQ9B,EAAM;AAAA,EACzB,CAAC,EAAE,MAAAK,GAAM,GAAGJ,EAAA,GAASC,MACfG,MAAS,aAAmB,gBAAAY,EAACG,KAAc,MAAAf,GAAa,GAAGJ,GAAO,KAAAC,GAAU,IACzE,gBAAAe,EAAClB,GAAA,EAAU,MAAAM,GAAa,GAAGJ,GAAO,KAAAC,GAAU;AAEvD;AACA4B,EAAM,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputVariants.d.ts","sourceRoot":"","sources":["../../src/Input/inputVariants.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;
|
|
1
|
+
{"version":3,"file":"inputVariants.d.ts","sourceRoot":"","sources":["../../src/Input/inputVariants.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;8EAoBzB,CAAC"}
|
package/Input/inputVariants.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { cva as
|
|
2
|
-
const t =
|
|
1
|
+
import { cva as r } from "class-variance-authority";
|
|
2
|
+
const t = r(
|
|
3
3
|
[
|
|
4
|
-
"flex h-10 w-full rounded-
|
|
4
|
+
"flex h-10 w-full rounded-lg border border-input px-3 py-2",
|
|
5
5
|
"text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground",
|
|
6
6
|
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
7
7
|
"group-data-[state=invalid]/form-control:border-destructive",
|
|
8
|
-
"group-data-[state=valid]/form-control:border-input"
|
|
8
|
+
"group-data-[state=valid]/form-control:border-input",
|
|
9
|
+
"box-border"
|
|
9
10
|
],
|
|
10
11
|
{
|
|
11
12
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputVariants.js","sources":["../../src/Input/inputVariants.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const inputVariants = cva(\n [\n 'flex h-10 w-full rounded-
|
|
1
|
+
{"version":3,"file":"inputVariants.js","sources":["../../src/Input/inputVariants.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const inputVariants = cva(\n [\n 'flex h-10 w-full rounded-lg border border-input px-3 py-2',\n 'text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground',\n 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n 'group-data-[state=invalid]/form-control:border-destructive',\n 'group-data-[state=valid]/form-control:border-input',\n 'box-border',\n ],\n {\n variants: {\n variant: {\n default: 'bg-background',\n grey: 'bg-slate-200',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n"],"names":["inputVariants","cva"],"mappings":";AAEO,MAAMA,IAAgBC;AAAA,EAC3B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadedIcon.d.ts","sourceRoot":"","sources":["../../src/LoadedIcon/LoadedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI9D,QAAA,MAAM,kBAAkB;;
|
|
1
|
+
{"version":3,"file":"LoadedIcon.d.ts","sourceRoot":"","sources":["../../src/LoadedIcon/LoadedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI9D,QAAA,MAAM,kBAAkB;;8EAatB,CAAC;AAEH,UAAU,gBACR,SAAQ,cAAc,CAAC,cAAc,CAAC,EACpC,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAY9D,CAAC"}
|
package/LoadedIcon/LoadedIcon.js
CHANGED
|
@@ -2,7 +2,9 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { cva as t } from "class-variance-authority";
|
|
3
3
|
import { LoaderCircleIcon as m } from "lucide-react";
|
|
4
4
|
import { cn as c } from "@oneplatformdev/utils";
|
|
5
|
-
const d = t([
|
|
5
|
+
const d = t([
|
|
6
|
+
"relative"
|
|
7
|
+
], {
|
|
6
8
|
variants: {
|
|
7
9
|
size: {
|
|
8
10
|
inherit: "[&_svg]:size-inherit",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadedIcon.js","sources":["../../src/LoadedIcon/LoadedIcon.tsx"],"sourcesContent":["import { cva, VariantProps } from 'class-variance-authority';\nimport { LoaderCircleIcon } from 'lucide-react';\nimport { FC, HTMLAttributes, PropsWithChildren } from 'react';\n\nimport { cn } from '@oneplatformdev/utils';\n\nconst loadedIconVariants = cva([], {\n variants: {\n size: {\n inherit: '[&_svg]:size-inherit',\n xs: '[&_svg]:size-3',\n sm: '[&_svg]:size-4',\n md: '[&_svg]:size-5',\n lg: '[&_svg]:size-6',\n },\n },\n defaultVariants: { size: 'inherit' },\n});\n\ninterface ILoadedIconProps\n
|
|
1
|
+
{"version":3,"file":"LoadedIcon.js","sources":["../../src/LoadedIcon/LoadedIcon.tsx"],"sourcesContent":["import { cva, VariantProps } from 'class-variance-authority';\nimport { LoaderCircleIcon } from 'lucide-react';\nimport { FC, HTMLAttributes, PropsWithChildren } from 'react';\n\nimport { cn } from '@oneplatformdev/utils';\n\nconst loadedIconVariants = cva([\n 'relative',\n], {\n variants: {\n size: {\n inherit: '[&_svg]:size-inherit',\n xs: '[&_svg]:size-3',\n sm: '[&_svg]:size-4',\n md: '[&_svg]:size-5',\n lg: '[&_svg]:size-6',\n },\n },\n defaultVariants: { size: 'inherit' },\n});\n\ninterface ILoadedIconProps\n extends HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof loadedIconVariants> {\n loading?: boolean;\n}\n\nexport const LoadedIcon: FC<PropsWithChildren<ILoadedIconProps>> = (props) => {\n const { loading, children, size = 'md', className, ...rest } = props;\n return (\n <div\n {...rest}\n className={cn(loadedIconVariants({ size, className }))}\n >\n {loading\n ? <LoaderCircleIcon className=\"animate-spin\"/>\n : children}\n </div>\n );\n};\n"],"names":["loadedIconVariants","cva","LoadedIcon","props","loading","children","size","className","rest","jsx","cn","LoaderCircleIcon"],"mappings":";;;;AAMA,MAAMA,IAAqBC,EAAI;AAAA,EAC7B;AACF,GAAG;AAAA,EACD,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB,EAAE,MAAM,UAAA;AAC3B,CAAC,GAQYC,IAAsD,CAACC,MAAU;AAC5E,QAAM,EAAE,SAAAC,GAAS,UAAAC,GAAU,MAAAC,IAAO,MAAM,WAAAC,GAAW,GAAGC,MAASL;AAC/D,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,WAAWE,EAAGV,EAAmB,EAAE,MAAAM,GAAM,WAAAC,EAAA,CAAW,CAAC;AAAA,MAEpD,UAAAH,IACG,gBAAAK,EAACE,GAAA,EAAiB,WAAU,gBAAc,IAC1CN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { ILoadingMaskProps } from './LoadingMask.types';
|
|
3
|
-
export declare const LoadingMask:
|
|
2
|
+
export declare const LoadingMask: (props: ILoadingMaskProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
3
|
//# sourceMappingURL=LoadingMask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingMask.d.ts","sourceRoot":"","sources":["../../src/LoadingMask/LoadingMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"LoadingMask.d.ts","sourceRoot":"","sources":["../../src/LoadingMask/LoadingMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,eAAO,MAAM,WAAW,GAAI,OAAO,iBAAiB,mDAgBnD,CAAC"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { RenderLoadingMask as r } from "./RenderLoadingMask.js";
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
const { fullWidth: s = !1, className: i, ...
|
|
6
|
-
return s ? /* @__PURE__ */ e(
|
|
3
|
+
import { cn as a } from "@oneplatformdev/utils";
|
|
4
|
+
const c = (t) => {
|
|
5
|
+
const { loading: n = !0, fullWidth: s = !1, className: i, ...o } = t;
|
|
6
|
+
return n ? s ? /* @__PURE__ */ e(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
|
-
...
|
|
10
|
-
className:
|
|
9
|
+
...o,
|
|
10
|
+
className: a(
|
|
11
11
|
"absolute inset-0",
|
|
12
12
|
"flex items-center justify-center",
|
|
13
13
|
i
|
|
14
14
|
),
|
|
15
15
|
children: /* @__PURE__ */ e(r, {})
|
|
16
16
|
}
|
|
17
|
-
) : /* @__PURE__ */ e(r, {});
|
|
17
|
+
) : /* @__PURE__ */ e(r, {}) : null;
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
c as LoadingMask
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=LoadingMask.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingMask.js","sources":["../../src/LoadingMask/LoadingMask.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"LoadingMask.js","sources":["../../src/LoadingMask/LoadingMask.tsx"],"sourcesContent":["import { ILoadingMaskProps } from './LoadingMask.types';\nimport { RenderLoadingMask } from './RenderLoadingMask';\nimport { cn } from '@oneplatformdev/utils';\n\nexport const LoadingMask = (props: ILoadingMaskProps) => {\n const { loading = true, fullWidth = false, className, ...rest } = props;\n if(!loading) return null;\n if (!fullWidth) return <RenderLoadingMask />;\n return (\n <div\n {...rest}\n className={cn(\n 'absolute inset-0',\n 'flex items-center justify-center',\n className\n )}\n >\n <RenderLoadingMask />\n </div>\n );\n};\n"],"names":["LoadingMask","props","loading","fullWidth","className","rest","jsx","cn","RenderLoadingMask"],"mappings":";;;AAIO,MAAMA,IAAc,CAACC,MAA6B;AACvD,QAAM,EAAE,SAAAC,IAAU,IAAM,WAAAC,IAAY,IAAO,WAAAC,GAAW,GAAGC,MAASJ;AAClE,SAAIC,IACCC,IAEH,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACAH;AAAA,MAAA;AAAA,MAGF,4BAACI,GAAA,CAAA,CAAkB;AAAA,IAAA;AAAA,EAAA,IAVA,gBAAAF,EAACE,GAAA,CAAA,CAAkB,IADtB;AActB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingMask.types.d.ts","sourceRoot":"","sources":["../../src/LoadingMask/LoadingMask.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LoadingMask.types.d.ts","sourceRoot":"","sources":["../../src/LoadingMask/LoadingMask.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
package/Resizable/Resizable.d.ts
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
-
declare
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
collapsedSize?: number | undefined;
|
|
6
|
-
collapsible?: boolean | undefined;
|
|
7
|
-
defaultSize?: number | undefined;
|
|
8
|
-
id?: string;
|
|
9
|
-
maxSize?: number | undefined;
|
|
10
|
-
minSize?: number | undefined;
|
|
11
|
-
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
|
12
|
-
onExpand?: ResizablePrimitive.PanelOnExpand;
|
|
13
|
-
onResize?: ResizablePrimitive.PanelOnResize;
|
|
14
|
-
order?: number;
|
|
15
|
-
style?: object;
|
|
16
|
-
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
17
|
-
} & {
|
|
18
|
-
children?: import('react').ReactNode | undefined;
|
|
19
|
-
} & import('react').RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
|
20
|
-
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
3
|
+
declare function ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ResizableHandle(props: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
21
6
|
withHandle?: boolean;
|
|
22
|
-
})
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
8
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
24
9
|
//# sourceMappingURL=Resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../src/Resizable/Resizable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../src/Resizable/Resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAA;AAI5D,iBAAS,mBAAmB,CAAC,EACE,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,UAAU,CAAC,2CAWzF;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,2CAE/E;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,iBAAiB,CAAC,GAAG;IAClG,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,2CAwBA;AAED,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
|
package/Resizable/Resizable.js
CHANGED
|
@@ -1,37 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { GripVerticalIcon as c } from "lucide-react";
|
|
3
3
|
import * as t from "react-resizable-panels";
|
|
4
4
|
import { cn as i } from "@oneplatformdev/utils";
|
|
5
|
-
|
|
6
|
-
className:
|
|
5
|
+
function u({
|
|
6
|
+
className: e,
|
|
7
7
|
...r
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ a(
|
|
10
|
+
t.PanelGroup,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "resizable-panel-group",
|
|
13
|
+
className: i(
|
|
14
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
15
|
+
e
|
|
16
|
+
),
|
|
17
|
+
...r
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function b({
|
|
22
|
+
...e
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ a(t.Panel, { "data-slot": "resizable-panel", ...e });
|
|
25
|
+
}
|
|
26
|
+
function v(e) {
|
|
27
|
+
const {
|
|
28
|
+
withHandle: r,
|
|
29
|
+
className: l,
|
|
30
|
+
children: n,
|
|
31
|
+
...o
|
|
32
|
+
} = e;
|
|
33
|
+
return /* @__PURE__ */ s(
|
|
34
|
+
t.PanelResizeHandle,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "resizable-handle",
|
|
37
|
+
className: i(
|
|
38
|
+
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
39
|
+
l
|
|
40
|
+
),
|
|
41
|
+
...o,
|
|
42
|
+
children: [
|
|
43
|
+
n,
|
|
44
|
+
r && /* @__PURE__ */ a("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ a(c, { className: "size-2.5" }) })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
32
49
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
v as ResizableHandle,
|
|
51
|
+
b as ResizablePanel,
|
|
52
|
+
u as ResizablePanelGroup
|
|
36
53
|
};
|
|
37
54
|
//# sourceMappingURL=Resizable.js.map
|