@oliasoft-open-source/react-ui-library 4.6.16 → 4.6.17
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/global.css +11 -8
- package/dist/index.d.ts +10 -0
- package/dist/index.js +57 -4
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-6VNJS4EI-YEDm9gbz.js → Color-6VNJS4EI-l_tkm4Ol.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-NNNQARDV-NmCW-oyQ.js → DocsRenderer-NNNQARDV-pZpQmDez.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-V3YHNWJZ-3DZ-8kE7.js → WithTooltip-V3YHNWJZ-iEhMvku5.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-2FBaBkFc.js → buttons-and-links-kkzfA_fv.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-tHzaOxem.js → chunk-HLWAVYOI-7EffY2hk.js} +1 -1
- package/dist/storybook/assets/{color-7OzxGyA_.js → color-0XY3ZHi2.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-5kyAKS_C.js → file-input.stories-QbTMh_80.js} +1 -1
- package/dist/storybook/assets/{form.stories-rXc4fhX5.js → form.stories-BaGSZHT3.js} +1 -1
- package/dist/storybook/assets/{formatter-SWP5E3XI-_Igw7BUr.js → formatter-SWP5E3XI-rnZWn7Un.js} +1 -1
- package/dist/storybook/assets/{iframe-CpYMK6kb.js → iframe-fk3bQNFP.js} +2 -2
- package/dist/storybook/assets/{index-K-0S6d15.js → index-L7u6rs_t.js} +5 -5
- package/dist/storybook/assets/{input-validation-gD2VptJq.js → input-validation-SIWPb72t.js} +1 -1
- package/dist/storybook/assets/{inputs-xtYro1Lt.js → inputs-ii5Lb3ZE.js} +1 -1
- package/dist/storybook/assets/{layout-forms-NhJIOV9y.js → layout-forms-lx7_nlWB.js} +1 -1
- package/dist/storybook/assets/{layout-general-wuAEAmS1.js → layout-general-6yMuf8qw.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-h7UETkPK.js → padding-and-spacing-Beocy83w.js} +1 -1
- package/dist/storybook/assets/{preview-f-BBQod4.js → preview-1W-XaElU.js} +2 -2
- package/dist/storybook/assets/{preview-T-saggOw.js → preview-4yh7mm39.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-B5GMVT5T-d9li6xQn.js → syntaxhighlighter-B5GMVT5T-l5kiIEjw.js} +1 -1
- package/dist/storybook/assets/{textarea-JE26Eekm.js → textarea-RrPYPGCC.js} +1 -1
- package/dist/storybook/assets/{textarea.stories-c1mkQU4s.js → textarea.stories-rqdJWVro.js} +1 -1
- package/dist/storybook/assets/unit-table.stories-Nry33G5L.js +150 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/unit-table.stories-9k8rllRh.js +0 -142
package/dist/global.css
CHANGED
|
@@ -1685,17 +1685,20 @@ html[data-theme='dark'] {
|
|
|
1685
1685
|
transform: rotate(360deg);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
-
.
|
|
1688
|
+
._actions_1t7vd_1 {
|
|
1689
1689
|
margin-left: auto;
|
|
1690
1690
|
display: flex;
|
|
1691
1691
|
flex-wrap: nowrap;
|
|
1692
1692
|
justify-content: flex-end;
|
|
1693
1693
|
align-items: center;
|
|
1694
1694
|
}
|
|
1695
|
-
.
|
|
1695
|
+
._actions_1t7vd_1 > *:not(:last-child) {
|
|
1696
1696
|
margin-right: var(--padding-xxs);
|
|
1697
1697
|
}
|
|
1698
|
-
.
|
|
1698
|
+
._childComponent_1t7vd_11 {
|
|
1699
|
+
display: inline-flex;
|
|
1700
|
+
}
|
|
1701
|
+
._actionComponentContainer_1t7vd_14 {
|
|
1699
1702
|
width: 24px;
|
|
1700
1703
|
height: 24px;
|
|
1701
1704
|
display: inline-flex;
|
|
@@ -1708,16 +1711,16 @@ html[data-theme='dark'] {
|
|
|
1708
1711
|
transition: color 0.2s;
|
|
1709
1712
|
line-height: 0;
|
|
1710
1713
|
}
|
|
1711
|
-
.
|
|
1714
|
+
._actionComponentContainer_1t7vd_14 i {
|
|
1712
1715
|
margin: 0;
|
|
1713
1716
|
line-height: 1 !important;
|
|
1714
1717
|
}
|
|
1715
|
-
.
|
|
1716
|
-
.
|
|
1718
|
+
._actionComponentContainer_1t7vd_14:hover,
|
|
1719
|
+
._actionComponentContainer_1t7vd_14:focus {
|
|
1717
1720
|
color: var(--color-text-primary-hover);
|
|
1718
1721
|
}
|
|
1719
|
-
.
|
|
1720
|
-
.
|
|
1722
|
+
._actionComponentContainer_1t7vd_14:active,
|
|
1723
|
+
._actionComponentContainer_1t7vd_14._active_1t7vd_36 {
|
|
1721
1724
|
color: var(--color-text-primary-active);
|
|
1722
1725
|
}
|
|
1723
1726
|
._wrapper_1iw97_1 {
|
package/dist/index.d.ts
CHANGED
|
@@ -92,6 +92,8 @@ export declare const Empty: ({ width, height, text, children, testId, }: IEmptyP
|
|
|
92
92
|
|
|
93
93
|
export declare const Field: ({ label, labelLeft, labelWidth, children, helpText, helpTextMaxWidth, onClickHelp, lock, info, libraryIcon, testId, }: IFieldProps) => JSX_2.Element;
|
|
94
94
|
|
|
95
|
+
export declare const FileButton: ({ file, accept, multi, name, disabled, onChange, ...buttonProps }: IFileButtonProps) => JSX_2.Element;
|
|
96
|
+
|
|
95
97
|
export declare const FileInput: ({ label, loading, placeholder, disabled, file, accept, multi, name, width, onChange, testId, }: IFileInputProps) => ReactElement;
|
|
96
98
|
|
|
97
99
|
export declare const Flex: ({ alignItems, justifyContent, direction, height, children, wrap, gap, }: IFlexProps) => JSX_2.Element;
|
|
@@ -397,6 +399,14 @@ export declare interface IFieldProps {
|
|
|
397
399
|
testId?: string;
|
|
398
400
|
}
|
|
399
401
|
|
|
402
|
+
export declare interface IFileButtonProps extends IButtonProps {
|
|
403
|
+
file?: File;
|
|
404
|
+
accept?: string;
|
|
405
|
+
multi?: boolean;
|
|
406
|
+
name?: string;
|
|
407
|
+
onChange?: (evt: any) => void;
|
|
408
|
+
}
|
|
409
|
+
|
|
400
410
|
export declare interface IFileInputProps {
|
|
401
411
|
label?: string | null;
|
|
402
412
|
loading?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -4211,11 +4211,13 @@ const Button$1 = ({
|
|
|
4211
4211
|
}
|
|
4212
4212
|
) });
|
|
4213
4213
|
};
|
|
4214
|
-
const actions$2 = "
|
|
4215
|
-
const
|
|
4216
|
-
const
|
|
4214
|
+
const actions$2 = "_actions_1t7vd_1";
|
|
4215
|
+
const childComponent = "_childComponent_1t7vd_11";
|
|
4216
|
+
const actionComponentContainer = "_actionComponentContainer_1t7vd_14";
|
|
4217
|
+
const active$7 = "_active_1t7vd_36";
|
|
4217
4218
|
const styles$M = {
|
|
4218
4219
|
actions: actions$2,
|
|
4220
|
+
childComponent,
|
|
4219
4221
|
actionComponentContainer,
|
|
4220
4222
|
active: active$7
|
|
4221
4223
|
};
|
|
@@ -5029,7 +5031,15 @@ const Actions = (props) => {
|
|
|
5029
5031
|
const hidden2 = (action2 == null ? void 0 : action2.hidden) || !action2 || !Object.keys(action2).length;
|
|
5030
5032
|
if (!hidden2) {
|
|
5031
5033
|
if (action2.childComponent && React__default.isValidElement(action2.childComponent)) {
|
|
5032
|
-
return /* @__PURE__ */ jsx(
|
|
5034
|
+
return /* @__PURE__ */ jsx(
|
|
5035
|
+
"div",
|
|
5036
|
+
{
|
|
5037
|
+
"data-testid": action2.testId,
|
|
5038
|
+
className: styles$M.childComponent,
|
|
5039
|
+
children: action2.childComponent
|
|
5040
|
+
},
|
|
5041
|
+
index2
|
|
5042
|
+
);
|
|
5033
5043
|
} else if (action2.subActions) {
|
|
5034
5044
|
return /* @__PURE__ */ jsx(
|
|
5035
5045
|
SubmenuActions,
|
|
@@ -9068,6 +9078,48 @@ const Empty = ({
|
|
|
9068
9078
|
}
|
|
9069
9079
|
);
|
|
9070
9080
|
};
|
|
9081
|
+
const FileButton = ({
|
|
9082
|
+
file,
|
|
9083
|
+
accept,
|
|
9084
|
+
multi,
|
|
9085
|
+
name: name2,
|
|
9086
|
+
disabled: disabled2,
|
|
9087
|
+
onChange = () => {
|
|
9088
|
+
},
|
|
9089
|
+
...buttonProps
|
|
9090
|
+
}) => {
|
|
9091
|
+
const disabledContext = useContext(DisabledContext);
|
|
9092
|
+
const inputRef = useRef(null);
|
|
9093
|
+
const handleClick2 = () => {
|
|
9094
|
+
var _a;
|
|
9095
|
+
if (!(disabled2 || disabledContext))
|
|
9096
|
+
(_a = inputRef.current) == null ? void 0 : _a.click();
|
|
9097
|
+
};
|
|
9098
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
9099
|
+
/* @__PURE__ */ jsx(Button$1, { ...buttonProps, onClick: handleClick2 }),
|
|
9100
|
+
/* @__PURE__ */ jsx(
|
|
9101
|
+
"input",
|
|
9102
|
+
{
|
|
9103
|
+
name: name2,
|
|
9104
|
+
ref: inputRef,
|
|
9105
|
+
style: { display: "none" },
|
|
9106
|
+
type: "file",
|
|
9107
|
+
accept,
|
|
9108
|
+
multiple: multi,
|
|
9109
|
+
onChange: (evt) => {
|
|
9110
|
+
var _a, _b, _c;
|
|
9111
|
+
onChange({
|
|
9112
|
+
...evt,
|
|
9113
|
+
target: {
|
|
9114
|
+
...evt.target,
|
|
9115
|
+
value: multi ? (_a = evt == null ? void 0 : evt.target) == null ? void 0 : _a.files : (_c = (_b = evt == null ? void 0 : evt.target) == null ? void 0 : _b.files) == null ? void 0 : _c[0]
|
|
9116
|
+
}
|
|
9117
|
+
});
|
|
9118
|
+
}
|
|
9119
|
+
}
|
|
9120
|
+
)
|
|
9121
|
+
] });
|
|
9122
|
+
};
|
|
9071
9123
|
const inputGroup = "_inputGroup_biuoa_1";
|
|
9072
9124
|
const styles$A = {
|
|
9073
9125
|
inputGroup
|
|
@@ -71038,6 +71090,7 @@ export {
|
|
|
71038
71090
|
ElementType,
|
|
71039
71091
|
Empty,
|
|
71040
71092
|
Field,
|
|
71093
|
+
FileButton,
|
|
71041
71094
|
FileInput,
|
|
71042
71095
|
Flex,
|
|
71043
71096
|
FormRow,
|