@oliasoft-open-source/react-ui-library 4.1.7 → 4.1.9
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/404.html +1 -1
- package/dist/assets/{index-f2b208e6.css → index-9e4179c3.css} +46 -45
- package/dist/assets/{index-0fee18b2.js → index-cfa07a3f.js} +31 -34
- package/dist/index.d.ts +3 -1
- package/dist/index.html +1 -1
- package/dist/index.js +56 -19
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-6VNJS4EI-6ac93c1f.js → Color-6VNJS4EI-9910c147.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-NNNQARDV-fbfde2c1.js → DocsRenderer-NNNQARDV-a522b024.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-4HIR6TLV-266cd08c.js → WithTooltip-4HIR6TLV-7bbadfaf.js} +1 -1
- package/dist/storybook/assets/{afe.stories-cc38aff9.js → afe.stories-59152807.js} +1 -1
- package/dist/storybook/assets/{blowout.stories-0584fa9e.js → blowout.stories-ee7f932b.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-48343430.js → buttons-and-links-be660e16.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-9e4825f1.js → casing-loads.stories-6979603a.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-0e4a153d.js → chunk-HLWAVYOI-276e8f5d.js} +1 -1
- package/dist/storybook/assets/{color-4480a0c5.js → color-c94a1182.js} +1 -1
- package/dist/storybook/assets/{formation.stories-e444112c.js → formation.stories-f99a1a14.js} +1 -1
- package/dist/storybook/assets/{formatter-SWP5E3XI-834da737.js → formatter-SWP5E3XI-f57a37f0.js} +1 -1
- package/dist/storybook/assets/{iframe-4b9bc7c1.js → iframe-fb9f1f0f.js} +1 -1
- package/dist/storybook/assets/{index-4399968c.js → index-58a452a8.js} +4 -4
- package/dist/storybook/assets/{input-validation-71702a4f.js → input-validation-51ebd4aa.js} +1 -1
- package/dist/storybook/assets/{inputs-4e275575.js → inputs-af297a42.js} +1 -1
- package/dist/storybook/assets/{layout-forms-08da4864.js → layout-forms-2a3e62dd.js} +1 -1
- package/dist/storybook/assets/{layout-general-50a467c0.js → layout-general-acba141c.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-4719d93c.js → padding-and-spacing-8f874256.js} +1 -1
- package/dist/storybook/assets/{page.stories-87c7b257.js → page.stories-7cb68fed.js} +1 -1
- package/dist/storybook/assets/{preview-fdd38dbb.js → preview-6696d9cf.js} +1 -1
- package/dist/storybook/assets/preview-e912e8bb.js +1 -0
- package/dist/storybook/assets/{reservoirs.stories-457be056.js → reservoirs.stories-8301fe95.js} +1 -1
- package/dist/storybook/assets/side-bar-1ccf9b62.css +1 -0
- package/dist/storybook/assets/side-bar-88e8cf41.js +1 -0
- package/dist/storybook/assets/{side-bar.stories-d5504e52.js → side-bar.stories-0887207d.js} +1 -1
- package/dist/storybook/assets/{site.stories-f06d77af.js → site.stories-dee8ce1c.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-NMPM6SWI-0b123533.js → syntaxhighlighter-NMPM6SWI-c8966e57.js} +1 -1
- package/dist/storybook/assets/{table.stories-4b91e144.js → table.stories-fabc902c.js} +85 -17
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/stories.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/preview-a9b24c4d.js +0 -1
- package/dist/storybook/assets/side-bar-a3cae6a4.css +0 -1
- package/dist/storybook/assets/side-bar-f26ab0ce.js +0 -1
package/dist/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-
|
|
1
|
+
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-cfa07a3f.js"></script><link rel="stylesheet" href="/react-ui-library/assets/index-9e4179c3.css"></head><body><div id="content"></div></body>
|
|
@@ -8910,80 +8910,80 @@ button:active .remirror-menu-pane-shortcut,
|
|
|
8910
8910
|
min-height: 0;
|
|
8911
8911
|
flex-shrink: 0;
|
|
8912
8912
|
}
|
|
8913
|
-
.
|
|
8913
|
+
._inputInTable_1ube5_1 {
|
|
8914
8914
|
background-color: transparent;
|
|
8915
8915
|
border-radius: inherit !important;
|
|
8916
8916
|
height: var(--size);
|
|
8917
8917
|
min-height: 100%;
|
|
8918
8918
|
}
|
|
8919
|
-
.
|
|
8919
|
+
._inputInTable_1ube5_1:not(:hover) {
|
|
8920
8920
|
border-color: transparent;
|
|
8921
8921
|
}
|
|
8922
|
-
.
|
|
8922
|
+
._inputInTable_1ube5_1:not(:focus) {
|
|
8923
8923
|
box-shadow: none;
|
|
8924
8924
|
}
|
|
8925
|
-
.
|
|
8925
|
+
._inputHover_1ube5_13 {
|
|
8926
8926
|
position: relative;
|
|
8927
8927
|
border-color: var(--color-border-hover);
|
|
8928
8928
|
z-index: 2;
|
|
8929
8929
|
}
|
|
8930
|
-
.
|
|
8930
|
+
._inputFocus_1ube5_18 {
|
|
8931
8931
|
position: relative;
|
|
8932
8932
|
outline: none !important;
|
|
8933
8933
|
border-color: var(--color-border-focus) !important;
|
|
8934
8934
|
box-shadow: var(--shadow-focus);
|
|
8935
8935
|
z-index: 3;
|
|
8936
8936
|
}
|
|
8937
|
-
.
|
|
8938
|
-
.
|
|
8937
|
+
._inputError_1ube5_25,
|
|
8938
|
+
._inputWarning_1ube5_26 {
|
|
8939
8939
|
position: relative;
|
|
8940
8940
|
}
|
|
8941
|
-
.
|
|
8941
|
+
._inputError_1ube5_25 {
|
|
8942
8942
|
z-index: 2;
|
|
8943
8943
|
border-color: var(--color-border-error);
|
|
8944
8944
|
color: var(--color-text-error) !important;
|
|
8945
8945
|
background-color: var(--color-background-error-muted);
|
|
8946
8946
|
}
|
|
8947
|
-
.
|
|
8947
|
+
._inputError_1ube5_25:hover {
|
|
8948
8948
|
border-color: var(--color-border-error-hover) !important;
|
|
8949
8949
|
}
|
|
8950
|
-
.
|
|
8950
|
+
._inputError_1ube5_25:focus {
|
|
8951
8951
|
position: relative;
|
|
8952
8952
|
outline: none !important;
|
|
8953
8953
|
border-color: var(--color-border-focus) !important;
|
|
8954
8954
|
box-shadow: var(--shadow-focus);
|
|
8955
8955
|
z-index: 3;
|
|
8956
8956
|
}
|
|
8957
|
-
.
|
|
8957
|
+
._inputWarning_1ube5_26 {
|
|
8958
8958
|
z-index: 1;
|
|
8959
8959
|
border-color: var(--color-border-warning);
|
|
8960
8960
|
color: var(--color-text-warning) !important;
|
|
8961
8961
|
background-color: var(--color-background-warning-muted);
|
|
8962
8962
|
}
|
|
8963
|
-
.
|
|
8963
|
+
._inputWarning_1ube5_26:hover {
|
|
8964
8964
|
border-color: var(--color-border-warning-hover) !important;
|
|
8965
8965
|
}
|
|
8966
|
-
.
|
|
8966
|
+
._inputWarning_1ube5_26:focus {
|
|
8967
8967
|
position: relative;
|
|
8968
8968
|
outline: none !important;
|
|
8969
8969
|
border-color: var(--color-border-focus) !important;
|
|
8970
8970
|
box-shadow: var(--shadow-focus);
|
|
8971
8971
|
z-index: 3;
|
|
8972
8972
|
}
|
|
8973
|
-
.
|
|
8973
|
+
._inputDisabled_1ube5_61 {
|
|
8974
8974
|
pointer-events: none;
|
|
8975
8975
|
background-color: var(--color-background-disabled);
|
|
8976
8976
|
color: var(--color-text-muted);
|
|
8977
8977
|
box-shadow: none;
|
|
8978
8978
|
}
|
|
8979
|
-
.
|
|
8979
|
+
._hideScrollbars_1ube5_67 {
|
|
8980
8980
|
/* Firefox */
|
|
8981
8981
|
scrollbar-width: none;
|
|
8982
8982
|
/* IE 10+ */
|
|
8983
8983
|
-ms-overflow-style: none;
|
|
8984
8984
|
/* Chrome, Safari and Opera */
|
|
8985
8985
|
}
|
|
8986
|
-
.
|
|
8986
|
+
._hideScrollbars_1ube5_67::-webkit-scrollbar {
|
|
8987
8987
|
display: none;
|
|
8988
8988
|
}
|
|
8989
8989
|
:root {
|
|
@@ -8991,42 +8991,42 @@ button:active .remirror-menu-pane-shortcut,
|
|
|
8991
8991
|
--size-sidebar-icon: var(--size);
|
|
8992
8992
|
--color-background-sidebar: black;
|
|
8993
8993
|
}
|
|
8994
|
-
.
|
|
8994
|
+
._sidebar_1ube5_82 {
|
|
8995
8995
|
background-color: var(--color-background-sidebar);
|
|
8996
8996
|
color: white;
|
|
8997
8997
|
position: relative;
|
|
8998
8998
|
padding: var(--padding) 0;
|
|
8999
8999
|
}
|
|
9000
9000
|
@media print {
|
|
9001
|
-
.
|
|
9001
|
+
._sidebar_1ube5_82 {
|
|
9002
9002
|
display: none;
|
|
9003
9003
|
}
|
|
9004
9004
|
}
|
|
9005
|
-
.
|
|
9005
|
+
._inner_1ube5_93 {
|
|
9006
9006
|
/* Firefox */
|
|
9007
9007
|
scrollbar-width: none;
|
|
9008
9008
|
/* IE 10+ */
|
|
9009
9009
|
-ms-overflow-style: none;
|
|
9010
9010
|
/* Chrome, Safari and Opera */
|
|
9011
9011
|
}
|
|
9012
|
-
.
|
|
9012
|
+
._inner_1ube5_93::-webkit-scrollbar {
|
|
9013
9013
|
display: none;
|
|
9014
9014
|
}
|
|
9015
|
-
.
|
|
9016
|
-
.
|
|
9017
|
-
.
|
|
9015
|
+
._title_1ube5_103,
|
|
9016
|
+
._subtitle_1ube5_104,
|
|
9017
|
+
._label_1ube5_105 {
|
|
9018
9018
|
transition: opacity 0.2s, max-height 0.2s, margin 0.2s, color 0.2s;
|
|
9019
9019
|
max-height: 50px;
|
|
9020
9020
|
}
|
|
9021
|
-
.
|
|
9022
|
-
.
|
|
9023
|
-
.
|
|
9021
|
+
._collapsed_1ube5_109 ._title_1ube5_103,
|
|
9022
|
+
._collapsed_1ube5_109 ._subtitle_1ube5_104,
|
|
9023
|
+
._collapsed_1ube5_109 ._label_1ube5_105 {
|
|
9024
9024
|
opacity: 0;
|
|
9025
9025
|
max-height: 0;
|
|
9026
9026
|
margin-bottom: 0;
|
|
9027
9027
|
margin-top: 0;
|
|
9028
9028
|
}
|
|
9029
|
-
.
|
|
9029
|
+
._title_1ube5_103 {
|
|
9030
9030
|
overflow: hidden;
|
|
9031
9031
|
max-width: 100%;
|
|
9032
9032
|
text-overflow: ellipsis;
|
|
@@ -9035,7 +9035,7 @@ button:active .remirror-menu-pane-shortcut,
|
|
|
9035
9035
|
font-size: var(--font-size-xl);
|
|
9036
9036
|
padding: 0 var(--padding);
|
|
9037
9037
|
}
|
|
9038
|
-
.
|
|
9038
|
+
._subtitle_1ube5_104 {
|
|
9039
9039
|
margin-bottom: var(--padding-xs);
|
|
9040
9040
|
white-space: nowrap;
|
|
9041
9041
|
font-size: var(--font-size);
|
|
@@ -9043,47 +9043,48 @@ button:active .remirror-menu-pane-shortcut,
|
|
|
9043
9043
|
color: var(--color-neutral-700);
|
|
9044
9044
|
padding: 0 var(--padding);
|
|
9045
9045
|
}
|
|
9046
|
-
.
|
|
9046
|
+
._list_1ube5_134 {
|
|
9047
9047
|
margin-bottom: var(--padding-xl);
|
|
9048
9048
|
margin-top: 0;
|
|
9049
|
+
position: relative;
|
|
9050
|
+
z-index: 1;
|
|
9049
9051
|
}
|
|
9050
|
-
.
|
|
9052
|
+
._item_1ube5_140 {
|
|
9051
9053
|
transition: padding 0.2s, color 0.2s;
|
|
9052
9054
|
font-size: var(--font-size-lg);
|
|
9053
9055
|
font-weight: normal;
|
|
9054
9056
|
display: flex;
|
|
9055
|
-
padding: var(--padding-xxs)
|
|
9057
|
+
padding: 0 var(--padding-xxs);
|
|
9056
9058
|
align-items: center;
|
|
9057
9059
|
color: var(--color-neutral-500);
|
|
9058
9060
|
}
|
|
9059
|
-
.
|
|
9060
|
-
padding:
|
|
9061
|
+
._collapsed_1ube5_109 ._item_1ube5_140 {
|
|
9062
|
+
padding: 0;
|
|
9061
9063
|
}
|
|
9062
|
-
.
|
|
9064
|
+
._item_1ube5_140:hover {
|
|
9063
9065
|
color: var(--color-neutral-200);
|
|
9064
9066
|
}
|
|
9065
|
-
.
|
|
9067
|
+
._item_1ube5_140._experimental_1ube5_155 {
|
|
9066
9068
|
background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 8px, rgba(255, 255, 255, 0.1) 16px, transparent 16px, transparent 24px);
|
|
9067
9069
|
}
|
|
9068
|
-
.
|
|
9069
|
-
.
|
|
9070
|
+
._item_1ube5_140:active,
|
|
9071
|
+
._item_1ube5_140._active_1ube5_159 {
|
|
9070
9072
|
color: var(--color-neutral-0);
|
|
9071
9073
|
background-color: var(--color-primary-700);
|
|
9072
9074
|
}
|
|
9073
|
-
.
|
|
9074
|
-
margin-right: var(--padding-sm);
|
|
9075
|
+
._icon_1ube5_163 {
|
|
9075
9076
|
line-height: 0;
|
|
9076
9077
|
flex-shrink: 0;
|
|
9077
|
-
display:
|
|
9078
|
+
display: flex;
|
|
9079
|
+
width: var(--size-sidebar);
|
|
9080
|
+
justify-content: center;
|
|
9078
9081
|
font-size: var(--size-sidebar-icon);
|
|
9082
|
+
padding: var(--padding-xxs) 0;
|
|
9079
9083
|
}
|
|
9080
|
-
.
|
|
9081
|
-
display: block;
|
|
9082
|
-
}
|
|
9083
|
-
._icon_1n7o1_161 svg {
|
|
9084
|
+
._icon_1ube5_163 svg {
|
|
9084
9085
|
stroke-width: 1;
|
|
9085
9086
|
}
|
|
9086
|
-
.
|
|
9087
|
+
._label_1ube5_105 {
|
|
9087
9088
|
white-space: nowrap;
|
|
9088
9089
|
overflow: hidden;
|
|
9089
9090
|
}
|
|
@@ -56175,24 +56175,24 @@ var reactFastCompare = function isEqual3(a2, b2) {
|
|
|
56175
56175
|
}
|
|
56176
56176
|
};
|
|
56177
56177
|
const isEqual4 = /* @__PURE__ */ getDefaultExportFromCjs(reactFastCompare);
|
|
56178
|
-
const inputInTable$3 = "
|
|
56179
|
-
const inputHover$3 = "
|
|
56180
|
-
const inputFocus$3 = "
|
|
56181
|
-
const inputError$3 = "
|
|
56182
|
-
const inputWarning$3 = "
|
|
56183
|
-
const inputDisabled$3 = "
|
|
56184
|
-
const hideScrollbars$3 = "
|
|
56185
|
-
const sidebar = "
|
|
56186
|
-
const inner = "
|
|
56187
|
-
const title$3 = "
|
|
56188
|
-
const subtitle = "
|
|
56189
|
-
const label$2 = "
|
|
56190
|
-
const collapsed = "
|
|
56191
|
-
const list = "
|
|
56192
|
-
const item$2 = "
|
|
56193
|
-
const experimental = "
|
|
56194
|
-
const active$2 = "
|
|
56195
|
-
const icon$1 = "
|
|
56178
|
+
const inputInTable$3 = "_inputInTable_1ube5_1";
|
|
56179
|
+
const inputHover$3 = "_inputHover_1ube5_13";
|
|
56180
|
+
const inputFocus$3 = "_inputFocus_1ube5_18";
|
|
56181
|
+
const inputError$3 = "_inputError_1ube5_25";
|
|
56182
|
+
const inputWarning$3 = "_inputWarning_1ube5_26";
|
|
56183
|
+
const inputDisabled$3 = "_inputDisabled_1ube5_61";
|
|
56184
|
+
const hideScrollbars$3 = "_hideScrollbars_1ube5_67";
|
|
56185
|
+
const sidebar = "_sidebar_1ube5_82";
|
|
56186
|
+
const inner = "_inner_1ube5_93";
|
|
56187
|
+
const title$3 = "_title_1ube5_103";
|
|
56188
|
+
const subtitle = "_subtitle_1ube5_104";
|
|
56189
|
+
const label$2 = "_label_1ube5_105";
|
|
56190
|
+
const collapsed = "_collapsed_1ube5_109";
|
|
56191
|
+
const list = "_list_1ube5_134";
|
|
56192
|
+
const item$2 = "_item_1ube5_140";
|
|
56193
|
+
const experimental = "_experimental_1ube5_155";
|
|
56194
|
+
const active$2 = "_active_1ube5_159";
|
|
56195
|
+
const icon$1 = "_icon_1ube5_163";
|
|
56196
56196
|
const styles$e = {
|
|
56197
56197
|
inputInTable: inputInTable$3,
|
|
56198
56198
|
inputHover: inputHover$3,
|
|
@@ -56215,23 +56215,20 @@ const styles$e = {
|
|
|
56215
56215
|
};
|
|
56216
56216
|
const TooltipIcon = reactExports.memo(
|
|
56217
56217
|
({ isOpen: isOpen2, label: label2, icon: icon2, invalid }) => {
|
|
56218
|
-
const Unbadged = () => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
56219
|
-
Tooltip,
|
|
56220
|
-
{
|
|
56221
|
-
text: label2,
|
|
56222
|
-
enabled: !isOpen2,
|
|
56223
|
-
placement: "right-center",
|
|
56224
|
-
possiblePlacements: ["right-center"],
|
|
56225
|
-
triggerOffset: 24,
|
|
56226
|
-
fontSize: 16,
|
|
56227
|
-
padding: "var(--padding-sm)",
|
|
56228
|
-
display: "block",
|
|
56229
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { icon: icon2 })
|
|
56230
|
-
}
|
|
56231
|
-
);
|
|
56232
|
-
const Badged = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { small: true, title: "!", margin: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Unbadged, {}) });
|
|
56233
56218
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
56234
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
56219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
56220
|
+
Tooltip,
|
|
56221
|
+
{
|
|
56222
|
+
text: label2,
|
|
56223
|
+
enabled: !isOpen2,
|
|
56224
|
+
placement: "right-center",
|
|
56225
|
+
possiblePlacements: ["right-center"],
|
|
56226
|
+
fontSize: 16,
|
|
56227
|
+
padding: "var(--padding-sm)",
|
|
56228
|
+
display: "block",
|
|
56229
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$e.icon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { small: true, title: invalid ? "!" : void 0, margin: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { icon: icon2 }) }) })
|
|
56230
|
+
}
|
|
56231
|
+
),
|
|
56235
56232
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$e.label, children: label2 })
|
|
56236
56233
|
] });
|
|
56237
56234
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -808,6 +808,8 @@ export declare interface IModalProps {
|
|
|
808
808
|
visible?: boolean;
|
|
809
809
|
centered?: boolean;
|
|
810
810
|
width?: TStringOrNumber;
|
|
811
|
+
onEnter?: () => void;
|
|
812
|
+
onEscape?: () => void;
|
|
811
813
|
}
|
|
812
814
|
|
|
813
815
|
export declare interface INativeSelectProps {
|
|
@@ -1501,7 +1503,7 @@ export declare enum MessageType {
|
|
|
1501
1503
|
ERROR = "Error"
|
|
1502
1504
|
}
|
|
1503
1505
|
|
|
1504
|
-
export declare const Modal: ({ children, visible, centered, width, }: IModalProps) => JSX_2.Element;
|
|
1506
|
+
export declare const Modal: ({ children, visible, centered, width, onEnter, onEscape, }: IModalProps) => JSX_2.Element;
|
|
1505
1507
|
|
|
1506
1508
|
export declare const NativeSelect: ({ disabled, error, warning, tooltip, options, onChange, onFocus, onBlur, right, small, tabIndex, selectedOption, width, groupOrder, testId, isInTable, clearable, placeholder, hasNonExistentValue, maxTooltipWidth, borderRadius, }: INativeSelectProps) => JSX_2.Element;
|
|
1507
1509
|
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-
|
|
1
|
+
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-cfa07a3f.js"></script><link rel="stylesheet" href="/react-ui-library/assets/index-9e4179c3.css"></head><body><div id="content"></div></body>
|
package/dist/index.js
CHANGED
|
@@ -19445,6 +19445,19 @@ const Message = ({ message: message2 }) => {
|
|
|
19445
19445
|
}
|
|
19446
19446
|
) : null });
|
|
19447
19447
|
};
|
|
19448
|
+
const useKeyboardEvent = (key2, fn, dependencyList = []) => {
|
|
19449
|
+
useEffect(() => {
|
|
19450
|
+
const handler = (evt) => {
|
|
19451
|
+
if (evt.key === key2) {
|
|
19452
|
+
fn();
|
|
19453
|
+
}
|
|
19454
|
+
};
|
|
19455
|
+
window.addEventListener("keydown", handler);
|
|
19456
|
+
return () => {
|
|
19457
|
+
window.removeEventListener("keydown", handler);
|
|
19458
|
+
};
|
|
19459
|
+
}, dependencyList);
|
|
19460
|
+
};
|
|
19448
19461
|
const Portal = ({ id: id2, children }) => {
|
|
19449
19462
|
const parent = document.querySelector(`#${id2}`);
|
|
19450
19463
|
const [mounted, setMounted] = useState(false);
|
|
@@ -19464,7 +19477,22 @@ const styles$q = {
|
|
|
19464
19477
|
centered,
|
|
19465
19478
|
newLine
|
|
19466
19479
|
};
|
|
19467
|
-
const Wrapper = ({ children }) =>
|
|
19480
|
+
const Wrapper = ({ children }) => {
|
|
19481
|
+
const wrapperRef = useRef(null);
|
|
19482
|
+
useEffect(() => {
|
|
19483
|
+
if (wrapperRef.current) {
|
|
19484
|
+
const firstFocusableElement = wrapperRef.current.querySelector(
|
|
19485
|
+
'[tabindex="0"]'
|
|
19486
|
+
);
|
|
19487
|
+
if (firstFocusableElement) {
|
|
19488
|
+
firstFocusableElement.focus();
|
|
19489
|
+
} else {
|
|
19490
|
+
wrapperRef.current.focus();
|
|
19491
|
+
}
|
|
19492
|
+
}
|
|
19493
|
+
}, []);
|
|
19494
|
+
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, tabIndex: -1, className: cx$2(styles$q.wrapper), children });
|
|
19495
|
+
};
|
|
19468
19496
|
const Content$2 = ({ children, width: width2, centered: centered2 }) => /* @__PURE__ */ jsx(
|
|
19469
19497
|
"div",
|
|
19470
19498
|
{
|
|
@@ -19477,11 +19505,33 @@ const Modal = ({
|
|
|
19477
19505
|
children,
|
|
19478
19506
|
visible = false,
|
|
19479
19507
|
centered: centered2 = false,
|
|
19480
|
-
width: width2 = "100%"
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19508
|
+
width: width2 = "100%",
|
|
19509
|
+
onEnter,
|
|
19510
|
+
onEscape
|
|
19511
|
+
}) => {
|
|
19512
|
+
useKeyboardEvent(
|
|
19513
|
+
"Enter",
|
|
19514
|
+
() => {
|
|
19515
|
+
if (visible && onEnter) {
|
|
19516
|
+
onEnter();
|
|
19517
|
+
}
|
|
19518
|
+
},
|
|
19519
|
+
[visible, onEnter]
|
|
19520
|
+
);
|
|
19521
|
+
useKeyboardEvent(
|
|
19522
|
+
"Escape",
|
|
19523
|
+
() => {
|
|
19524
|
+
if (visible && onEscape) {
|
|
19525
|
+
onEscape();
|
|
19526
|
+
}
|
|
19527
|
+
},
|
|
19528
|
+
[visible, onEscape]
|
|
19529
|
+
);
|
|
19530
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
19531
|
+
/* @__PURE__ */ jsx(Portal, { id: "modalContainer", children: visible ? /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsx(Content$2, { width: width2, centered: centered2, children }) }) : null }),
|
|
19532
|
+
/* @__PURE__ */ jsx("div", { id: "modalContainer" })
|
|
19533
|
+
] });
|
|
19534
|
+
};
|
|
19485
19535
|
const menu$1 = "_menu_12x4u_1";
|
|
19486
19536
|
const header = "_header_12x4u_11";
|
|
19487
19537
|
const item$3 = "_item_12x4u_27";
|
|
@@ -19994,19 +20044,6 @@ var reactKeyboardEventHandler = { exports: {} };
|
|
|
19994
20044
|
})(reactKeyboardEventHandler);
|
|
19995
20045
|
var reactKeyboardEventHandlerExports = reactKeyboardEventHandler.exports;
|
|
19996
20046
|
const KeyboardEventHandler = /* @__PURE__ */ getDefaultExportFromCjs(reactKeyboardEventHandlerExports);
|
|
19997
|
-
const useKeyboardEvent = (key2, fn, dependencyList = []) => {
|
|
19998
|
-
useEffect(() => {
|
|
19999
|
-
const handler = (evt) => {
|
|
20000
|
-
if (evt.key === key2) {
|
|
20001
|
-
fn();
|
|
20002
|
-
}
|
|
20003
|
-
};
|
|
20004
|
-
window.addEventListener("keydown", handler);
|
|
20005
|
-
return () => {
|
|
20006
|
-
window.removeEventListener("keydown", handler);
|
|
20007
|
-
};
|
|
20008
|
-
}, dependencyList);
|
|
20009
|
-
};
|
|
20010
20047
|
const useFocus = () => {
|
|
20011
20048
|
const ref2 = useRef(null);
|
|
20012
20049
|
const setFocus = () => {
|