@oliasoft-open-source/react-ui-library 4.5.2 → 4.5.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/404.html +1 -1
- package/dist/assets/{index-Sj2bW45b.js → index-LV8D_yOA.js} +47 -45
- package/dist/assets/{index-AkeNwthw.css → index-qXNVhovK.css} +102 -72
- package/dist/global.css +43 -43
- package/dist/index.html +1 -1
- package/dist/index.js +16 -16
- package/dist/storybook/assets/{Color-6VNJS4EI-qs5_n_eY.js → Color-6VNJS4EI-e-7IVjYF.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-NNNQARDV-wErmA9og.js → DocsRenderer-NNNQARDV-znpQtgbM.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-4HIR6TLV-QS6Mj2Xl.js → WithTooltip-4HIR6TLV-X2fcxccp.js} +1 -1
- package/dist/storybook/assets/{afe.stories-mangk6LB.js → afe.stories-KoSyhC2z.js} +1 -1
- package/dist/storybook/assets/{button.stories-PhWmZXOu.js → button.stories-f6VcbEgi.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-8jrNvUVe.js → buttons-and-links-CPHN2f_R.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-wK86cYgL.js → casing-loads.stories-leLrg-rI.js} +1 -1
- package/dist/storybook/assets/{cell.stories-gI5ZjW_3.js → cell.stories-sSV8Bvno.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-qJxOXP1m.js → chunk-HLWAVYOI-2SmvXyKU.js} +1 -1
- package/dist/storybook/assets/{color-UO83nrE-.js → color-peuTfev0.js} +1 -1
- package/dist/storybook/assets/{drawer.stories-RFRPs_pQ.js → drawer.stories-zEOolOrO.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-LkafhuIt.js → file-input.stories-6NjWeNyC.js} +1 -1
- package/dist/storybook/assets/{flex-RYZsoWEN.js → flex-3eLDDUyy.js} +1 -1
- package/dist/storybook/assets/{flex.stories-lLz0Xrt_.js → flex.stories-_VBDAVzN.js} +1 -1
- package/dist/storybook/assets/{footer.stories-SNpr1wxu.js → footer.stories-Bb7DXjX3.js} +1 -1
- package/dist/storybook/assets/{form.stories-tzZoKyyL.js → form.stories-z3f6tVdU.js} +1 -1
- package/dist/storybook/assets/{formatter-SWP5E3XI-upDgC2hz.js → formatter-SWP5E3XI-o0EHYkG7.js} +1 -1
- package/dist/storybook/assets/{heading.stories-HLMPkIPo.js → heading.stories-DmZLaZJb.js} +1 -1
- package/dist/storybook/assets/{icon.stories-W-UgTWyK.js → icon.stories-h0hheUmg.js} +1 -1
- package/dist/storybook/assets/{iframe-3oJ7qbsB.js → iframe-_9SeMvPT.js} +2 -2
- package/dist/storybook/assets/{index-4EAjrsuB.js → index-YJcqKE3A.js} +5 -5
- package/dist/storybook/assets/{input-validation-XK0UmqQS.js → input-validation-Oq5NBD62.js} +1 -1
- package/dist/storybook/assets/{inputs-Bl296I5Z.js → inputs-IDQSQH2K.js} +1 -1
- package/dist/storybook/assets/{layout-forms-HUanZYMa.js → layout-forms-OEX6EIZI.js} +1 -1
- package/dist/storybook/assets/{layout-general-cZuYwo9w.js → layout-general-5JsyiN0y.js} +1 -1
- package/dist/storybook/assets/{list-8l-RGDgw.js → list-A59m58hj.js} +1 -1
- package/dist/storybook/assets/list-heading-30-lMSi6.js +1 -0
- package/dist/storybook/assets/list-heading-dR7AAq04.css +1 -0
- package/dist/storybook/assets/{list.stories-Vp0Dm7UU.js → list.stories-KEz-9qK4.js} +1 -1
- package/dist/storybook/assets/{list.stories-data-IcFu6vvd.js → list.stories-data-9RrIjRci.js} +1 -1
- package/dist/storybook/assets/{menu.stories-VwRF_Pbx.js → menu.stories-5G4phywO.js} +1 -1
- package/dist/storybook/assets/{menu.stories-data-hEz8P1yK.js → menu.stories-data-l5rlcD9_.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-hiHf2mqm.js → padding-and-spacing-WRoDncrO.js} +1 -1
- package/dist/storybook/assets/{popover.stories-b7Tt4S0j.js → popover.stories-bWBLR9fB.js} +1 -1
- package/dist/storybook/assets/{preview-Bf8hRkSt.js → preview-cs0LWnJ3.js} +2 -2
- package/dist/storybook/assets/{preview-4kBDmfJF.js → preview-qy-SmvMW.js} +1 -1
- package/dist/storybook/assets/{projects.stories-YPlCLdRE.js → projects.stories-KKoY-_Zm.js} +1 -1
- package/dist/storybook/assets/{reservoirs.stories-hhPblhmv.js → reservoirs.stories-Mn2wh9hb.js} +1 -1
- package/dist/storybook/assets/{row.stories-rwYo2HUE.js → row.stories-3sV-GlPJ.js} +1 -1
- package/dist/storybook/assets/{side-bar.stories-sxBJCVnV.js → side-bar.stories-0_pud_bN.js} +1 -1
- package/dist/storybook/assets/{site.stories-QHCzFOnt.js → site.stories-mnufwLhH.js} +1 -1
- package/dist/storybook/assets/{spacer.stories-eCrKj4b3.js → spacer.stories-bgTBb3VB.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-NMPM6SWI-uwzTCXOG.js → syntaxhighlighter-NMPM6SWI-C3knRen1.js} +1 -1
- package/dist/storybook/assets/{table.stories-data-4h6h0P0V.js → table.stories-data-hOI1RqVt.js} +1 -1
- package/dist/storybook/assets/{table.stories-Ucds7SzE.js → table.stories-ehvxS8n7.js} +1 -1
- package/dist/storybook/assets/{textarea-8bcldTyf.js → textarea-u-nirfI6.js} +1 -1
- package/dist/storybook/assets/{textarea.stories-D9SctTMD.js → textarea.stories-Hl-oeUWU.js} +1 -1
- package/dist/storybook/assets/{title.stories-Av-27QAk.js → title.stories-zKdbYdoc.js} +1 -1
- package/dist/storybook/assets/{toaster.stories-S25S4g_F.js → toaster.stories--z_U2gRN.js} +1 -1
- package/dist/storybook/assets/{toggle.stories-aVmjpons.js → toggle.stories-HiGs6slZ.js} +1 -1
- package/dist/storybook/assets/{tooltip.test-case.stories-kIeZayHw.js → tooltip.test-case.stories-3T_tzhJs.js} +1 -1
- package/dist/storybook/assets/tree-U4LtpVm9.css +1 -0
- package/dist/storybook/assets/{tree.stories-vBp30uXo.js → tree.stories-STQJGKS2.js} +17 -15
- 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/list-heading-Vd3hu5Pf.js +0 -1
- package/dist/storybook/assets/list-heading-Y8BAUuV6.css +0 -1
- package/dist/storybook/assets/tree-zmq4MRb6.css +0 -1
package/dist/global.css
CHANGED
|
@@ -10950,7 +10950,7 @@ tbody ._staticCell_u3xdj_116 ._staticCellContent_u3xdj_119 {
|
|
|
10950
10950
|
--color-link-border-hover: var(--color-neutral-600);
|
|
10951
10951
|
--border-topbar: 1px solid var(--color-border);
|
|
10952
10952
|
}
|
|
10953
|
-
.
|
|
10953
|
+
._topbar_oyr59_11 {
|
|
10954
10954
|
top: 0;
|
|
10955
10955
|
left: 0;
|
|
10956
10956
|
z-index: var(--zindex-topbar);
|
|
@@ -10960,15 +10960,15 @@ tbody ._staticCell_u3xdj_116 ._staticCellContent_u3xdj_119 {
|
|
|
10960
10960
|
background: var(--color-background-raised);
|
|
10961
10961
|
display: flex;
|
|
10962
10962
|
}
|
|
10963
|
-
.
|
|
10963
|
+
._topbar_oyr59_11._fixed_oyr59_21 {
|
|
10964
10964
|
position: fixed;
|
|
10965
10965
|
}
|
|
10966
10966
|
@media print {
|
|
10967
|
-
.
|
|
10967
|
+
._topbar_oyr59_11 {
|
|
10968
10968
|
display: none !important;
|
|
10969
10969
|
}
|
|
10970
10970
|
}
|
|
10971
|
-
.
|
|
10971
|
+
._appSwitcher_oyr59_29 {
|
|
10972
10972
|
color: white;
|
|
10973
10973
|
display: flex;
|
|
10974
10974
|
align-items: center;
|
|
@@ -10980,26 +10980,26 @@ tbody ._staticCell_u3xdj_116 ._staticCellContent_u3xdj_119 {
|
|
|
10980
10980
|
font-size: var(--size);
|
|
10981
10981
|
position: relative;
|
|
10982
10982
|
}
|
|
10983
|
-
.
|
|
10983
|
+
._appSwitcher_oyr59_29:hover {
|
|
10984
10984
|
background-color: var(--color-neutral-750);
|
|
10985
10985
|
}
|
|
10986
|
-
.
|
|
10986
|
+
._appSwitcher_oyr59_29:active {
|
|
10987
10987
|
background-color: var(--color-neutral-800);
|
|
10988
10988
|
}
|
|
10989
|
-
[data-theme='dark'] .
|
|
10989
|
+
[data-theme='dark'] ._appSwitcher_oyr59_29 {
|
|
10990
10990
|
background-color: var(--color-neutral-900);
|
|
10991
10991
|
}
|
|
10992
|
-
[data-theme='dark'] .
|
|
10992
|
+
[data-theme='dark'] ._appSwitcher_oyr59_29:hover {
|
|
10993
10993
|
background-color: var(--color-neutral-950);
|
|
10994
10994
|
}
|
|
10995
|
-
[data-theme='dark'] .
|
|
10995
|
+
[data-theme='dark'] ._appSwitcher_oyr59_29:active {
|
|
10996
10996
|
background-color: var(--color-neutral-1000);
|
|
10997
10997
|
}
|
|
10998
|
-
.
|
|
10998
|
+
._appSwitcher_oyr59_29 > * {
|
|
10999
10999
|
position: relative;
|
|
11000
11000
|
z-index: 1;
|
|
11001
11001
|
}
|
|
11002
|
-
.
|
|
11002
|
+
._appSwitcher_oyr59_29:after {
|
|
11003
11003
|
content: '';
|
|
11004
11004
|
position: absolute;
|
|
11005
11005
|
inset: 0;
|
|
@@ -11008,13 +11008,13 @@ tbody ._staticCell_u3xdj_116 ._staticCellContent_u3xdj_119 {
|
|
|
11008
11008
|
transition: opacity 0.2s;
|
|
11009
11009
|
opacity: 0.75;
|
|
11010
11010
|
}
|
|
11011
|
-
.
|
|
11011
|
+
._appSwitcher_oyr59_29:hover:after {
|
|
11012
11012
|
opacity: 0.75;
|
|
11013
11013
|
}
|
|
11014
|
-
.
|
|
11014
|
+
._appSwitcher_oyr59_29:active:after {
|
|
11015
11015
|
opacity: 0.5;
|
|
11016
11016
|
}
|
|
11017
|
-
.
|
|
11017
|
+
._title_oyr59_75 {
|
|
11018
11018
|
display: flex;
|
|
11019
11019
|
align-items: center;
|
|
11020
11020
|
justify-content: center;
|
|
@@ -11022,74 +11022,74 @@ tbody ._staticCell_u3xdj_116 ._staticCellContent_u3xdj_119 {
|
|
|
11022
11022
|
padding: 0;
|
|
11023
11023
|
position: relative;
|
|
11024
11024
|
}
|
|
11025
|
-
.
|
|
11026
|
-
.
|
|
11025
|
+
._title_oyr59_75 img,
|
|
11026
|
+
._title_oyr59_75 svg {
|
|
11027
11027
|
max-height: var(--size-lg);
|
|
11028
11028
|
max-width: 300px;
|
|
11029
11029
|
height: auto;
|
|
11030
11030
|
width: auto;
|
|
11031
11031
|
color: var(--color-text);
|
|
11032
11032
|
}
|
|
11033
|
-
.
|
|
11033
|
+
._title_oyr59_75 ._logo_oyr59_91 {
|
|
11034
11034
|
display: flex;
|
|
11035
11035
|
}
|
|
11036
|
-
.
|
|
11036
|
+
._title_oyr59_75 ._label_oyr59_94 {
|
|
11037
11037
|
color: var(--color-text);
|
|
11038
11038
|
white-space: nowrap;
|
|
11039
11039
|
font-weight: bold;
|
|
11040
11040
|
}
|
|
11041
|
-
.
|
|
11041
|
+
._brand_oyr59_99 {
|
|
11042
11042
|
padding: 0;
|
|
11043
11043
|
position: relative;
|
|
11044
11044
|
flex-shrink: 0;
|
|
11045
11045
|
}
|
|
11046
|
-
.
|
|
11046
|
+
._version_oyr59_104 {
|
|
11047
11047
|
line-height: 1;
|
|
11048
11048
|
position: absolute;
|
|
11049
11049
|
right: 0;
|
|
11050
11050
|
bottom: 100%;
|
|
11051
11051
|
font-size: var(--font-size-xs);
|
|
11052
11052
|
}
|
|
11053
|
-
.
|
|
11054
|
-
.
|
|
11053
|
+
._left_oyr59_111,
|
|
11054
|
+
._right_oyr59_112 {
|
|
11055
11055
|
display: flex;
|
|
11056
11056
|
min-width: 0;
|
|
11057
11057
|
}
|
|
11058
|
-
.
|
|
11058
|
+
._left_oyr59_111 {
|
|
11059
11059
|
gap: var(--padding);
|
|
11060
11060
|
padding-left: var(--padding);
|
|
11061
11061
|
}
|
|
11062
|
-
.
|
|
11062
|
+
._right_oyr59_112 {
|
|
11063
11063
|
margin-left: auto;
|
|
11064
11064
|
flex-shrink: 0;
|
|
11065
11065
|
padding-right: var(--padding-xs);
|
|
11066
11066
|
gap: var(--padding-xs);
|
|
11067
11067
|
}
|
|
11068
|
-
.
|
|
11069
|
-
.
|
|
11068
|
+
._item_oyr59_126,
|
|
11069
|
+
._link_oyr59_127 {
|
|
11070
11070
|
align-items: center;
|
|
11071
11071
|
display: flex;
|
|
11072
11072
|
}
|
|
11073
|
-
.
|
|
11073
|
+
._item_oyr59_126 {
|
|
11074
11074
|
position: relative;
|
|
11075
11075
|
transition: background 0.1s ease, box-shadow 0.1s ease, color 0.1s ease;
|
|
11076
|
-
user-select: none;
|
|
11077
11076
|
vertical-align: middle;
|
|
11078
11077
|
min-width: 0;
|
|
11079
11078
|
max-width: 50vw;
|
|
11080
11079
|
}
|
|
11081
|
-
.
|
|
11082
|
-
.
|
|
11080
|
+
._item_oyr59_126._button_oyr59_138,
|
|
11081
|
+
._item_oyr59_126._menu_oyr59_139 {
|
|
11083
11082
|
flex-shrink: 0;
|
|
11084
11083
|
}
|
|
11085
|
-
.
|
|
11084
|
+
._label_oyr59_94 {
|
|
11086
11085
|
text-overflow: ellipsis;
|
|
11087
11086
|
white-space: nowrap;
|
|
11088
11087
|
overflow: hidden;
|
|
11089
11088
|
display: block;
|
|
11090
11089
|
max-width: 100%;
|
|
11090
|
+
user-select: none;
|
|
11091
11091
|
}
|
|
11092
|
-
.
|
|
11092
|
+
._link_oyr59_127 {
|
|
11093
11093
|
text-decoration: none;
|
|
11094
11094
|
color: var(--color-text-primary);
|
|
11095
11095
|
cursor: pointer;
|
|
@@ -11097,24 +11097,24 @@ tbody ._staticCell_u3xdj_116 ._staticCellContent_u3xdj_119 {
|
|
|
11097
11097
|
height: 100%;
|
|
11098
11098
|
font-size: var(--font-size-lg);
|
|
11099
11099
|
}
|
|
11100
|
-
.
|
|
11100
|
+
._link_oyr59_127 svg {
|
|
11101
11101
|
margin-right: var(--padding-xxs);
|
|
11102
11102
|
flex-shrink: 0;
|
|
11103
11103
|
}
|
|
11104
|
-
.
|
|
11104
|
+
._link_oyr59_127:hover {
|
|
11105
11105
|
color: var(--color-text-primary-hover);
|
|
11106
11106
|
}
|
|
11107
|
-
.
|
|
11107
|
+
._link_oyr59_127:active {
|
|
11108
11108
|
color: var(--color-text-primary-active);
|
|
11109
11109
|
}
|
|
11110
|
-
.
|
|
11110
|
+
._link_oyr59_127._active_oyr59_168 {
|
|
11111
11111
|
color: var(--color-text);
|
|
11112
11112
|
}
|
|
11113
|
-
.
|
|
11114
|
-
.
|
|
11113
|
+
._link_oyr59_127:hover,
|
|
11114
|
+
._link_oyr59_127._active_oyr59_168 {
|
|
11115
11115
|
background-color: transparent;
|
|
11116
11116
|
}
|
|
11117
|
-
.
|
|
11117
|
+
._link_oyr59_127:after {
|
|
11118
11118
|
content: '';
|
|
11119
11119
|
position: absolute;
|
|
11120
11120
|
left: 0;
|
|
@@ -11122,17 +11122,17 @@ tbody ._staticCell_u3xdj_116 ._staticCellContent_u3xdj_119 {
|
|
|
11122
11122
|
bottom: 0;
|
|
11123
11123
|
border-bottom: 1px solid transparent;
|
|
11124
11124
|
}
|
|
11125
|
-
.
|
|
11125
|
+
._link_oyr59_127:hover:after {
|
|
11126
11126
|
border-color: var(--color-link-border-hover);
|
|
11127
11127
|
}
|
|
11128
|
-
.
|
|
11128
|
+
._link_oyr59_127._active_oyr59_168:after {
|
|
11129
11129
|
border-color: var(--color-background-primary);
|
|
11130
11130
|
}
|
|
11131
|
-
.
|
|
11131
|
+
._link_oyr59_127[disabled] {
|
|
11132
11132
|
pointer-events: none;
|
|
11133
11133
|
color: var(--color-text-faint);
|
|
11134
11134
|
}
|
|
11135
|
-
.
|
|
11135
|
+
._alert_oyr59_193 {
|
|
11136
11136
|
background-color: var(--color-background-primary);
|
|
11137
11137
|
color: white;
|
|
11138
11138
|
text-align: center;
|
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-LV8D_yOA.js"></script><link rel="stylesheet" crossorigin href="/react-ui-library/assets/index-qXNVhovK.css"></head><body><div id="content"></div></body>
|
package/dist/index.js
CHANGED
|
@@ -57999,22 +57999,22 @@ const Toggle = ({
|
|
|
57999
57999
|
}
|
|
58000
58000
|
);
|
|
58001
58001
|
};
|
|
58002
|
-
const topbar = "
|
|
58003
|
-
const fixed = "
|
|
58004
|
-
const appSwitcher = "
|
|
58005
|
-
const title = "
|
|
58006
|
-
const logo = "
|
|
58007
|
-
const label = "
|
|
58008
|
-
const brand = "
|
|
58009
|
-
const version = "
|
|
58010
|
-
const left = "
|
|
58011
|
-
const right = "
|
|
58012
|
-
const item = "
|
|
58013
|
-
const link = "
|
|
58014
|
-
const button = "
|
|
58015
|
-
const menu = "
|
|
58016
|
-
const active = "
|
|
58017
|
-
const alert = "
|
|
58002
|
+
const topbar = "_topbar_oyr59_11";
|
|
58003
|
+
const fixed = "_fixed_oyr59_21";
|
|
58004
|
+
const appSwitcher = "_appSwitcher_oyr59_29";
|
|
58005
|
+
const title = "_title_oyr59_75";
|
|
58006
|
+
const logo = "_logo_oyr59_91";
|
|
58007
|
+
const label = "_label_oyr59_94";
|
|
58008
|
+
const brand = "_brand_oyr59_99";
|
|
58009
|
+
const version = "_version_oyr59_104";
|
|
58010
|
+
const left = "_left_oyr59_111";
|
|
58011
|
+
const right = "_right_oyr59_112";
|
|
58012
|
+
const item = "_item_oyr59_126";
|
|
58013
|
+
const link = "_link_oyr59_127";
|
|
58014
|
+
const button = "_button_oyr59_138";
|
|
58015
|
+
const menu = "_menu_oyr59_139";
|
|
58016
|
+
const active = "_active_oyr59_168";
|
|
58017
|
+
const alert = "_alert_oyr59_193";
|
|
58018
58018
|
const styles$3 = {
|
|
58019
58019
|
topbar,
|
|
58020
58020
|
fixed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as M,e as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-4EAjrsuB.js";import{R as h,r as b,g as fe}from"./index-RfLt4OUa.js";import{b as Oe,c as J,d as Ie}from"./index-gM75B7fB.js";import"./iframe-3oJ7qbsB.js";import"../sb-preview/runtime.js";import"./index-miLrID2P.js";import"./extends-dGVwEr9R.js";import"./assertThisInitialized-4q6YPdh3.js";import"./inheritsLoose-Y9jOMJLd.js";function $(){return($=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Q(e,t){if(e==null)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},j=function(e){return"touches"in e},V=function(e){return e&&e.ownerDocument.defaultView||self},ne=function(e,t,n){var r=e.getBoundingClientRect(),o=j(t)?function(a,s){for(var l=0;l<a.length;l++)if(a[l].identifier===s)return a[l];return a[0]}(t.touches,n):t;return{left:S((o.pageX-(r.left+V(e).pageXOffset))/r.width),top:S((o.pageY-(r.top+V(e).pageYOffset))/r.height)}},re=function(e){!j(e)&&e.preventDefault()},Z=h.memo(function(e){var t=e.onMove,n=e.onKey,r=Q(e,["onMove","onKey"]),o=b.useRef(null),a=K(t),s=K(n),l=b.useRef(null),i=b.useRef(!1),c=b.useMemo(function(){var k=function(p){re(p),(j(p)?p.touches.length>0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s<n&&(n=s,r=o)}return r};u.keyword.rgb=function(e){return F[e]};u.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function Ze(e){const t=Qe(),n=[e];for(t[e].distance=0;n.length;){const r=n.pop(),o=Object.keys(B[r]);for(let a=o.length,s=0;s<a;s++){const l=o[s],i=t[l];i.distance===-1&&(i.distance=t[r].distance+1,i.parent=r,n.unshift(l))}}return t}function et(e,t){return function(n){return t(e(n))}}function tt(e,t){const n=[t[e].parent,e];let r=B[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),r=et(B[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}var nt=function(e){const t=Ze(e),n={},r=Object.keys(t);for(let o=r.length,a=0;a<o;a++){const s=r[a];t[s].parent!==null&&(n[s]=tt(s,t))}return n};const U=_e,rt=nt,O={},ot=Object.keys(U);function at(e){const t=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s<a;s++)o[s]=Math.round(o[s]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}ot.forEach(e=>{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},hn=tn;export{tn as ColorControl,hn as default};
|
|
1
|
+
import{n as M,e as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-YJcqKE3A.js";import{R as h,r as b,g as fe}from"./index-RfLt4OUa.js";import{b as Oe,c as J,d as Ie}from"./index-gM75B7fB.js";import"./iframe-_9SeMvPT.js";import"../sb-preview/runtime.js";import"./index-miLrID2P.js";import"./extends-dGVwEr9R.js";import"./assertThisInitialized-4q6YPdh3.js";import"./inheritsLoose-Y9jOMJLd.js";function $(){return($=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Q(e,t){if(e==null)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},j=function(e){return"touches"in e},V=function(e){return e&&e.ownerDocument.defaultView||self},ne=function(e,t,n){var r=e.getBoundingClientRect(),o=j(t)?function(a,s){for(var l=0;l<a.length;l++)if(a[l].identifier===s)return a[l];return a[0]}(t.touches,n):t;return{left:S((o.pageX-(r.left+V(e).pageXOffset))/r.width),top:S((o.pageY-(r.top+V(e).pageYOffset))/r.height)}},re=function(e){!j(e)&&e.preventDefault()},Z=h.memo(function(e){var t=e.onMove,n=e.onKey,r=Q(e,["onMove","onKey"]),o=b.useRef(null),a=K(t),s=K(n),l=b.useRef(null),i=b.useRef(!1),c=b.useMemo(function(){var k=function(p){re(p),(j(p)?p.touches.length>0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s<n&&(n=s,r=o)}return r};u.keyword.rgb=function(e){return F[e]};u.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function Ze(e){const t=Qe(),n=[e];for(t[e].distance=0;n.length;){const r=n.pop(),o=Object.keys(B[r]);for(let a=o.length,s=0;s<a;s++){const l=o[s],i=t[l];i.distance===-1&&(i.distance=t[r].distance+1,i.parent=r,n.unshift(l))}}return t}function et(e,t){return function(n){return t(e(n))}}function tt(e,t){const n=[t[e].parent,e];let r=B[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),r=et(B[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}var nt=function(e){const t=Ze(e),n={},r=Object.keys(t);for(let o=r.length,a=0;a<o;a++){const s=r[a];t[s].parent!==null&&(n[s]=tt(s,t))}return n};const U=_e,rt=nt,O={},ot=Object.keys(U);function at(e){const t=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s<a;s++)o[s]=Math.round(o[s]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}ot.forEach(e=>{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},hn=tn;export{tn as ColorControl,hn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D,d as c}from"./chunk-HLWAVYOI-
|
|
1
|
+
import{D,d as c}from"./chunk-HLWAVYOI-2SmvXyKU.js";import"./iframe-_9SeMvPT.js";import"../sb-preview/runtime.js";import"./index-RfLt4OUa.js";import"./react-16-hgR7FrAp.js";import"./index-miLrID2P.js";import"./index-YJcqKE3A.js";import"./extends-dGVwEr9R.js";import"./assertThisInitialized-4q6YPdh3.js";import"./inheritsLoose-Y9jOMJLd.js";import"./index-gM75B7fB.js";export{D as DocsRenderer,c as defaultComponents};
|
package/dist/storybook/assets/{WithTooltip-4HIR6TLV-QS6Mj2Xl.js → WithTooltip-4HIR6TLV-X2fcxccp.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as h,W as l,a as s}from"./index-
|
|
1
|
+
import{W as h,W as l,a as s}from"./index-YJcqKE3A.js";import"./iframe-_9SeMvPT.js";import"../sb-preview/runtime.js";import"./index-RfLt4OUa.js";import"./index-miLrID2P.js";import"./extends-dGVwEr9R.js";import"./assertThisInitialized-4q6YPdh3.js";import"./inheritsLoose-Y9jOMJLd.js";import"./index-gM75B7fB.js";export{h as WithToolTipState,l as WithTooltip,s as WithTooltipPure};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as l}from"./index-RfLt4OUa.js";import{I as F}from"./common-types-U65vzrrz.js";import{T as w}from"./top-bar-9iOkm7Gq.js";import{S as C}from"./side-bar-Fjr2t9MT.js";import{H as n}from"./heading-Bk0bpNfe.js";import{B as s}from"./button-7V8oA22w.js";import{D as I}from"./drawer-WuErQ5Z8.js";import{L as T}from"./list-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as l}from"./index-RfLt4OUa.js";import{I as F}from"./common-types-U65vzrrz.js";import{T as w}from"./top-bar-9iOkm7Gq.js";import{S as C}from"./side-bar-Fjr2t9MT.js";import{H as n}from"./heading-Bk0bpNfe.js";import{B as s}from"./button-7V8oA22w.js";import{D as I}from"./drawer-WuErQ5Z8.js";import{L as T}from"./list-A59m58hj.js";import{F as i}from"./field-eknsj_Ll.js";import{I as d}from"./input-u1He-wWs.js";import{A as E}from"./accordion-6_27SROY.js";import{C as a}from"./check-box-LZdXXKhv.js";import{F as p}from"./form-row-bwoDTUga.js";import{P as R}from"./page-9-f6BzS0.js";import{R as A,C as B}from"./row-vFUhHoz5.js";import{S as m}from"./select-JjEPivho.js";import{S as u}from"./spacer-Yji9g2AW.js";import{T as k}from"./tabs-fcLbHC1n.js";import{I as L}from"./input-group-R8LoqKRn.js";import{I as U}from"./input-group-addon-BHVsW9mL.js";import"./index-VW3EWkuE.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";import"./actions-Z9jDWreP.js";import"./lodash-Bmg8FrMx.js";import"./tooltip-HEHiU__l.js";import"./index-miLrID2P.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";import"./index-ugi_ZH6T.js";import"./help-icon--rUDxLUD.js";import"./spinner-R8Il4aRe.js";import"./index.es-JXn3JM7k.js";import"./extends-dGVwEr9R.js";import"./redux-F5dueAP3.js";import"./objectSpread2-93s0nBry.js";import"./memoize-one.esm-hqe5SRxC.js";import"./card-0r8RRVk-.js";import"./list-heading-30-lMSi6.js";import"./loader-TGOJBZQG.js";import"./label-0_Qf6I8t.js";import"./styled-components.browser.esm-qIipjd6c.js";import"./assertThisInitialized-4q6YPdh3.js";import"./text-6KQ6ntOV.js";import"./select.input-zP5tW20f.js";const c=[{label:"Settings",value:"settings"},{label:"Simulation Results",value:"results"}],H=["30, Conductor, Casing","20, Surface, Casing","13 3/8, Intermediate, Casing","11 3/4, Surface, Casing","9 5/8, Production, Casing"],ke={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},t=()=>{const[r,g]=l.useState(!0),[f,j]=l.useState(c[0]);return e.jsxs(e.Fragment,{children:[e.jsx(w,{}),e.jsx(C,{options:{title:"",sections:[]}}),e.jsx(R,{padding:!1,scroll:!1,children:e.jsxs(A,{spacing:0,height:"100%",children:[e.jsx(I,{button:e.jsx(s,{onClick:()=>g(!r),round:!0,icon:F.CHEVRON_LEFT}),open:r,width:300,closedWidth:"var(--size-sidebar)",children:e.jsx(T,{drawer:!0,narrow:!r,list:{name:"AFE Simulation",items:[{id:1,name:"Simulation name here",active:!0},{id:2,name:"Ipsum"}]}})}),e.jsxs(B,{scroll:!0,padding:!0,borderLeft:!0,children:[e.jsx(n,{top:!0,children:"Simulation name here"}),e.jsx(k,{options:c,value:f,onChange:o=>{const{value:v,label:S}=o.target;j({value:v,label:S})},margin:0}),e.jsx(u,{}),e.jsxs(p,{children:[e.jsx(i,{label:"Name",children:e.jsx(d,{value:"Simulation name here",width:"200px"})}),e.jsx(i,{label:"Initial condition",children:e.jsx(m,{options:[{label:"E3 - Circulation through drillpipe",value:"e3"}],value:{label:"E3 - Circulation through drillpipe",value:"e3"},native:!0})})]}),H.map(o=>e.jsxs("div",{children:[e.jsx(E,{heading:e.jsx(n,{children:o}),managed:!0,bordered:!0,children:e.jsxs(p,{children:[e.jsx(i,{label:"Leak off @TVD 425",children:e.jsx(a,{label:"Use formation data",checked:!0})}),e.jsx(i,{children:e.jsxs(L,{children:[e.jsx(d,{width:"200px",disabled:!0,value:"1.532142857142857"}),e.jsx(U,{children:"m"})]})}),e.jsx(i,{children:e.jsx(a,{label:"Gas cap"})}),e.jsx(i,{children:e.jsx(a,{label:"Max allowable pressure buildup"})})]})}),e.jsx(u,{})]},o)),e.jsx(i,{label:"Final condition",children:e.jsx(m,{options:[{label:"Undisturbed",value:"Undisturbed"}],value:{label:"Undisturbed",value:"Undisturbed"},native:!0,width:"auto"})}),e.jsx(s,{label:"Simulate",colored:!0})]})]})})]})};var h,b,x;t.parameters={...t.parameters,docs:{...(h=t.parameters)==null?void 0:h.docs,source:{originalSource:`() => {
|
|
2
2
|
const [open, setOpen] = useState(true);
|
|
3
3
|
const [selectedTab, setSelectedTab] = useState(options[0]);
|
|
4
4
|
return <>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{F as nr}from"./flex-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{F as nr}from"./flex-3eLDDUyy.js";import{B as o,a as cr}from"./button-7V8oA22w.js";import"./index-RfLt4OUa.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./spinner-R8Il4aRe.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-HEHiU__l.js";import"./index-miLrID2P.js";const hr={title:"Forms/Button",component:o,parameters:{canvas:{page:null}},argTypes:{colored:{control:{type:"inline-radio"},options:{off:!1,primary:"primary",success:"success",danger:"danger",muted:"muted"}},icon:{control:{type:"inline-radio"},options:{off:void 0,on:"delete"}}},args:{label:"Label"}},r=x=>e.jsxs(nr,{gap:"var(--padding-sm)",children:[e.jsx(o,{...x}),e.jsx(o,{colored:!0,...x}),e.jsx(o,{colored:"success",...x}),e.jsx(o,{colored:"danger",...x})]}),F=r.bind({}),s=r.bind({});s.args={small:!0};const a=r.bind({});a.args={basic:!0};const t=r.bind({});t.args={active:!0};const n=r.bind({});n.args={disabled:!0};const c=r.bind({});c.args={icon:"delete"};const d=r.bind({});d.args={round:!0,icon:"delete",label:void 0};const l=r.bind({});l.args={round:!0,icon:"delete",label:void 0,colored:"muted",basic:!0};const u=r.bind({});u.args={width:"100%"};const g=r.bind({});g.args={type:cr.SUBMIT};const p=r.bind({});p.args={label:"Lorem ipsum dolor est compendum",width:"100px",small:!0};const i=r.bind({});i.args={tooltip:"Tooltip goes here"};const m=r.bind({});m.args={label:"Long label goes here lorem ipsum dolor est lorem ipsum",width:"200px"};const B=r.bind({});B.args={label:"Long label goes here lorem ipsum dolor est lorem ipsum",width:"200px",small:!0};var b,S,v;F.parameters={...F.parameters,docs:{...(b=F.parameters)==null?void 0:b.docs,source:{originalSource:`args => <Flex gap="var(--padding-sm)">
|
|
2
2
|
<Button {...args} />
|
|
3
3
|
<Button colored {...args} />
|
|
4
4
|
<Button colored="success" {...args} />
|
package/dist/storybook/assets/{buttons-and-links-8jrNvUVe.js → buttons-and-links-CPHN2f_R.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./jsx-runtime-FsUICBgo.js";import{M as s,C as e}from"./index-
|
|
1
|
+
import{j as t}from"./jsx-runtime-FsUICBgo.js";import{M as s,C as e}from"./index-YJcqKE3A.js";import{Default as a,Basic as c}from"./button.stories-f6VcbEgi.js";import{Default as d}from"./text-link.stories-kjfUeFtk.js";import{useMDXComponents as r}from"./index-4YXVTraW.js";import"./index-RfLt4OUa.js";import"./iframe-_9SeMvPT.js";import"../sb-preview/runtime.js";import"./index-miLrID2P.js";import"./extends-dGVwEr9R.js";import"./assertThisInitialized-4q6YPdh3.js";import"./inheritsLoose-Y9jOMJLd.js";import"./index-gM75B7fB.js";import"./flex-3eLDDUyy.js";import"./button-7V8oA22w.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./spinner-R8Il4aRe.js";import"./icon-y1a2N5SZ.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-HEHiU__l.js";import"./text-6KQ6ntOV.js";function i(n){const o=Object.assign({h1:"h1",h2:"h2",p:"p",code:"code"},r(),n.components);return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Buttons & Links"}),`
|
|
2
2
|
`,t.jsx(o.h1,{id:"buttons--links",children:"Buttons & Links"}),`
|
|
3
3
|
`,t.jsx(e,{of:a}),`
|
|
4
4
|
`,t.jsx(o.h2,{id:"a-single-primary-button",children:"A single primary button"}),`
|
package/dist/storybook/assets/{casing-loads.stories-wK86cYgL.js → casing-loads.stories-leLrg-rI.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as u}from"./index-RfLt4OUa.js";import{I as f}from"./common-types-U65vzrrz.js";import{T}from"./top-bar-9iOkm7Gq.js";import{S as I}from"./side-bar-Fjr2t9MT.js";import{H as r}from"./heading-Bk0bpNfe.js";import{B as n}from"./button-7V8oA22w.js";import{D as g}from"./drawer-WuErQ5Z8.js";import{L as O}from"./list-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as u}from"./index-RfLt4OUa.js";import{I as f}from"./common-types-U65vzrrz.js";import{T}from"./top-bar-9iOkm7Gq.js";import{S as I}from"./side-bar-Fjr2t9MT.js";import{H as r}from"./heading-Bk0bpNfe.js";import{B as n}from"./button-7V8oA22w.js";import{D as g}from"./drawer-WuErQ5Z8.js";import{L as O}from"./list-A59m58hj.js";import{F as a}from"./field-eknsj_Ll.js";import{I as o}from"./input-u1He-wWs.js";import{M as D,D as E}from"./dialog-WKHRZcjc.js";import{C as H}from"./check-box-LZdXXKhv.js";import{F as p}from"./form-row-bwoDTUga.js";import{P as k}from"./page-9-f6BzS0.js";import{R as y,C as R}from"./row-vFUhHoz5.js";import{S as d}from"./select-JjEPivho.js";import{S as l}from"./spacer-Yji9g2AW.js";import{T as B}from"./tabs-fcLbHC1n.js";import{T as M}from"./table-kE2ngWkK.js";import"./index-VW3EWkuE.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";import"./actions-Z9jDWreP.js";import"./lodash-Bmg8FrMx.js";import"./tooltip-HEHiU__l.js";import"./index-miLrID2P.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";import"./index-ugi_ZH6T.js";import"./help-icon--rUDxLUD.js";import"./spinner-R8Il4aRe.js";import"./index.es-JXn3JM7k.js";import"./extends-dGVwEr9R.js";import"./redux-F5dueAP3.js";import"./objectSpread2-93s0nBry.js";import"./memoize-one.esm-hqe5SRxC.js";import"./card-0r8RRVk-.js";import"./list-heading-30-lMSi6.js";import"./loader-TGOJBZQG.js";import"./label-0_Qf6I8t.js";import"./portal-zPiHHKoC.js";import"./styled-components.browser.esm-qIipjd6c.js";import"./assertThisInitialized-4q6YPdh3.js";import"./text-6KQ6ntOV.js";import"./select.input-zP5tW20f.js";import"./pagination-5n5spTRo.js";import"./input-group-R8LoqKRn.js";import"./input-group-addon-BHVsW9mL.js";import"./number-input-ToRtRoDB.js";import"./index-qZmQ7nA9.js";import"./index-cCpkwrS5.js";import"./slider-nl2rJ9LF.js";import"./popover-Y3FpGdUS.js";const ze={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},s=()=>{const[v,i]=u.useState(!1),C=()=>e.jsx("div",{style:{color:"#aaa",display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",overflow:"hidden",top:0,left:0,right:0,bottom:0},children:"SCHEMATIC"}),m=[{label:"Casing Loads",value:"casingloads"},{label:"Plot Charts",value:"charts"}],j={name:"Casing Loads",items:[{id:1,name:"Sections",type:"Heading"},{id:2,name:'30" Conductor Casing',active:!0},{id:3,name:"Ipsum"},{id:4,name:"Dolor"}]},L={columnWidths:["auto","auto","auto","auto","1%"],headers:[{cells:[{value:"Load case name"},{value:"Internal profile"},{value:"External profile"},{value:"Temperature profile"},{value:""}]}],rows:[{cells:[{value:"Load case 1"},{value:"Profile 1"},{value:"Profile 2"},{value:"Profile 3"},{value:"Edit",type:"Link",onClick:()=>i(!0)}]},{cells:[{value:"Load case 2"},{value:"Profile 1"},{value:"Profile 2"},{value:"Profile 3"},{value:"Edit",type:"Link",onClick:()=>i(!0)}]}]},F=()=>e.jsxs(e.Fragment,{children:[e.jsx(a,{label:"Name",children:e.jsx(o,{value:"Load case 1"})}),e.jsx(l,{}),e.jsx(r,{children:"Internal Profile"}),e.jsx(l,{}),e.jsxs(p,{children:[e.jsx(a,{label:"Profile",children:e.jsx(d,{native:!0,width:"auto",options:[{label:"Profile 1",value:"1"},{label:"Profile 2",value:"2"}]})}),e.jsx(a,{label:"Influx depth",children:e.jsx(o,{})}),e.jsx(a,{label:"Gas gradient",children:e.jsx(o,{})}),e.jsx(a,{label:"Mud weight",children:e.jsx(o,{})}),e.jsx(a,{label:"Input n",children:e.jsx(o,{})}),e.jsx(a,{children:e.jsx(H,{label:"Limit gas at shoe"})})]}),e.jsx(l,{}),e.jsx(r,{children:"External Profile"}),e.jsx(l,{}),e.jsxs(p,{children:[e.jsx(a,{label:"Profile",children:e.jsx(d,{native:!0,width:"auto",options:[{label:"Profile 1",value:"1"},{label:"Profile 2",value:"2"}]})}),e.jsx(a,{label:"FG above TOC",children:e.jsx(o,{})}),e.jsx(a,{label:"FG below TOC",children:e.jsx(o,{})})]}),e.jsx(l,{}),e.jsx(r,{children:"Temperature Profile"}),e.jsx(l,{}),e.jsxs(p,{children:[e.jsx(a,{label:"Profile",children:e.jsx(d,{native:!0,width:"auto",options:[{label:"Profile 1",value:"1"},{label:"Profile 2",value:"2"}]})}),e.jsx(a,{label:"Custome table",children:e.jsx(d,{native:!0,width:"auto",options:[{label:"Custome table 1",value:"1"},{label:"Custome table 2",value:"2"}]})})]})]}),P=()=>{const[t,c]=u.useState(!0);return e.jsx(g,{button:e.jsx(n,{onClick:()=>c(!t),round:!0,icon:f.CHEVRON_LEFT}),open:t,width:300,closedWidth:"var(--size-sidebar)",children:e.jsx(O,{drawer:!0,narrow:!t,list:j})})},w=()=>{const[t,c]=u.useState(!0);return e.jsx(g,{right:!0,background:"white",button:e.jsx(n,{onClick:()=>c(!t),round:!0,icon:f.CHEVRON_RIGHT}),open:t,width:300,closedWidth:"var(--size-sidebar)",children:e.jsx(C,{})})},S=()=>e.jsx(D,{visible:v,children:e.jsx(E,{dialog:{heading:"Load case 1",content:e.jsx(F,{}),footer:e.jsxs(e.Fragment,{children:[e.jsx(n,{label:"Save",colored:!0,onClick:()=>i(!1)}),e.jsx(n,{label:"Cancel",onClick:()=>i(!1)})]}),onClose:()=>i(!1)}})});return e.jsxs(e.Fragment,{children:[e.jsx(T,{}),e.jsx(I,{options:{title:"",sections:[]}}),e.jsx(k,{padding:!1,scroll:!1,children:e.jsxs(y,{spacing:0,flex:!0,children:[e.jsx(P,{}),e.jsxs(R,{borderLeft:!0,borderRight:!0,padding:!0,scroll:!0,children:[e.jsx(r,{top:!0,marginBottom:0,children:'30" Conductor Casing'}),e.jsx(B,{margin:!1,options:m,value:m[0]}),e.jsx(l,{}),e.jsx(M,{table:L})]}),e.jsx(w,{})]})}),e.jsx(S,{})]})};var b,h,x;s.parameters={...s.parameters,docs:{...(b=s.parameters)==null?void 0:b.docs,source:{originalSource:`() => {
|
|
2
2
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
3
3
|
const SchematicPlaceholder = () => <div style={{
|
|
4
4
|
color: '#aaa',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as D}from"./index-RfLt4OUa.js";import{T as W}from"./table-kE2ngWkK.js";import{F as ze}from"./field-eknsj_Ll.js";import{B as F}from"./button-7V8oA22w.js";import{I as Xe}from"./input-u1He-wWs.js";import{F as Ge}from"./flex-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as D}from"./index-RfLt4OUa.js";import{T as W}from"./table-kE2ngWkK.js";import{F as ze}from"./field-eknsj_Ll.js";import{B as F}from"./button-7V8oA22w.js";import{I as Xe}from"./input-u1He-wWs.js";import{F as Ge}from"./flex-3eLDDUyy.js";import{t as Ke,s as Ne,u as Qe,v as Ve,w as Ye,x as Ze,y as $e,z as er,A as rr,B as ar,C as sr,D as tr,E as qe,F as or,G as nr,H as lr,I as ir,J as pr}from"./table.stories-data-hOI1RqVt.js";import"./index-VW3EWkuE.js";import"./index.es-JXn3JM7k.js";import"./inheritsLoose-Y9jOMJLd.js";import"./extends-dGVwEr9R.js";import"./redux-F5dueAP3.js";import"./objectSpread2-93s0nBry.js";import"./index-miLrID2P.js";import"./memoize-one.esm-hqe5SRxC.js";import"./icon-y1a2N5SZ.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";import"./lodash-Bmg8FrMx.js";import"./actions-Z9jDWreP.js";import"./common-types-U65vzrrz.js";import"./tooltip-HEHiU__l.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";import"./heading-Bk0bpNfe.js";import"./help-icon--rUDxLUD.js";import"./pagination-5n5spTRo.js";import"./select-JjEPivho.js";import"./assertThisInitialized-4q6YPdh3.js";import"./text-6KQ6ntOV.js";import"./select.input-zP5tW20f.js";import"./input-group-R8LoqKRn.js";import"./input-group-addon-BHVsW9mL.js";import"./number-input-ToRtRoDB.js";import"./index-qZmQ7nA9.js";import"./index-cCpkwrS5.js";import"./check-box-LZdXXKhv.js";import"./slider-nl2rJ9LF.js";import"./index-ugi_ZH6T.js";import"./popover-Y3FpGdUS.js";import"./label-0_Qf6I8t.js";import"./spinner-R8Il4aRe.js";const ra={title:"Basic/Table/Cell",component:W,args:{table:{...Ke}}},r=t=>e.jsx(W,{...t}),d=r.bind({});d.args={table:Ne};const m=r.bind({});m.args={table:Qe};const u=r.bind({});u.args={table:Ve};const b=r.bind({});b.args={table:Ye};const g=r.bind({});g.args={table:Ze};const v=r.bind({});v.args={table:$e};const x=r.bind({});x.args={table:er};const C=r.bind({});C.args={table:rr};const h=r.bind({});h.args={table:ar};const S=r.bind({});S.args={table:sr};const f=r.bind({});f.args={table:tr};const j=r.bind({});j.args={table:qe};const y=r.bind({});y.args={table:or};const T=r.bind({});T.args={table:nr};const k=r.bind({});k.args={table:lr};const l=r.bind({});l.args={table:ir};l.parameters={docs:{description:{story:"Setting `breakWord: true` on a cell will allow very long text strings to break"}}};const w=()=>{const t=["Section","Width","Height"];let p=["","m","m"],A=[...Array(10).keys()].map((n,a)=>[a,a*2,a*2]);const B=()=>{const n=({close:s,value:P})=>e.jsxs(e.Fragment,{children:[e.jsx(ze,{label:"Input",children:e.jsx(Xe,{value:P,width:"100%"})}),e.jsxs(Ge,{gap:!0,children:[e.jsx(F,{colored:!0,label:"Save",onClick:()=>{}}),e.jsx(F,{label:"Cancel",onClick:s})]})]}),a={fixedWidth:"100%",headers:[{cells:t.map(s=>({value:s}))},{cells:[{},{menu:[{label:"m",value:"m"},{label:"ft",value:"ft"}],value:p[1],type:"Unit"},{menu:[{label:"m",value:"m"},{label:"ft",value:"ft"}],value:p[2],type:"Unit"}]}],rows:A.map((s,P)=>({cells:[...Array(3).keys()].map((o,c)=>({value:s[c],type:"Popover",content:e.jsx(n,{value:s[c]})}))}))};return e.jsx(W,{table:a})};return e.jsx(B,{})},I=()=>{const t=["Section","Width","Height"];let p=["","m","m"],A=[...Array(10).keys()].map((n,a)=>[a,a*2,a*2]);const B=()=>{const[n,a]=D.useState(!1),s=({close:o,value:c})=>{D.useEffect(()=>{n||a(!0)},[]);const E=()=>{a(!1),o()};return e.jsxs(e.Fragment,{children:[e.jsx(ze,{label:"Input",children:e.jsx(Xe,{value:c,width:"100%"})}),e.jsxs(Ge,{gap:!0,children:[e.jsx(F,{colored:!0,label:"Save",onClick:E}),e.jsx(F,{label:"Cancel",onClick:E})]})]})},P={headers:[{cells:t.map(o=>({value:o}))},{cells:[{},{menu:[{label:"m",value:"m"},{label:"ft",value:"ft"}],value:p[1],type:"Unit"},{menu:[{label:"m",value:"m"},{label:"ft",value:"ft"}],value:p[2],type:"Unit"}]}],rows:A.map((o,c)=>({cells:[...Array(3).keys()].map((E,U)=>({value:o[U],type:"Popover",disabled:n,closeOnOutsideClick:!1,content:e.jsx(s,{value:o[U]})}))}))};return e.jsx(W,{table:P})};return e.jsx(B,{})},O=r.bind({});O.args={table:pr};const i=r.bind({});i.args={table:{...qe,name:"Food"}};i.decorators=[t=>e.jsx("div",{style:{width:180,height:180,overflow:"hidden",resize:"both"},children:e.jsx(t,{})})];var L,R,H;d.parameters={...d.parameters,docs:{...(L=d.parameters)==null?void 0:L.docs,source:{originalSource:`args => {
|
|
2
2
|
return <Table
|
|
3
3
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
4
4
|
{...args} />;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i}from"./iframe-
|
|
1
|
+
import{_ as i}from"./iframe-_9SeMvPT.js";import{R as t,r as p}from"./index-RfLt4OUa.js";import{r as l,u}from"./react-16-hgR7FrAp.js";import{b as h,A as E,H as d,D as x}from"./index-YJcqKE3A.js";var D={code:h,a:E,...d},_=class extends p.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r){let{showException:e}=this.props;e(r)}render(){let{hasError:r}=this.state,{children:e}=this.props;return r?null:t.createElement(t.Fragment,null,e)}},R=class{constructor(){this.render=async(r,e,o)=>{let n={...D,...e==null?void 0:e.components},s=x;return new Promise((a,m)=>{i(()=>import("./index-4YXVTraW.js"),__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:c})=>l(t.createElement(_,{showException:m,key:Math.random()},t.createElement(c,{components:n},t.createElement(s,{context:r,docsParameter:e}))),o)).then(()=>a())})},this.unmount=r=>{u(r)}}};export{R as D,D as d};
|
|
2
2
|
function __vite__mapDeps(indexes) {
|
|
3
3
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
4
4
|
__vite__mapDeps.viteFileDeps = ["./index-4YXVTraW.js","./index-RfLt4OUa.js"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./jsx-runtime-FsUICBgo.js";import"./chunk-HLWAVYOI-
|
|
1
|
+
import{j as o}from"./jsx-runtime-FsUICBgo.js";import"./chunk-HLWAVYOI-2SmvXyKU.js";import{M as d}from"./index-YJcqKE3A.js";import{r as p}from"./index-RfLt4OUa.js";import{t as m,T as x}from"./toaster-eOozfa7U.js";import{useMDXComponents as i}from"./index-4YXVTraW.js";import"./iframe-_9SeMvPT.js";import"../sb-preview/runtime.js";import"./react-16-hgR7FrAp.js";import"./index-miLrID2P.js";import"./extends-dGVwEr9R.js";import"./assertThisInitialized-4q6YPdh3.js";import"./inheritsLoose-Y9jOMJLd.js";import"./index-gM75B7fB.js";import"./message-uMHaTEXV.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./icon-y1a2N5SZ.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";const h=["--color-text","--color-text-muted","--color-text-faint","--color-text-error","--color-text-warning","--color-text-success","--color-text-info","--color-text-primary","--color-text-primary-hover","--color-text-primary-active"],u=["--color-background","--color-background-raised","--color-background-primary","--color-background-info","--color-background-warning","--color-background-success","--color-background-error"],g=["--color-border","--color-border-error","--color-border-warning","--color-border-focus"],t=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950],j=t.map(r=>`--color-neutral-${r}`),b=t.map(r=>`--color-primary-${r}`),f=t.map(r=>`--color-error-${r}`),y=t.map(r=>`--color-warning-${r}`),C=t.map(r=>`--color-success-${r}`),k=t.map(r=>`--color-info-${r}`),c=({colors:r})=>o.jsx("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr auto 1fr",gap:20,alignItems:"center"},children:r.map((n,a)=>{const e=`var(${n})`,s=()=>{navigator.clipboard.writeText(e),m({message:{type:"Success",content:"Copied to clipboard"}})};return o.jsxs(p.Fragment,{children:[o.jsx("div",{style:{padding:"var(--padding)",backgroundColor:e,border:"1px solid rgba(0,0,0,0.1)"},onClick:s}),o.jsx("code",{onClick:s,children:e})]},a)})});try{c.displayName="ColorPalette",c.__docgenInfo={description:"",displayName:"ColorPalette",props:{colors:{defaultValue:null,description:"",name:"colors",required:!0,type:{name:"string[]"}}}}}catch{}function l(r){const n=Object.assign({h1:"h1",p:"p",strong:"strong",h2:"h2",h3:"h3"},i(),r.components);return o.jsxs(o.Fragment,{children:[o.jsx(d,{title:"Colors"}),`
|
|
2
2
|
`,o.jsx(n.h1,{id:"colors",children:"Colors"}),`
|
|
3
3
|
`,o.jsx(n.p,{children:"When setting colors (either by component props or in custom styling), prefer named CSS variables to literal color values."}),`
|
|
4
4
|
`,o.jsx(n.p,{children:o.jsx(n.strong,{children:"Click on a color below to copy the variable name to the clipboard."})}),`
|