@jenesei-software/jenesei-kit-react 1.0.0 → 1.2.0
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/README.md +0 -1
- package/build/{area-DfCAwCiZ.js → area-3gVEQsJq.js} +20 -22
- package/build/area-3gVEQsJq.js.map +1 -0
- package/build/area-C8w6fMSn.cjs +38 -0
- package/build/area-C8w6fMSn.cjs.map +1 -0
- package/build/{area-9NUxwBGc.cjs → area-E4w7aKuZ.cjs} +2 -2
- package/build/{area-9NUxwBGc.cjs.map → area-E4w7aKuZ.cjs.map} +1 -1
- package/build/{area-BnAddPtl.js → area-EcUYP2tl.js} +2 -2
- package/build/{area-BnAddPtl.js.map → area-EcUYP2tl.js.map} +1 -1
- package/build/area-preview.cjs.js +1 -1
- package/build/area-preview.es.js +1 -1
- package/build/area-skeleton.cjs.js +1 -1
- package/build/area-skeleton.es.js +1 -1
- package/build/build-info.txt +3 -3
- package/build/{component-C2JFFh-k.js → component--cOriuv7.js} +103 -27
- package/build/component--cOriuv7.js.map +1 -0
- package/build/{component-CFMlaYj1.js → component-9m1Ib3fS.js} +2 -2
- package/build/{component-CFMlaYj1.js.map → component-9m1Ib3fS.js.map} +1 -1
- package/build/{component-CuiUpH8H.js → component-B1IQ5CfM.js} +10 -10
- package/build/component-B1IQ5CfM.js.map +1 -0
- package/build/{component-C52VCES6.cjs → component-BnYw0FvH.cjs} +21 -17
- package/build/component-BnYw0FvH.cjs.map +1 -0
- package/build/{component-nFn_uOy_.cjs → component-Bovatz78.cjs} +2 -2
- package/build/{component-nFn_uOy_.cjs.map → component-Bovatz78.cjs.map} +1 -1
- package/build/{component-UW1VzyvB.cjs → component-C0atFCun.cjs} +2 -2
- package/build/{component-UW1VzyvB.cjs.map → component-C0atFCun.cjs.map} +1 -1
- package/build/{component-DZxbW_Jz.js → component-CbPhVNw5.js} +30 -28
- package/build/component-CbPhVNw5.js.map +1 -0
- package/build/component-CbnBTIR5.cjs +2 -0
- package/build/component-CbnBTIR5.cjs.map +1 -0
- package/build/{component-xnEaYd4a.cjs → component-D7A-4DNQ.cjs} +2 -2
- package/build/{component-xnEaYd4a.cjs.map → component-D7A-4DNQ.cjs.map} +1 -1
- package/build/{component-CBshLNEf.js → component-DURhph1i.js} +3 -3
- package/build/{component-CBshLNEf.js.map → component-DURhph1i.js.map} +1 -1
- package/build/component-X4e7zEKk.cjs +90 -0
- package/build/component-X4e7zEKk.cjs.map +1 -0
- package/build/component-accordion.cjs.js +1 -1
- package/build/component-accordion.es.js +1 -1
- package/build/component-button-group.cjs.js +1 -1
- package/build/component-button-group.d.ts +5 -1
- package/build/component-button-group.es.js +1 -1
- package/build/component-button.cjs.js +1 -1
- package/build/component-button.d.ts +6 -2
- package/build/component-button.es.js +1 -1
- package/build/component-checkbox-group.cjs.js +1 -1
- package/build/component-checkbox-group.d.ts +2 -1
- package/build/component-checkbox-group.es.js +1 -1
- package/build/component-checkbox.cjs.js +1 -1
- package/build/component-checkbox.d.ts +2 -1
- package/build/component-checkbox.es.js +1 -1
- package/build/component-date-picker.cjs.js +1 -1
- package/build/component-date-picker.d.ts +93 -70
- package/build/component-date-picker.es.js +1 -1
- package/build/component-icon.cjs.js +1 -1
- package/build/component-icon.es.js +1 -1
- package/build/component-image-button.cjs.js +1 -1
- package/build/component-image-button.d.ts +5 -1
- package/build/component-image-button.es.js +1 -1
- package/build/component-image-select.cjs.js +1 -1
- package/build/component-image-select.d.ts +5 -1
- package/build/component-image-select.es.js +1 -1
- package/build/component-image-slider.cjs.js +1 -1
- package/build/component-image-slider.es.js +1 -1
- package/build/component-image.cjs.js +1 -1
- package/build/component-image.es.js +1 -1
- package/build/component-input-otp.cjs.js +1 -1
- package/build/component-input-otp.d.ts +31 -19
- package/build/component-input-otp.es.js +1 -1
- package/build/component-input.cjs.js +1 -1
- package/build/component-input.d.ts +48 -38
- package/build/component-input.es.js +4 -4
- package/build/component-map.cjs.js +1 -1
- package/build/component-map.es.js +1 -1
- package/build/component-pagination.cjs.js +1 -1
- package/build/component-pagination.d.ts +5 -1
- package/build/component-pagination.es.js +1 -1
- package/build/component-range.cjs.js +1 -1
- package/build/component-range.d.ts +28 -18
- package/build/component-range.es.js +1 -1
- package/build/component-ripple.cjs.js +1 -1
- package/build/component-ripple.es.js +1 -1
- package/build/component-select.cjs.js +1 -1
- package/build/component-select.d.ts +125 -230
- package/build/component-select.es.js +16 -20
- package/build/component-separator.cjs.js +1 -1
- package/build/component-separator.d.ts +3 -2
- package/build/component-separator.es.js +1 -1
- package/build/component-textarea.cjs.js +1 -1
- package/build/component-textarea.d.ts +74 -53
- package/build/component-textarea.es.js +4 -8
- package/build/component-toggle.cjs.js +1 -1
- package/build/component-toggle.es.js +1 -1
- package/build/component-tooltip.cjs.js +1 -1
- package/build/component-tooltip.d.ts +9 -2
- package/build/component-tooltip.es.js +1 -1
- package/build/component-typography.cjs.js +1 -1
- package/build/component-typography.d.ts +8 -2
- package/build/component-typography.es.js +1 -1
- package/build/{component-ByY_9Ryc.js → component-vpCWcIhC.js} +2 -2
- package/build/{component-ByY_9Ryc.js.map → component-vpCWcIhC.js.map} +1 -1
- package/build/{component.components-CaR5gfQW.cjs → component.components-1kRDD3KO.cjs} +2 -2
- package/build/{component.components-CaR5gfQW.cjs.map → component.components-1kRDD3KO.cjs.map} +1 -1
- package/build/{component.components-BAAT5GTH.js → component.components-CQ3LLnFl.js} +5 -5
- package/build/{component.components-BAAT5GTH.js.map → component.components-CQ3LLnFl.js.map} +1 -1
- package/build/{component.constants-DRvp5Bez.js → component.constants-B1rq1PLe.js} +2 -2
- package/build/{component.constants-DRvp5Bez.js.map → component.constants-B1rq1PLe.js.map} +1 -1
- package/build/{component.constants-DbNhxh0k.js → component.constants-B95xyW0s.js} +211 -207
- package/build/component.constants-B95xyW0s.js.map +1 -0
- package/build/{component.constants-BeWW8Ijx.cjs → component.constants-BLHg7rcI.cjs} +2 -2
- package/build/{component.constants-BeWW8Ijx.cjs.map → component.constants-BLHg7rcI.cjs.map} +1 -1
- package/build/component.constants-Gz2mf7IF.cjs +22 -0
- package/build/component.constants-Gz2mf7IF.cjs.map +1 -0
- package/build/{component.styles-BfvB83xM.cjs → component.styles-B-ZAk_1C.cjs} +7 -7
- package/build/component.styles-B-ZAk_1C.cjs.map +1 -0
- package/build/{component.styles-Do1NYZEO.js → component.styles-BI4OuDrG.js} +32 -20
- package/build/component.styles-BI4OuDrG.js.map +1 -0
- package/build/component.styles-BLh29xwF.cjs +10 -0
- package/build/component.styles-BLh29xwF.cjs.map +1 -0
- package/build/component.styles-BnJjm_ES.js +37 -0
- package/build/component.styles-BnJjm_ES.js.map +1 -0
- package/build/{component.styles-RkQwTlwG.js → component.styles-BoBaG6sX.js} +13 -5
- package/build/component.styles-BoBaG6sX.js.map +1 -0
- package/build/component.styles-BrGPrrEb.cjs +39 -0
- package/build/component.styles-BrGPrrEb.cjs.map +1 -0
- package/build/{component.styles-ZtwHuL4x.cjs → component.styles-Bz2vyHqK.cjs} +5 -7
- package/build/component.styles-Bz2vyHqK.cjs.map +1 -0
- package/build/{component.styles-CVBpx4fw.js → component.styles-BzNkEurr.js} +13 -13
- package/build/component.styles-BzNkEurr.js.map +1 -0
- package/build/component.styles-CLn52hJD.cjs +14 -0
- package/build/component.styles-CLn52hJD.cjs.map +1 -0
- package/build/{component.styles-DOPCUXcr.js → component.styles-CRWn1pVi.js} +11 -13
- package/build/component.styles-CRWn1pVi.js.map +1 -0
- package/build/{component.styles-CmEFZfA5.js → component.styles-CccZrbSA.js} +53 -42
- package/build/component.styles-CccZrbSA.js.map +1 -0
- package/build/component.styles-CdtZm7bl.cjs +165 -0
- package/build/component.styles-CdtZm7bl.cjs.map +1 -0
- package/build/{component.styles-BapdQNhL.js → component.styles-CiGPOpxk.js} +5 -5
- package/build/component.styles-CiGPOpxk.js.map +1 -0
- package/build/component.styles-CvJK1eif.cjs +230 -0
- package/build/component.styles-CvJK1eif.cjs.map +1 -0
- package/build/component.styles-D6KuudL3.js +1372 -0
- package/build/component.styles-D6KuudL3.js.map +1 -0
- package/build/{component.styles-DyGfo9t0.cjs → component.styles-DDUGBJle.cjs} +2 -2
- package/build/{component.styles-DyGfo9t0.cjs.map → component.styles-DDUGBJle.cjs.map} +1 -1
- package/build/{component.styles-CTo5NC52.js → component.styles-DMBvhmz6.js} +4 -4
- package/build/{component.styles-CTo5NC52.js.map → component.styles-DMBvhmz6.js.map} +1 -1
- package/build/component.styles-DWoybqna.cjs +137 -0
- package/build/component.styles-DWoybqna.cjs.map +1 -0
- package/build/component.styles-DhI3n-dL.js +213 -0
- package/build/component.styles-DhI3n-dL.js.map +1 -0
- package/build/{component.styles-DxeG9Opm.cjs → component.styles-DjLSmx3e.cjs} +2 -2
- package/build/{component.styles-DxeG9Opm.cjs.map → component.styles-DjLSmx3e.cjs.map} +1 -1
- package/build/component.styles-DqTkSP8L.js +1023 -0
- package/build/component.styles-DqTkSP8L.js.map +1 -0
- package/build/{component.styles-Dok17vPl.js → component.styles-DuIrUV9k.js} +2 -2
- package/build/{component.styles-Dok17vPl.js.map → component.styles-DuIrUV9k.js.map} +1 -1
- package/build/component.styles-DwdN7mQq.cjs +99 -0
- package/build/component.styles-DwdN7mQq.cjs.map +1 -0
- package/build/{component.styles-CV7jTFCg.js → component.styles-iWM1hPGZ.js} +62 -31
- package/build/component.styles-iWM1hPGZ.js.map +1 -0
- package/build/{component.styles-CZu2m0O4.cjs → component.styles-q4ne6jV1.cjs} +2 -2
- package/build/{component.styles-CZu2m0O4.cjs.map → component.styles-q4ne6jV1.cjs.map} +1 -1
- package/build/{component.styles-C6LohBfF.js → component.styles-uPfiNBIy.js} +3 -3
- package/build/{component.styles-C6LohBfF.js.map → component.styles-uPfiNBIy.js.map} +1 -1
- package/build/component.styles-vcNQJK0U.cjs +65 -0
- package/build/component.styles-vcNQJK0U.cjs.map +1 -0
- package/build/component.styles-w3iWQMCq.cjs +13 -0
- package/build/component.styles-w3iWQMCq.cjs.map +1 -0
- package/build/consts.cjs.js.map +1 -1
- package/build/consts.es.js.map +1 -1
- package/build/context-app.cjs.js +1 -1
- package/build/context-app.es.js +1 -1
- package/build/context-dialog.cjs.js +1 -1
- package/build/context-dialog.es.js +1 -1
- package/build/context-sonner.cjs.js +1 -1
- package/build/context-sonner.es.js +1 -1
- package/build/{context.constants-DqYjo5m4.js → context.constants-BAz35AJw.js} +5 -5
- package/build/{context.constants-DqYjo5m4.js.map → context.constants-BAz35AJw.js.map} +1 -1
- package/build/{context.constants-B29-_8v3.cjs → context.constants-BJPyze-d.cjs} +2 -2
- package/build/{context.constants-B29-_8v3.cjs.map → context.constants-BJPyze-d.cjs.map} +1 -1
- package/build/{context.constants-CsZRZ7gH.js → context.constants-COR-ReeN.js} +2 -2
- package/build/{context.constants-CsZRZ7gH.js.map → context.constants-COR-ReeN.js.map} +1 -1
- package/build/{context.constants-BaD7xj_m.cjs → context.constants-fwK8ogSf.cjs} +2 -2
- package/build/{context.constants-BaD7xj_m.cjs.map → context.constants-fwK8ogSf.cjs.map} +1 -1
- package/build/{context.hooks-gyzZSaVi.js → context.hooks-Bs1dD25S.js} +4 -4
- package/build/{context.hooks-gyzZSaVi.js.map → context.hooks-Bs1dD25S.js.map} +1 -1
- package/build/{context.hooks-CTi-CVKx.cjs → context.hooks-KAyS_7Pj.cjs} +3 -3
- package/build/{context.hooks-CTi-CVKx.cjs.map → context.hooks-KAyS_7Pj.cjs.map} +1 -1
- package/build/functions.cjs.js.map +1 -1
- package/build/functions.es.js +7 -4
- package/build/functions.es.js.map +1 -1
- package/build/hooks-use-deep-compare-memoize.d.ts +1 -1
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +289 -227
- package/build/index.es.js +133 -139
- package/build/{style-CEGJOjRW.js → style-Bvt_Melk.js} +32 -12
- package/build/style-Bvt_Melk.js.map +1 -0
- package/build/{style-DeAgDHyI.js → style-DjCgiI7l.js} +3 -3
- package/build/{style-DeAgDHyI.js.map → style-DjCgiI7l.js.map} +1 -1
- package/build/style-add.cjs.js +1 -1
- package/build/style-add.d.ts +11 -1
- package/build/style-add.es.js +6 -4
- package/build/{style-CtGd1JVB.cjs → style-eIuUYu9x.cjs} +2 -2
- package/build/{style-CtGd1JVB.cjs.map → style-eIuUYu9x.cjs.map} +1 -1
- package/build/style-error.cjs.js +1 -1
- package/build/style-error.es.js +1 -1
- package/build/{style-Dm74EPGE.cjs → style-f3_KtJIt.cjs} +30 -14
- package/build/style-f3_KtJIt.cjs.map +1 -0
- package/build/style-theme.cjs.js +1 -1
- package/build/style-theme.es.js +1 -1
- package/build/{theme.global-bN9HlSWE.js → theme.global-B46v_8eu.js} +2 -1
- package/build/{theme.global-bN9HlSWE.js.map → theme.global-B46v_8eu.js.map} +1 -1
- package/build/{theme.global-D6XU05Et.cjs → theme.global-BdZkriPJ.cjs} +2 -1
- package/build/{theme.global-D6XU05Et.cjs.map → theme.global-BdZkriPJ.cjs.map} +1 -1
- package/build/{use-BVj4dgbW.js → use-B6rT81uF.js} +6 -6
- package/build/{use-BVj4dgbW.js.map → use-B6rT81uF.js.map} +1 -1
- package/build/{use-BhofoOgk.cjs → use-BnaBipTR.cjs} +2 -2
- package/build/{use-BhofoOgk.cjs.map → use-BnaBipTR.cjs.map} +1 -1
- package/build/use-C1l0O0Qo.cjs.map +1 -1
- package/build/use-DT0XgvJT.js.map +1 -1
- package/package.json +2 -12
- package/build/area-ClrrGVJG.cjs +0 -40
- package/build/area-ClrrGVJG.cjs.map +0 -1
- package/build/area-DfCAwCiZ.js.map +0 -1
- package/build/component-BnI7BIp-.cjs +0 -2
- package/build/component-BnI7BIp-.cjs.map +0 -1
- package/build/component-C2JFFh-k.js.map +0 -1
- package/build/component-C52VCES6.cjs.map +0 -1
- package/build/component-CuiUpH8H.js.map +0 -1
- package/build/component-D1NPhRuV.cjs +0 -90
- package/build/component-D1NPhRuV.cjs.map +0 -1
- package/build/component-DZxbW_Jz.js.map +0 -1
- package/build/component.constants-D9wVZ3zy.cjs +0 -22
- package/build/component.constants-D9wVZ3zy.cjs.map +0 -1
- package/build/component.constants-DbNhxh0k.js.map +0 -1
- package/build/component.styles-B1DIataj.cjs +0 -10
- package/build/component.styles-B1DIataj.cjs.map +0 -1
- package/build/component.styles-BFwkFWkd.cjs +0 -39
- package/build/component.styles-BFwkFWkd.cjs.map +0 -1
- package/build/component.styles-BSEA2Dqn.cjs +0 -8
- package/build/component.styles-BSEA2Dqn.cjs.map +0 -1
- package/build/component.styles-BapdQNhL.js.map +0 -1
- package/build/component.styles-BfvB83xM.cjs.map +0 -1
- package/build/component.styles-Bn6ylF83.js +0 -859
- package/build/component.styles-Bn6ylF83.js.map +0 -1
- package/build/component.styles-BsZIuwWJ.cjs +0 -140
- package/build/component.styles-BsZIuwWJ.cjs.map +0 -1
- package/build/component.styles-CEBh8X5q.js +0 -20
- package/build/component.styles-CEBh8X5q.js.map +0 -1
- package/build/component.styles-CPsxMKVK.cjs +0 -73
- package/build/component.styles-CPsxMKVK.cjs.map +0 -1
- package/build/component.styles-CV7jTFCg.js.map +0 -1
- package/build/component.styles-CVBpx4fw.js.map +0 -1
- package/build/component.styles-CmBcHREH.cjs +0 -13
- package/build/component.styles-CmBcHREH.cjs.map +0 -1
- package/build/component.styles-CmEFZfA5.js.map +0 -1
- package/build/component.styles-DHIw8p8e.cjs +0 -158
- package/build/component.styles-DHIw8p8e.cjs.map +0 -1
- package/build/component.styles-DOPCUXcr.js.map +0 -1
- package/build/component.styles-Dj3h7jd9.cjs +0 -165
- package/build/component.styles-Dj3h7jd9.cjs.map +0 -1
- package/build/component.styles-Do1NYZEO.js.map +0 -1
- package/build/component.styles-DpkFoWEh.cjs +0 -81
- package/build/component.styles-DpkFoWEh.cjs.map +0 -1
- package/build/component.styles-DqsBDAEo.js +0 -202
- package/build/component.styles-DqsBDAEo.js.map +0 -1
- package/build/component.styles-Du2y0R4W.js +0 -177
- package/build/component.styles-Du2y0R4W.js.map +0 -1
- package/build/component.styles-RkQwTlwG.js.map +0 -1
- package/build/component.styles-ZtwHuL4x.cjs.map +0 -1
- package/build/style-CEGJOjRW.js.map +0 -1
- package/build/style-Dm74EPGE.cjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("react"),n=require("./consts.cjs.js"),s=require("./use-
|
|
2
|
-
//# sourceMappingURL=component-
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("react"),n=require("./consts.cjs.js"),s=require("./use-BnaBipTR.cjs"),r=require("./component-X4e7zEKk.cjs");exports.ImageButton=l=>{const o=t.useRef(null),u=t.useCallback(()=>{var e;null==(e=o.current)||e.click()},[]),{handleAddFiles:i}=s.useImageCrop({onSave:l.onSave,locale:l.locale,dialog:l.dialog,imageSettings:l.imageSettings,refInput:o});return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(r.Button,{...l.button,onClick:e=>{var t,n;null==(n=(t=l.button).onClick)||n.call(t,e),u()},children:l.button.children||l.locale.buttonAdd}),e.jsxRuntimeExports.jsx("input",{ref:o,type:"file",accept:n.ImageSupportedFormatsForInput,multiple:!0,style:{display:"none"},onChange:e=>{e.target.files&&i(e.target.files)}})]})};
|
|
2
|
+
//# sourceMappingURL=component-Bovatz78.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-Bovatz78.cjs","sources":["../src/components/image-button/component.tsx"],"sourcesContent":["import { FC, useCallback, useRef } from 'react'\n\nimport { ImageSupportedFormatsForInput } from '@local/consts'\nimport { useImageCrop } from '@local/hooks/use-image-crop'\n\nimport { ImageButtonProps } from '.'\nimport { Button } from '../button'\n\nexport const ImageButton: FC<ImageButtonProps> = props => {\n const refInput = useRef<HTMLInputElement | null>(null)\n\n const handleOpenFileDialog = useCallback(() => {\n refInput.current?.click()\n }, [])\n\n const { handleAddFiles } = useImageCrop({\n onSave: props.onSave,\n locale: props.locale,\n dialog: props.dialog,\n imageSettings: props.imageSettings,\n refInput: refInput\n })\n\n return (\n <>\n <Button\n {...props.button}\n onClick={e => {\n props.button.onClick?.(e)\n handleOpenFileDialog()\n }}\n >\n {props.button.children || props.locale.buttonAdd}\n </Button>\n <input\n ref={refInput}\n type=\"file\"\n accept={ImageSupportedFormatsForInput}\n multiple\n style={{ display: 'none' }}\n onChange={e => {\n if (e.target.files) handleAddFiles(e.target.files)\n }}\n />\n </>\n )\n}\n"],"names":["props","refInput","useRef","handleOpenFileDialog","useCallback","_a","current","click","handleAddFiles","useImageCrop","onSave","locale","dialog","imageSettings","jsxs","Fragment","children","jsx","Button","button","onClick","e","_b","call","buttonAdd","ref","type","accept","ImageSupportedFormatsForInput","multiple","style","display","onChange","target","files"],"mappings":"qMAQiDA,IAC/C,MAAMC,EAAWC,EAAAA,OAAgC,MAE3CC,EAAuBC,EAAAA,YAAY,WACvC,OAAAC,EAAAJ,EAASK,UAATD,EAAkBE,SACjB,KAEGC,eAAEA,GAAmBC,eAAa,CACtCC,OAAQV,EAAMU,OACdC,OAAQX,EAAMW,OACdC,OAAQZ,EAAMY,OACdC,cAAeb,EAAMa,cACrBZ,aAGF,SACEa,kBAAAA,KAAAC,6BAAA,CACEC,SAAA,GAAAC,kBAAAA,IAACC,EAAAA,OAAA,IACKlB,EAAMmB,OACVC,QAASC,YACP,OAAAC,GAAAjB,EAAAL,EAAMmB,QAAOC,UAAbE,EAAAC,KAAAlB,EAAuBgB,GACvBlB,KAGDa,SAAAhB,EAAMmB,OAAOH,UAAYhB,EAAMW,OAAOa,cAEzCP,kBAAAA,IAAC,QAAA,CACCQ,IAAKxB,EACLyB,KAAK,OACLC,OAAQC,EAAAA,8BACRC,UAAQ,EACRC,MAAO,CAAEC,QAAS,QAClBC,SAAUX,IACJA,EAAEY,OAAOC,OAAO1B,EAAea,EAAEY,OAAOC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./jsx-runtime-BcGej2Kr.cjs"),e=require("./component-
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BcGej2Kr.cjs"),e=require("./component-X4e7zEKk.cjs"),r=require("styled-components"),o=require("./style-fRZ6xrVp.cjs"),i=r.css`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
flex-wrap: wrap;
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
${t=>"horizontal"===t.$position?i:s};
|
|
50
50
|
${o.addSX};
|
|
51
51
|
`;exports.ButtonGroup=r=>{var o;return t.jsxRuntimeExports.jsx(n,{$sx:r.sx,$position:r.position,className:r.className,id:"jenesei-button-group",children:null==(o=r.value)?void 0:o.map((r,o)=>t.jsxRuntimeExports.jsx(e.Button,{id:"jenesei-button",...r},o))})},exports.ButtonGroupWrapper=n;
|
|
52
|
-
//# sourceMappingURL=component-
|
|
52
|
+
//# sourceMappingURL=component-C0atFCun.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-C0atFCun.cjs","sources":["../src/components/button-group/component.styles.ts","../src/components/button-group/component.tsx"],"sourcesContent":["import { css, styled } from 'styled-components'\n\nimport { addSX } from '@local/styles/sx'\n\nimport { StyledButtonGroupProps } from '.'\n\n/****************************************** Position *************************************************/\nconst ButtonGroupWrapperPositionHorizontal = css`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-content: flex-start;\n justify-content: space-between;\n & #jenesei-button {\n &:not(:only-child) {\n flex-grow: 1;\n &:first-child {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n }\n &:last-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n }\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n }\n }\n`\n\nconst ButtonGroupWrapperPositionVertical = css`\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n\n & #jenesei-button {\n &:not(:only-child) {\n &:first-child {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n &:last-child {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n }\n }\n`\n\nexport const ButtonGroupWrapper = styled.div<StyledButtonGroupProps>`\n & #jenesei-button {\n &:focus-visible {\n z-index: 1;\n }\n }\n ${props =>\n props.$position === 'horizontal' ? ButtonGroupWrapperPositionHorizontal : ButtonGroupWrapperPositionVertical};\n ${addSX};\n`\n","import { FC } from 'react'\n\nimport { Button } from '@local/components/button'\n\nimport { ButtonGroupProps, ButtonGroupWrapper } from '.'\n\nexport const ButtonGroup: FC<ButtonGroupProps> = props => {\n return (\n <ButtonGroupWrapper $sx={props.sx} $position={props.position} className={props.className} id=\"jenesei-button-group\">\n {props.value?.map((button, id) => <Button id=\"jenesei-button\" key={id} {...button} />)}\n </ButtonGroupWrapper>\n )\n}\n"],"names":["ButtonGroupWrapperPositionHorizontal","css","ButtonGroupWrapperPositionVertical","ButtonGroupWrapper","styled","div","props","$position","addSX","jsx","$sx","sx","position","className","id","children","_a","value","map","button","Button"],"mappings":"kKAOMA,EAAuCC,EAAAA,GAAAA;;;;;;;;;;;;;;;;;;;;;;EAwBvCC,EAAqCD,EAAAA,GAAAA;;;;;;;;;;;;;;;;;;;;EAsB9BE,EAAqBC,EAAAA,OAAOC,GAAA;;;;;;IAMrCC,GACoB,eAApBA,EAAMC,UAA6BP,EAAuCE;IAC1EM;sBCvD6CF,UAC/C,SACEG,kBAAAA,IAACN,EAAA,CAAmBO,IAAKJ,EAAMK,GAAIJ,UAAWD,EAAMM,SAAUC,UAAWP,EAAMO,UAAWC,GAAG,uBAC1FC,SAAA,OAAAC,EAAAV,EAAMW,YAAN,EAAAD,EAAaE,IAAI,CAACC,EAAQL,IAAOL,EAAAA,kBAAAA,IAACW,EAAAA,OAAA,CAAON,GAAG,oBAA8BK,GAARL"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-BrDlu8eK.js";
|
|
2
|
-
import {
|
|
3
|
-
import styled, { css, useTheme } from "styled-components";
|
|
4
|
-
import { I as Icon } from "./component.styles-BapdQNhL.js";
|
|
2
|
+
import { I as Icon } from "./component.styles-CiGPOpxk.js";
|
|
5
3
|
import { d as addRippleDefault } from "./component.styles-B0L4jbOO.js";
|
|
6
|
-
import { R as Ripple } from "./component-
|
|
4
|
+
import { R as Ripple } from "./component-vpCWcIhC.js";
|
|
5
|
+
import { g as getFontSizeStyles, h as addSXTypography, m as useMergeRefs } from "./component--cOriuv7.js";
|
|
6
|
+
import { useMemo, useRef } from "react";
|
|
7
|
+
import styled, { css, useTheme } from "styled-components";
|
|
7
8
|
import { motion } from "framer-motion";
|
|
8
|
-
import {
|
|
9
|
-
import { b as addTransition, f as addOutline } from "./style-CEGJOjRW.js";
|
|
9
|
+
import { b as addTransition, f as addOutline } from "./style-Bvt_Melk.js";
|
|
10
10
|
import { a as addSX } from "./style-plT9Ah7t.js";
|
|
11
|
-
import { K as KEY_SIZE_DATA } from "./theme.global-
|
|
11
|
+
import { K as KEY_SIZE_DATA } from "./theme.global-B46v_8eu.js";
|
|
12
12
|
const ButtonGenre = css`
|
|
13
13
|
${(props) => css`
|
|
14
14
|
background: ${props.theme.colors.button[props.$genre].background.rest};
|
|
15
15
|
border-color: ${props.theme.colors.button[props.$genre].border.rest};
|
|
16
16
|
color: ${props.theme.colors.button[props.$genre].color.rest};
|
|
17
17
|
&:hover {
|
|
18
|
-
${!props.$isHidden && css`
|
|
18
|
+
${(!props.$isHidden || props.$isNotHoverEffect) && css`
|
|
19
19
|
background: ${props.theme.colors.button[props.$genre].background.hover};
|
|
20
20
|
border-color: ${props.theme.colors.button[props.$genre].border.hover};
|
|
21
21
|
color: ${props.theme.colors.button[props.$genre].color.hover};
|
|
@@ -128,7 +128,7 @@ const Button = (props) => {
|
|
|
128
128
|
turn: icon.turn,
|
|
129
129
|
order: icon.order
|
|
130
130
|
},
|
|
131
|
-
index
|
|
131
|
+
`${icon.type}-${icon.name}-${index}`
|
|
132
132
|
) : (icon == null ? void 0 : icon.type) === "logo" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
133
133
|
Icon,
|
|
134
134
|
{
|
|
@@ -138,7 +138,7 @@ const Button = (props) => {
|
|
|
138
138
|
turn: icon.turn,
|
|
139
139
|
order: icon.order
|
|
140
140
|
},
|
|
141
|
-
index
|
|
141
|
+
`${icon.type}-${icon.name}-${index}`
|
|
142
142
|
) : (icon == null ? void 0 : icon.type) === "checkbox" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
143
143
|
Icon,
|
|
144
144
|
{
|
|
@@ -148,7 +148,7 @@ const Button = (props) => {
|
|
|
148
148
|
turn: icon.turn,
|
|
149
149
|
order: icon.order
|
|
150
150
|
},
|
|
151
|
-
index
|
|
151
|
+
`${icon.type}-${icon.name}-${index}`
|
|
152
152
|
) : (icon == null ? void 0 : icon.type) === "loading" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
153
153
|
Icon,
|
|
154
154
|
{
|
|
@@ -158,7 +158,7 @@ const Button = (props) => {
|
|
|
158
158
|
turn: icon.turn,
|
|
159
159
|
order: icon.order
|
|
160
160
|
},
|
|
161
|
-
index
|
|
161
|
+
`${icon.type}-${icon.name}-${index}`
|
|
162
162
|
) : (icon == null ? void 0 : icon.type) === "realebail" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
163
163
|
Icon,
|
|
164
164
|
{
|
|
@@ -168,7 +168,7 @@ const Button = (props) => {
|
|
|
168
168
|
turn: icon.turn,
|
|
169
169
|
order: icon.order
|
|
170
170
|
},
|
|
171
|
-
index
|
|
171
|
+
`${icon.type}-${icon.name}-${index}`
|
|
172
172
|
) : null
|
|
173
173
|
);
|
|
174
174
|
},
|
|
@@ -179,12 +179,15 @@ const Button = (props) => {
|
|
|
179
179
|
props.onClick(event);
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
|
+
const refDefault = useRef(null);
|
|
183
|
+
const ref = useMergeRefs([refDefault, props.ref]);
|
|
182
184
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
183
185
|
StyledButton,
|
|
184
186
|
{
|
|
187
|
+
$isNotHoverEffect: props.isNotHoverEffect,
|
|
185
188
|
whileTap: props.isWhileTapEffect ? { scale: 0.9, transition: { duration: 0.02 } } : {},
|
|
186
189
|
id: props.id,
|
|
187
|
-
tabIndex: 0,
|
|
190
|
+
tabIndex: props.tabIndex ?? 0,
|
|
188
191
|
$isFullSize: props.isFullSize,
|
|
189
192
|
$genre: props.genre,
|
|
190
193
|
$size: props.size,
|
|
@@ -200,7 +203,8 @@ const Button = (props) => {
|
|
|
200
203
|
type: props.type ?? "button",
|
|
201
204
|
className: props.className,
|
|
202
205
|
onClick: handleClick,
|
|
203
|
-
|
|
206
|
+
onMouseDown: props.onMouseDown,
|
|
207
|
+
ref,
|
|
204
208
|
$sx: props.sx,
|
|
205
209
|
children: [
|
|
206
210
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -211,18 +215,16 @@ const Button = (props) => {
|
|
|
211
215
|
isHidden: props.isHidden
|
|
212
216
|
}
|
|
213
217
|
),
|
|
214
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
)
|
|
225
|
-
] })
|
|
218
|
+
!props.isOnlyIcon && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { order: 0, display: "contents" }, children: props.children && props.children }),
|
|
219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
220
|
+
StyledButtonIconsWrapper,
|
|
221
|
+
{
|
|
222
|
+
$size: props.size,
|
|
223
|
+
$isIconGroup: props.isIconGroup,
|
|
224
|
+
$iconGroupOrder: "iconGroupOrder" in props ? props.iconGroupOrder : void 0,
|
|
225
|
+
children: iconComponents
|
|
226
|
+
}
|
|
227
|
+
)
|
|
226
228
|
]
|
|
227
229
|
}
|
|
228
230
|
);
|
|
@@ -234,4 +236,4 @@ export {
|
|
|
234
236
|
StyledButton as b,
|
|
235
237
|
Button as c
|
|
236
238
|
};
|
|
237
|
-
//# sourceMappingURL=component-
|
|
239
|
+
//# sourceMappingURL=component-CbPhVNw5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-CbPhVNw5.js","sources":["../src/components/button/component.styles.ts","../src/components/button/component.tsx"],"sourcesContent":["import { motion } from 'framer-motion'\nimport styled, { css } from 'styled-components'\n\nimport { addRippleDefault } from '@local/components/ripple'\nimport { addSXTypography, getFontSizeStyles } from '@local/components/typography'\nimport { addOutline, addTransition } from '@local/styles/add'\nimport { addSX } from '@local/styles/sx'\nimport { IThemeSizePropertyDefault, KEY_SIZE_DATA } from '@local/theme'\n\nimport { StyledDollarButtonIconsWrapperProps, StyledDollarButtonProps } from '.'\n\n/****************************************** Genre *************************************************/\nconst ButtonGenre = css<StyledDollarButtonProps>`\n ${props => css`\n background: ${props.theme.colors.button[props.$genre].background.rest};\n border-color: ${props.theme.colors.button[props.$genre].border.rest};\n color: ${props.theme.colors.button[props.$genre].color.rest};\n &:hover {\n ${(!props.$isHidden || props.$isNotHoverEffect) &&\n css`\n background: ${props.theme.colors.button[props.$genre].background.hover};\n border-color: ${props.theme.colors.button[props.$genre].border.hover};\n color: ${props.theme.colors.button[props.$genre].color.hover};\n `}\n }\n `};\n`\n\n/****************************************** Disabled *************************************************/\nconst ButtonDisabled = css<StyledDollarButtonProps>`\n ${props =>\n props.$isHidden\n ? css`\n opacity: 0.5;\n background: ${props.theme.colors.button[props.$genre].background.rest} !important;\n color: ${props.theme.colors.button[props.$genre].color.rest} !important;\n `\n : css`\n opacity: 1;\n `}\n`\n/****************************************** is HiddenBorder *************************************************/\nconst ButtonIsHiddenBorder = css<StyledDollarButtonProps>`\n ${props =>\n props.$isHiddenBorder &&\n css`\n border: 0px transparent !important;\n `}\n`\n/****************************************** is Radius *************************************************/\nconst ButtonIsRadius = css<StyledDollarButtonProps>`\n ${props =>\n props.$isRadius &&\n css`\n border-radius: 100px;\n `}\n`\n/****************************************** is PlaystationEffect *************************************************/\nconst ButtonIsPlaystationEffect = css<StyledDollarButtonProps>`\n ${props =>\n props.$isPlaystationEffect &&\n css`\n box-shadow: ${props.theme.effects.button};\n `}\n`\n/****************************************** Icons Wrapper *************************************************/\nexport const StyledButtonIconsWrapper = styled.div<StyledDollarButtonIconsWrapperProps>`\n ${props =>\n props.$isIconGroup\n ? css`\n display: flex;\n gap: ${KEY_SIZE_DATA[props.$size].padding - 2}px;\n align-items: center;\n order: ${props.$iconGroupOrder || 'initial'};\n `\n : css`\n display: contents;\n `}\n`\n\n/****************************************** Size *************************************************/\nexport const ButtonSize = css<StyledDollarButtonProps>`\n ${props =>\n ButtonSizeConstructor({\n ...KEY_SIZE_DATA[props.$size],\n isFullSize: props.$isFullSize,\n isWidthAsHeight: props.$isWidthAsHeight,\n isMinWidthAsContent: props.$isMinWidthAsContent\n })};\n`\nexport const ButtonSizeConstructor = (\n props: IThemeSizePropertyDefault & {\n isFullSize?: boolean\n isWidthAsHeight?: boolean\n isMinWidthAsContent?: boolean\n }\n) => css`\n height: fit-content;\n min-height: ${props.height}px;\n max-height: fit-content;\n padding: 2px ${props.padding}px;\n border-radius: ${props.radius}px;\n gap: ${props.padding - 2}px;\n ${params => getFontSizeStyles(props.font, 700, params.theme.font.family)};\n ${() =>\n props.isFullSize &&\n css`\n height: 100%;\n width: 100%;\n border-radius: 0px;\n `};\n ${props.isWidthAsHeight &&\n css`\n width: ${props.height}px;\n min-width: ${props.height}px;\n padding: 0px;\n `};\n ${props.isMinWidthAsContent &&\n css`\n min-width: max-content;\n `};\n`\n/****************************************** Border *************************************************/\nconst ButtonBorder = css`\n border: 1px solid transparent;\n`\n\n/****************************************** Flex *************************************************/\nconst ButtonFlex = css<StyledDollarButtonProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n`\n/****************************************** Styled *************************************************/\nexport const StyledButton = styled(motion.button)<StyledDollarButtonProps>`\n cursor: pointer;\n user-select: none;\n\n ${ButtonBorder};\n ${ButtonSize};\n ${ButtonGenre};\n ${ButtonDisabled};\n ${ButtonIsHiddenBorder};\n ${ButtonIsRadius};\n ${ButtonIsPlaystationEffect};\n ${ButtonFlex};\n ${addRippleDefault};\n ${addTransition};\n ${addOutline};\n ${addSXTypography};\n ${addSX};\n`\n","import {\n Icon,\n TIconCheckboxNameString,\n TIconIdNameString,\n TIconLoadingNameString,\n TIconLogoNameString,\n TIconRealEbailNameString,\n} from '@local/components/icon';\nimport { Ripple } from '@local/components/ripple';\n\nimport { useMergeRefs } from '@floating-ui/react';\nimport { FC, Ref, useMemo, useRef } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ButtonProps, StyledButton, StyledButtonIconsWrapper } from '.';\n\nexport const Button: FC<ButtonProps> = (props) => {\n const theme = useTheme();\n\n const iconComponents = useMemo(\n () =>\n (props.icons ?? [])\n ?.filter((icon) => !icon.isHidden)\n ?.map((icon, index) =>\n icon?.type === 'id' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconIdNameString}\n type='id'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : icon?.type === 'logo' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconLogoNameString}\n type='logo'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : icon?.type === 'checkbox' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconCheckboxNameString}\n type='checkbox'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : icon?.type === 'loading' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconLoadingNameString}\n type='loading'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : icon?.type === 'realebail' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconRealEbailNameString}\n type='realebail'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : null,\n ),\n [props.icons, props.size],\n );\n\n const handleClick: ButtonProps['onClick'] = (event) => {\n if (!props.isDisabled && props.onClick) {\n props.onClick(event);\n }\n };\n const refDefault = useRef<HTMLButtonElement>(null);\n\n const ref = useMergeRefs([refDefault, props.ref]);\n\n return (\n <StyledButton\n $isNotHoverEffect={props.isNotHoverEffect}\n whileTap={props.isWhileTapEffect ? { scale: 0.9, transition: { duration: 0.02 } } : {}}\n id={props.id}\n tabIndex={props.tabIndex ?? 0}\n $isFullSize={props.isFullSize}\n $genre={props.genre}\n $size={props.size}\n $isDisabled={props.isDisabled}\n $isMinWidthAsContent={props.isMinWidthAsContent}\n $isWidthAsHeight={props.isWidthAsHeight}\n $isRadius={props.isRadius}\n $isHidden={props.isHidden}\n $isPlaystationEffect={props.isPlaystationEffect}\n $sxTypography={props.sxTypography}\n $isHiddenBorder={props.isHiddenBorder || props.isPlaystationEffect}\n disabled={props.isDisabled}\n type={props.type ?? 'button'}\n className={props.className}\n onClick={handleClick}\n onMouseDown={props.onMouseDown}\n ref={ref as Ref<HTMLButtonElement>}\n $sx={props.sx}\n >\n <Ripple\n color={theme.colors.checkbox[props.genre].color.rest}\n isDisabled={props.isDisabled ?? props.isDisabledRipple}\n isHidden={props.isHidden}\n />\n\n {!props.isOnlyIcon && <div style={{ order: 0, display: 'contents' }}>{props.children && props.children}</div>}\n <StyledButtonIconsWrapper\n $size={props.size}\n $isIconGroup={props.isIconGroup}\n $iconGroupOrder={'iconGroupOrder' in props ? props.iconGroupOrder : undefined}\n >\n {iconComponents}\n </StyledButtonIconsWrapper>\n </StyledButton>\n );\n};\n"],"names":["jsx","jsxs"],"mappings":";;;;;;;;;;;AAYA,MAAM,cAAc;AAAA,IAChB,CAAA,UAAS;AAAA,k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,EAAE,OAAO,GAAG,SAAS,WAAA,GAAe,UAAA,MAAM,YAAY,MAAM,UAAS;AAAA,QACvGA,kCAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,OAAO,MAAM;AAAA,YACb,cAAc,MAAM;AAAA,YACpB,iBAAiB,oBAAoB,QAAQ,MAAM,iBAAiB;AAAA,YAEnE,UAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),i=require("./style-eIuUYu9x.cjs"),n=require("react"),r=require("./component.styles-DWoybqna.cjs");exports.Input=t=>{const l=n.useCallback(e=>{var i,n;if("standard"===t.variety){const n="string"==typeof e?e:e.value,r=t.isNoSpaces?n.replace(/\s+/g,""):n;null==(i=t.onChange)||i.call(t,r)}"pattern"!==t.variety&&"numeric"!==t.variety||"string"!=typeof e&&(null==(n=t.onChange)||n.call(t,e))},[t]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(r.StyledInputWrapper,{$isInputEffect:t.isInputEffect,className:t.className,$isDisabled:t.isDisabled,$sx:t.sx,$size:t.size,$isWidthAsHeight:t.isWidthAsHeight,children:[t.prefixChildren&&e.jsxRuntimeExports.jsx(r.InputPrefixChildren,{$left:t.prefixChildren.left,$right:t.prefixChildren.right,$isDisabled:t.isDisabled,$width:t.prefixChildren.width,children:t.prefixChildren.children}),"pattern"===t.variety?e.jsxRuntimeExports.jsx(r.StyledInputPattern,{$isNiceNumber:t.isNiceNumber,$isInputEffect:t.isInputEffect,$error:null==t?void 0:t.error,$isLoading:t.isLoading,$postfixChildren:null==t?void 0:t.postfixChildren,$prefixChildren:null==t?void 0:t.prefixChildren,$genre:t.genre,$size:t.size,$isBold:t.isBold,$isDisabled:t.isDisabled,$isCenter:t.isCenter,disabled:t.isDisabled,readOnly:t.isReadOnly,required:t.isRequired,defaultValue:null===t.defaultValue?"":t.defaultValue,value:null===t.value?"":t.value,placeholder:t.placeholder,onValueChange:e=>l(e),onBlur:t.onBlur,onFocus:t.onFocus,onPaste:t.onPaste,name:t.name,id:t.id,onKeyDown:t.onKeyDown,inputMode:t.inputMode,maxLength:t.maxLength,minLength:t.minLength,tabIndex:t.tabIndex,...t.propsPattern}):"numeric"===t.variety?e.jsxRuntimeExports.jsx(r.StyledInputNumeric,{$isNiceNumber:t.isNiceNumber,$isInputEffect:t.isInputEffect,$error:null==t?void 0:t.error,$isLoading:t.isLoading,$postfixChildren:null==t?void 0:t.postfixChildren,$prefixChildren:null==t?void 0:t.prefixChildren,$genre:t.genre,$size:t.size,$isBold:t.isBold,$isDisabled:t.isDisabled,$isCenter:t.isCenter,disabled:t.isDisabled,readOnly:t.isReadOnly,required:t.isRequired,defaultValue:null===t.defaultValue?"":t.defaultValue,value:null===t.value?"":t.value,placeholder:t.placeholder,onValueChange:e=>l(e),onBlur:t.onBlur,onFocus:t.onFocus,onPaste:t.onPaste,name:t.name,id:t.id,onKeyDown:t.onKeyDown,inputMode:t.inputMode,maxLength:t.maxLength,minLength:t.minLength,tabIndex:t.tabIndex,...t.propsNumeric}):e.jsxRuntimeExports.jsx(r.StyledInput,{$isNiceNumber:t.isNiceNumber,inputMode:t.inputMode,maxLength:t.maxLength,minLength:t.minLength,ref:t.ref,$error:t.error,$isInputEffect:t.isInputEffect,$isLoading:t.isLoading,$postfixChildren:null==t?void 0:t.postfixChildren,$prefixChildren:null==t?void 0:t.prefixChildren,$genre:t.genre,$size:t.size,$isBold:t.isBold,$isDisabled:t.isDisabled,$isCenter:t.isCenter,disabled:t.isDisabled,readOnly:t.isReadOnly,required:t.isRequired,defaultValue:null===t.defaultValue?"":t.defaultValue,value:null===t.value?"":t.value,placeholder:t.placeholder,type:t.type,autoComplete:t.autoComplete,onInput:e=>{const i=e.target;l(i.value)},onBlur:t.onBlur,onFocus:t.onFocus,onPaste:t.onPaste,name:t.name,id:t.id,tabIndex:t.tabIndex,onKeyDown:t.onKeyDown,min:t.min,max:t.max,step:t.step}),t.postfixChildren&&e.jsxRuntimeExports.jsx(r.InputPostfixChildren,{$left:t.postfixChildren.left,$right:t.postfixChildren.right,$isDisabled:t.isDisabled,$width:t.postfixChildren.width,children:t.postfixChildren.children})]}),(null==t?void 0:t.error)?e.jsxRuntimeExports.jsx(i.ErrorMessage,{...t.error,size:(null==t?void 0:t.error.size)??t.size}):null]})},exports.formatPhoneNumber=function(e,i){function n(e){return/\d/.test(e)}let r="",t="",l=0;if(0===e.length)return{format:"",placeholder:""};for(let s=0;s<i.length;s++){const a=i.charAt(s);a===e.charAt(l)?(r+=a,t+=n(a)?"#":a,l++):n(a)?(r+="#",t+="-"):(r+=a,t+=a)}for(;l<e.length;)r+=e.charAt(l),t+=e.charAt(l),l++;return{format:r,placeholder:t}};
|
|
2
|
+
//# sourceMappingURL=component-CbnBTIR5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-CbnBTIR5.cjs","sources":["../src/components/input/component.tsx"],"sourcesContent":["import { ErrorMessage } from '@local/styles/error';\n\nimport { useCallback } from 'react';\nimport { NumberFormatValues } from 'react-number-format';\n\nimport {\n InputPostfixChildren,\n InputPrefixChildren,\n InputProps,\n StyledInput,\n StyledInputNumeric,\n StyledInputPattern,\n StyledInputWrapper,\n} from '.';\n\nexport const Input = (props: InputProps) => {\n const handleOnChange = useCallback(\n (input: string | NumberFormatValues) => {\n if (props.variety === 'standard') {\n const value = typeof input === 'string' ? input : input.value;\n const cleaned = props.isNoSpaces ? value.replace(/\\s+/g, '') : value;\n props.onChange?.(cleaned);\n }\n\n if (props.variety === 'pattern' || props.variety === 'numeric') {\n if (typeof input !== 'string') {\n props.onChange?.(input);\n }\n }\n },\n [props],\n );\n\n return (\n <>\n <StyledInputWrapper\n $isInputEffect={props.isInputEffect}\n className={props.className}\n $isDisabled={props.isDisabled}\n $sx={props.sx}\n $size={props.size}\n $isWidthAsHeight={props.isWidthAsHeight}\n >\n {props.prefixChildren && (\n <InputPrefixChildren\n $left={props.prefixChildren.left}\n $right={props.prefixChildren.right}\n $isDisabled={props.isDisabled}\n $width={props.prefixChildren.width}\n >\n {props.prefixChildren.children}\n </InputPrefixChildren>\n )}\n {props.variety === 'pattern' ? (\n <StyledInputPattern\n $isNiceNumber={props.isNiceNumber}\n $isInputEffect={props.isInputEffect}\n $error={props?.error}\n $isLoading={props.isLoading}\n $postfixChildren={props?.postfixChildren}\n $prefixChildren={props?.prefixChildren}\n $genre={props.genre}\n $size={props.size}\n $isBold={props.isBold}\n $isDisabled={props.isDisabled}\n $isCenter={props.isCenter}\n disabled={props.isDisabled}\n readOnly={props.isReadOnly}\n required={props.isRequired}\n defaultValue={props.defaultValue === null ? '' : props.defaultValue}\n value={props.value === null ? '' : props.value}\n placeholder={props.placeholder}\n onValueChange={(props) => handleOnChange(props)}\n onBlur={props.onBlur}\n onFocus={props.onFocus}\n onPaste={props.onPaste}\n name={props.name}\n id={props.id}\n onKeyDown={props.onKeyDown}\n inputMode={props.inputMode}\n maxLength={props.maxLength}\n minLength={props.minLength}\n tabIndex={props.tabIndex}\n {...props.propsPattern}\n />\n ) : props.variety === 'numeric' ? (\n <StyledInputNumeric\n $isNiceNumber={props.isNiceNumber}\n $isInputEffect={props.isInputEffect}\n $error={props?.error}\n $isLoading={props.isLoading}\n $postfixChildren={props?.postfixChildren}\n $prefixChildren={props?.prefixChildren}\n $genre={props.genre}\n $size={props.size}\n $isBold={props.isBold}\n $isDisabled={props.isDisabled}\n $isCenter={props.isCenter}\n disabled={props.isDisabled}\n readOnly={props.isReadOnly}\n required={props.isRequired}\n defaultValue={props.defaultValue === null ? '' : props.defaultValue}\n value={props.value === null ? '' : props.value}\n placeholder={props.placeholder}\n onValueChange={(props) => handleOnChange(props)}\n onBlur={props.onBlur}\n onFocus={props.onFocus}\n onPaste={props.onPaste}\n name={props.name}\n id={props.id}\n onKeyDown={props.onKeyDown}\n inputMode={props.inputMode}\n maxLength={props.maxLength}\n minLength={props.minLength}\n tabIndex={props.tabIndex}\n {...props.propsNumeric}\n />\n ) : (\n <StyledInput\n $isNiceNumber={props.isNiceNumber}\n inputMode={props.inputMode}\n maxLength={props.maxLength}\n minLength={props.minLength}\n ref={props.ref}\n $error={props.error}\n $isInputEffect={props.isInputEffect}\n $isLoading={props.isLoading}\n $postfixChildren={props?.postfixChildren}\n $prefixChildren={props?.prefixChildren}\n $genre={props.genre}\n $size={props.size}\n $isBold={props.isBold}\n $isDisabled={props.isDisabled}\n $isCenter={props.isCenter}\n disabled={props.isDisabled}\n readOnly={props.isReadOnly}\n required={props.isRequired}\n defaultValue={props.defaultValue === null ? '' : props.defaultValue}\n value={props.value === null ? '' : props.value}\n placeholder={props.placeholder}\n type={props.type}\n autoComplete={props.autoComplete}\n onInput={(event) => {\n const input = event.target as HTMLInputElement;\n handleOnChange(input.value);\n }}\n onBlur={props.onBlur}\n onFocus={props.onFocus}\n onPaste={props.onPaste}\n name={props.name}\n id={props.id}\n tabIndex={props.tabIndex}\n onKeyDown={props.onKeyDown}\n min={props.min}\n max={props.max}\n step={props.step}\n />\n )}\n\n {props.postfixChildren && (\n <InputPostfixChildren\n $left={props.postfixChildren.left}\n $right={props.postfixChildren.right}\n $isDisabled={props.isDisabled}\n $width={props.postfixChildren.width}\n >\n {props.postfixChildren.children}\n </InputPostfixChildren>\n )}\n </StyledInputWrapper>\n {props?.error ? <ErrorMessage {...props.error} size={props?.error.size ?? props.size} /> : null}\n </>\n );\n};\n\nexport function formatPhoneNumber(dialCode: string, international: string) {\n function isDigit(char: string): boolean {\n return /\\d/.test(char);\n }\n\n let formattedNumber = '';\n let placeholderNumber = '';\n let dialCodeIndex = 0;\n\n if (dialCode.length === 0) {\n return { format: '', placeholder: '' };\n }\n\n for (let i = 0; i < international.length; i++) {\n const char = international.charAt(i);\n\n if (char === dialCode.charAt(dialCodeIndex)) {\n formattedNumber += char;\n placeholderNumber += isDigit(char) ? '#' : char;\n dialCodeIndex++;\n } else {\n if (isDigit(char)) {\n formattedNumber += '#';\n placeholderNumber += '-';\n } else {\n formattedNumber += char;\n placeholderNumber += char;\n }\n }\n }\n\n while (dialCodeIndex < dialCode.length) {\n formattedNumber += dialCode.charAt(dialCodeIndex);\n placeholderNumber += dialCode.charAt(dialCodeIndex);\n dialCodeIndex++;\n }\n\n return {\n format: formattedNumber,\n placeholder: placeholderNumber,\n };\n}\n"],"names":["props","handleOnChange","useCallback","input","variety","value","cleaned","isNoSpaces","replace","_a","onChange","call","_b","jsxs","Fragment","children","StyledInputWrapper","$isInputEffect","isInputEffect","className","$isDisabled","isDisabled","$sx","sx","$size","size","$isWidthAsHeight","isWidthAsHeight","prefixChildren","jsx","InputPrefixChildren","$left","left","$right","right","$width","width","StyledInputPattern","$isNiceNumber","isNiceNumber","$error","error","$isLoading","isLoading","$postfixChildren","postfixChildren","$prefixChildren","$genre","genre","$isBold","isBold","$isCenter","isCenter","disabled","readOnly","isReadOnly","required","isRequired","defaultValue","placeholder","onValueChange","onBlur","onFocus","onPaste","name","id","onKeyDown","inputMode","maxLength","minLength","tabIndex","propsPattern","StyledInputNumeric","propsNumeric","StyledInput","ref","type","autoComplete","onInput","event","target","min","max","step","InputPostfixChildren","ErrorMessage","dialCode","international","isDigit","char","test","formattedNumber","placeholderNumber","dialCodeIndex","length","format","i","charAt"],"mappings":"2KAesBA,IACpB,MAAMC,EAAiBC,EAAAA,YACpBC,YACC,GAAsB,aAAlBH,EAAMI,QAAwB,CAChC,MAAMC,EAAyB,iBAAVF,EAAqBA,EAAQA,EAAME,MAClDC,EAAUN,EAAMO,WAAaF,EAAMG,QAAQ,OAAQ,IAAMH,EAC/D,OAAAI,EAAAT,EAAMU,WAAND,EAAAE,KAAAX,EAAiBM,EAAO,CAGJ,YAAlBN,EAAMI,SAA2C,YAAlBJ,EAAMI,SAClB,iBAAVD,IACT,OAAAS,EAAAZ,EAAMU,WAANE,EAAAD,KAAAX,EAA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EAAI,CAGvB,IAAIE,EAAkB,GAClBC,EAAoB,GACpBC,EAAgB,EAEpB,GAAwB,IAApBP,EAASQ,OACX,MAAO,CAAEC,OAAQ,GAAIpC,YAAa,IAGpC,IAAA,IAASqC,EAAI,EAAGA,EAAIT,EAAcO,OAAQE,IAAK,CAC7C,MAAMP,EAAOF,EAAcU,OAAOD,GAE9BP,IAASH,EAASW,OAAOJ,IAC3BF,GAAmBF,EACnBG,GAAqBJ,EAAQC,GAAQ,IAAMA,EAC3CI,KAEIL,EAAQC,IACVE,GAAmB,IACnBC,GAAqB,MAErBD,GAAmBF,EACnBG,GAAqBH,EAEzB,CAGF,KAAOI,EAAgBP,EAASQ,QAC9BH,GAAmBL,EAASW,OAAOJ,GACnCD,GAAqBN,EAASW,OAAOJ,GACrCA,IAGF,MAAO,CACLE,OAAQJ,EACRhC,YAAaiC,EAEjB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("react"),i=require("./component.styles-Dpg-__rn.cjs");exports.Ripple=s=>{const o=t.useMemo(()=>s.color??"unset",[s.color]),r=t.useMemo(()=>s.duration??i.DEFAULT_RIPPLE_DURATION,[s.duration]),[n,u]=t.useState([]);((e,i,s)=>{t.useLayoutEffect(()=>{let t=null;return e>0&&(t&&clearTimeout(t),t=setTimeout(()=>{s(),t&&clearTimeout(t)},4*i)),()=>{t&&clearTimeout(t)}},[e,i,s])})(n.length,r??i.DEFAULT_RIPPLE_DURATION,()=>{u([])});const l=t.useCallback(e=>{if(!e.isTrusted)return;const t=e.currentTarget.getBoundingClientRect(),i=t.width>t.height?t.width:t.height,s={x:e.pageX-t.x-i/2,y:e.pageY-t.y-i/2,size:i};u([]),setTimeout(()=>{u([s])},0)},[]);return s.isDisabled||s.isHidden?null:e.jsxRuntimeExports.jsx(i.RippleContainer,{id:i.DEFAULT_RIPPLE_ID,$duration:r,$color:o,onMouseDown:l,children:n.length>0&&n.map((t,s)=>e.jsxRuntimeExports.jsx(i.RippleSpan,{$duration:r,$color:o,style:{top:t.y,left:t.x,width:t.size,height:t.size}}
|
|
2
|
-
//# sourceMappingURL=component-
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("react"),i=require("./component.styles-Dpg-__rn.cjs");exports.Ripple=s=>{const o=t.useMemo(()=>s.color??"unset",[s.color]),r=t.useMemo(()=>s.duration??i.DEFAULT_RIPPLE_DURATION,[s.duration]),[n,u]=t.useState([]);((e,i,s)=>{t.useLayoutEffect(()=>{let t=null;return e>0&&(t&&clearTimeout(t),t=setTimeout(()=>{s(),t&&clearTimeout(t)},4*i)),()=>{t&&clearTimeout(t)}},[e,i,s])})(n.length,r??i.DEFAULT_RIPPLE_DURATION,()=>{u([])});const l=t.useCallback(e=>{if(!e.isTrusted)return;const t=e.currentTarget.getBoundingClientRect(),i=t.width>t.height?t.width:t.height,s={x:e.pageX-t.x-i/2,y:e.pageY-t.y-i/2,size:i};u([]),setTimeout(()=>{u([s])},0)},[]);return s.isDisabled||s.isHidden?null:e.jsxRuntimeExports.jsx(i.RippleContainer,{id:i.DEFAULT_RIPPLE_ID,$duration:r,$color:o,onMouseDown:l,children:n.length>0&&n.map((t,s)=>e.jsxRuntimeExports.jsx(i.RippleSpan,{$duration:r,$color:o,style:{top:t.y,left:t.x,width:t.size,height:t.size}},`span-${s}`))})};
|
|
2
|
+
//# sourceMappingURL=component-D7A-4DNQ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-D7A-4DNQ.cjs","sources":["../src/components/ripple/component.tsx"],"sourcesContent":["import React, { FC, useCallback, useLayoutEffect, useMemo, useState } from 'react'\n\nimport {\n DEFAULT_RIPPLE_DURATION,\n DEFAULT_RIPPLE_ID,\n RippleArrayElement,\n RippleContainer,\n RippleProps,\n RippleSpan\n} from '.'\n\nconst useDebouncedRippleCleanUp = (rippleCount: number, duration: number, cleanUpFunction: () => void) => {\n useLayoutEffect(() => {\n // eslint-disable-next-line no-undef\n let bounce: NodeJS.Timeout | null = null\n if (rippleCount > 0) {\n if (bounce) {\n clearTimeout(bounce)\n }\n\n bounce = setTimeout(() => {\n cleanUpFunction()\n if (bounce) {\n clearTimeout(bounce)\n }\n }, duration * 4)\n }\n\n return () => {\n if (bounce) {\n clearTimeout(bounce)\n }\n }\n }, [rippleCount, duration, cleanUpFunction])\n}\n\nexport const Ripple: FC<RippleProps> = props => {\n const color = useMemo(() => props.color ?? 'unset', [props.color])\n const duration = useMemo(() => props.duration ?? DEFAULT_RIPPLE_DURATION, [props.duration])\n\n const [rippleArray, setRippleArray] = useState<RippleArrayElement[]>([])\n\n useDebouncedRippleCleanUp(rippleArray.length, duration ?? DEFAULT_RIPPLE_DURATION, () => {\n setRippleArray([])\n })\n\n const onMouseDown = useCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (!event.isTrusted) return\n const rippleContainer = event.currentTarget.getBoundingClientRect()\n const size = rippleContainer.width > rippleContainer.height ? rippleContainer.width : rippleContainer.height\n const x = event.pageX - rippleContainer.x - size / 2\n const y = event.pageY - rippleContainer.y - size / 2\n const newRipple = { x, y, size }\n setRippleArray([])\n setTimeout(() => {\n setRippleArray([newRipple])\n }, 0)\n }, [])\n\n if (props.isDisabled || props.isHidden) return null\n return (\n <RippleContainer id={DEFAULT_RIPPLE_ID} $duration={duration} $color={color} onMouseDown={onMouseDown}>\n {rippleArray.length > 0 &&\n rippleArray.map((ripple, index) => {\n return (\n <RippleSpan\n $duration={duration}\n $color={color}\n key={`span-${index}`}\n style={{\n top: ripple.y,\n left: ripple.x,\n width: ripple.size,\n height: ripple.size\n }}\n />\n )\n })}\n </RippleContainer>\n )\n}\n"],"names":["props","color","useMemo","duration","DEFAULT_RIPPLE_DURATION","rippleArray","setRippleArray","useState","rippleCount","cleanUpFunction","useLayoutEffect","bounce","clearTimeout","setTimeout","useDebouncedRippleCleanUp","length","onMouseDown","useCallback","event","isTrusted","rippleContainer","currentTarget","getBoundingClientRect","size","width","height","newRipple","x","pageX","y","pageY","isDisabled","isHidden","RippleContainer","id","DEFAULT_RIPPLE_ID","$duration","$color","children","map","ripple","index","jsx","RippleSpan","style","top","left"],"mappings":"0IAoCuCA,IACrC,MAAMC,EAAQC,EAAAA,QAAQ,IAAMF,EAAMC,OAAS,QAAS,CAACD,EAAMC,QACrDE,EAAWD,EAAAA,QAAQ,IAAMF,EAAMG,UAAYC,0BAAyB,CAACJ,EAAMG,YAE1EE,EAAaC,GAAkBC,EAAAA,SAA+B,IA7BrC,EAACC,EAAqBL,EAAkBM,KACxEC,EAAAA,gBAAgB,KAEd,IAAIC,EAAgC,KAcpC,OAbIH,EAAc,IACZG,GACFC,aAAaD,GAGfA,EAASE,WAAW,KAClBJ,IACIE,GACFC,aAAaD,IAEH,EAAXR,IAGE,KACDQ,GACFC,aAAaD,KAGhB,CAACH,EAAaL,EAAUM,KAS3BK,CAA0BT,EAAYU,OAAQZ,GAAYC,EAAAA,wBAAyB,KACjFE,EAAe,MAGjB,MAAMU,EAAcC,cAAaC,IAC/B,IAAKA,EAAMC,UAAW,OACtB,MAAMC,EAAkBF,EAAMG,cAAcC,wBACtCC,EAAOH,EAAgBI,MAAQJ,EAAgBK,OAASL,EAAgBI,MAAQJ,EAAgBK,OAGhGC,EAAY,CAAEC,EAFVT,EAAMU,MAAQR,EAAgBO,EAAIJ,EAAO,EAE5BM,EADbX,EAAMY,MAAQV,EAAgBS,EAAIN,EAAO,EACzBA,QAC1BjB,EAAe,IACfO,WAAW,KACTP,EAAe,CAACoB,KACf,IACF,IAEH,OAAI1B,EAAM+B,YAAc/B,EAAMgC,SAAiB,6BAE5CC,EAAAA,gBAAA,CAAgBC,GAAIC,EAAAA,kBAAmBC,UAAWjC,EAAUkC,OAAQpC,EAAOe,cACzEsB,SAAAjC,EAAYU,OAAS,GACpBV,EAAYkC,IAAI,CAACC,EAAQC,MAErBC,kBAAAA,IAACC,EAAAA,WAAA,CACCP,UAAWjC,EACXkC,OAAQpC,EAER2C,MAAO,CACLC,IAAKL,EAAOX,EACZiB,KAAMN,EAAOb,EACbH,MAAOgB,EAAOjB,KACdE,OAAQe,EAAOjB,OALZ,QAAQkB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-BrDlu8eK.js";
|
|
2
2
|
import { useRef, useCallback } from "react";
|
|
3
3
|
import { ImageSupportedFormatsForInput } from "./consts.es.js";
|
|
4
|
-
import { u as useImageCrop } from "./use-
|
|
5
|
-
import { c as Button } from "./component-
|
|
4
|
+
import { u as useImageCrop } from "./use-B6rT81uF.js";
|
|
5
|
+
import { c as Button } from "./component-CbPhVNw5.js";
|
|
6
6
|
const ImageButton = (props) => {
|
|
7
7
|
const refInput = useRef(null);
|
|
8
8
|
const handleOpenFileDialog = useCallback(() => {
|
|
@@ -47,4 +47,4 @@ const ImageButton = (props) => {
|
|
|
47
47
|
export {
|
|
48
48
|
ImageButton as I
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=component-
|
|
50
|
+
//# sourceMappingURL=component-DURhph1i.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-DURhph1i.js","sources":["../src/components/image-button/component.tsx"],"sourcesContent":["import { FC, useCallback, useRef } from 'react'\n\nimport { ImageSupportedFormatsForInput } from '@local/consts'\nimport { useImageCrop } from '@local/hooks/use-image-crop'\n\nimport { ImageButtonProps } from '.'\nimport { Button } from '../button'\n\nexport const ImageButton: FC<ImageButtonProps> = props => {\n const refInput = useRef<HTMLInputElement | null>(null)\n\n const handleOpenFileDialog = useCallback(() => {\n refInput.current?.click()\n }, [])\n\n const { handleAddFiles } = useImageCrop({\n onSave: props.onSave,\n locale: props.locale,\n dialog: props.dialog,\n imageSettings: props.imageSettings,\n refInput: refInput\n })\n\n return (\n <>\n <Button\n {...props.button}\n onClick={e => {\n props.button.onClick?.(e)\n handleOpenFileDialog()\n }}\n >\n {props.button.children || props.locale.buttonAdd}\n </Button>\n <input\n ref={refInput}\n type=\"file\"\n accept={ImageSupportedFormatsForInput}\n multiple\n style={{ display: 'none' }}\n onChange={e => {\n if (e.target.files) handleAddFiles(e.target.files)\n }}\n />\n </>\n )\n}\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;AAQO,MAAM,cAAoC,CAAA,UAAS;AACxD,QAAM,WAAW,OAAgC,IAAI;AAErD,QAAM,uBAAuB,YAAY,MAAM;;AAC7C,mBAAS,YAAT,mBAAkB;AAAA,EAAM,GACvB,EAAE;AAEL,QAAM,EAAE,eAAA,IAAmB,aAAa;AAAA,IACtC,QAAQ,MAAM;AAAA,IACd,QAAQ,MAAM;AAAA,IACd,QAAQ,MAAM;AAAA,IACd,eAAe,MAAM;AAAA,IACrB;AAAA,EAAA,CACD;AAED,SACEA,kCAAAA,KAAAC,4BAAA,EACE,UAAA;AAAA,IAAAC,kCAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG,MAAM;AAAA,QACV,SAAS,CAAA,MAAK;;AACZ,4BAAM,QAAO,YAAb,4BAAuB;AACvB,+BAAA;AAAA,QAAqB;AAAA,QAGtB,UAAA,MAAM,OAAO,YAAY,MAAM,OAAO;AAAA,MAAA;AAAA,IAAA;AAAA,IAEzCA,kCAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAK;AAAA,QACL,MAAK;AAAA,QACL,QAAQ;AAAA,QACR,UAAQ;AAAA,QACR,OAAO,EAAE,SAAS,OAAA;AAAA,QAClB,UAAU,CAAA,MAAK;AACb,cAAI,EAAE,OAAO,MAAO,gBAAe,EAAE,OAAO,KAAK;AAAA,QAAA;AAAA,MACnD;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),s=require("./component.styles-B-ZAk_1C.cjs"),i=require("./component.styles-Dpg-__rn.cjs"),t=require("./component-D7A-4DNQ.cjs"),o=require("./component-BnYw0FvH.cjs"),n=require("react"),r=require("styled-components"),d=require("framer-motion"),l=require("./style-f3_KtJIt.cjs"),c=require("./style-fRZ6xrVp.cjs"),u=require("./theme.global-BdZkriPJ.cjs"),a=r.css`
|
|
2
|
+
${e=>r.css`
|
|
3
|
+
background: ${e.theme.colors.button[e.$genre].background.rest};
|
|
4
|
+
border-color: ${e.theme.colors.button[e.$genre].border.rest};
|
|
5
|
+
color: ${e.theme.colors.button[e.$genre].color.rest};
|
|
6
|
+
&:hover {
|
|
7
|
+
${(!e.$isHidden||e.$isNotHoverEffect)&&r.css`
|
|
8
|
+
background: ${e.theme.colors.button[e.$genre].background.hover};
|
|
9
|
+
border-color: ${e.theme.colors.button[e.$genre].border.hover};
|
|
10
|
+
color: ${e.theme.colors.button[e.$genre].color.hover};
|
|
11
|
+
`}
|
|
12
|
+
}
|
|
13
|
+
`};
|
|
14
|
+
`,$=r.css`
|
|
15
|
+
${e=>e.$isHidden?r.css`
|
|
16
|
+
opacity: 0.5;
|
|
17
|
+
background: ${e.theme.colors.button[e.$genre].background.rest} !important;
|
|
18
|
+
color: ${e.theme.colors.button[e.$genre].color.rest} !important;
|
|
19
|
+
`:r.css`
|
|
20
|
+
opacity: 1;
|
|
21
|
+
`}
|
|
22
|
+
`,p=r.css`
|
|
23
|
+
${e=>e.$isHiddenBorder&&r.css`
|
|
24
|
+
border: 0px transparent !important;
|
|
25
|
+
`}
|
|
26
|
+
`,h=r.css`
|
|
27
|
+
${e=>e.$isRadius&&r.css`
|
|
28
|
+
border-radius: 100px;
|
|
29
|
+
`}
|
|
30
|
+
`,m=r.css`
|
|
31
|
+
${e=>e.$isPlaystationEffect&&r.css`
|
|
32
|
+
box-shadow: ${e.theme.effects.button};
|
|
33
|
+
`}
|
|
34
|
+
`,x=r.div`
|
|
35
|
+
${e=>e.$isIconGroup?r.css`
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: ${u.KEY_SIZE_DATA[e.$size].padding-2}px;
|
|
38
|
+
align-items: center;
|
|
39
|
+
order: ${e.$iconGroupOrder||"initial"};
|
|
40
|
+
`:r.css`
|
|
41
|
+
display: contents;
|
|
42
|
+
`}
|
|
43
|
+
`,g=r.css`
|
|
44
|
+
${e=>y({...u.KEY_SIZE_DATA[e.$size],isFullSize:e.$isFullSize,isWidthAsHeight:e.$isWidthAsHeight,isMinWidthAsContent:e.$isMinWidthAsContent})};
|
|
45
|
+
`,y=e=>r.css`
|
|
46
|
+
height: fit-content;
|
|
47
|
+
min-height: ${e.height}px;
|
|
48
|
+
max-height: fit-content;
|
|
49
|
+
padding: 2px ${e.padding}px;
|
|
50
|
+
border-radius: ${e.radius}px;
|
|
51
|
+
gap: ${e.padding-2}px;
|
|
52
|
+
${s=>o.getFontSizeStyles(e.font,700,s.theme.font.family)};
|
|
53
|
+
${()=>e.isFullSize&&r.css`
|
|
54
|
+
height: 100%;
|
|
55
|
+
width: 100%;
|
|
56
|
+
border-radius: 0px;
|
|
57
|
+
`};
|
|
58
|
+
${e.isWidthAsHeight&&r.css`
|
|
59
|
+
width: ${e.height}px;
|
|
60
|
+
min-width: ${e.height}px;
|
|
61
|
+
padding: 0px;
|
|
62
|
+
`};
|
|
63
|
+
${e.isMinWidthAsContent&&r.css`
|
|
64
|
+
min-width: max-content;
|
|
65
|
+
`};
|
|
66
|
+
`,b=r.css`
|
|
67
|
+
border: 1px solid transparent;
|
|
68
|
+
`,f=r.css`
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
`,z=r(d.motion.button)`
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
user-select: none;
|
|
75
|
+
|
|
76
|
+
${b};
|
|
77
|
+
${g};
|
|
78
|
+
${a};
|
|
79
|
+
${$};
|
|
80
|
+
${p};
|
|
81
|
+
${h};
|
|
82
|
+
${m};
|
|
83
|
+
${f};
|
|
84
|
+
${i.addRippleDefault};
|
|
85
|
+
${l.addTransition};
|
|
86
|
+
${l.addOutline};
|
|
87
|
+
${o.addSXTypography};
|
|
88
|
+
${c.addSX};
|
|
89
|
+
`;exports.Button=i=>{const d=r.useTheme(),l=n.useMemo(()=>{var t,o;return null==(o=null==(t=i.icons??[])?void 0:t.filter(e=>!e.isHidden))?void 0:o.map((t,o)=>"id"===(null==t?void 0:t.type)?e.jsxRuntimeExports.jsx(s.Icon,{name:null==t?void 0:t.name,type:"id",size:(null==t?void 0:t.size)??i.size,turn:t.turn,order:t.order},`${t.type}-${t.name}-${o}`):"logo"===(null==t?void 0:t.type)?e.jsxRuntimeExports.jsx(s.Icon,{name:null==t?void 0:t.name,type:"logo",size:(null==t?void 0:t.size)??i.size,turn:t.turn,order:t.order},`${t.type}-${t.name}-${o}`):"checkbox"===(null==t?void 0:t.type)?e.jsxRuntimeExports.jsx(s.Icon,{name:null==t?void 0:t.name,type:"checkbox",size:(null==t?void 0:t.size)??i.size,turn:t.turn,order:t.order},`${t.type}-${t.name}-${o}`):"loading"===(null==t?void 0:t.type)?e.jsxRuntimeExports.jsx(s.Icon,{name:null==t?void 0:t.name,type:"loading",size:(null==t?void 0:t.size)??i.size,turn:t.turn,order:t.order},`${t.type}-${t.name}-${o}`):"realebail"===(null==t?void 0:t.type)?e.jsxRuntimeExports.jsx(s.Icon,{name:null==t?void 0:t.name,type:"realebail",size:(null==t?void 0:t.size)??i.size,turn:t.turn,order:t.order},`${t.type}-${t.name}-${o}`):null)},[i.icons,i.size]),c=n.useRef(null),u=o.useMergeRefs([c,i.ref]);return e.jsxRuntimeExports.jsxs(z,{$isNotHoverEffect:i.isNotHoverEffect,whileTap:i.isWhileTapEffect?{scale:.9,transition:{duration:.02}}:{},id:i.id,tabIndex:i.tabIndex??0,$isFullSize:i.isFullSize,$genre:i.genre,$size:i.size,$isDisabled:i.isDisabled,$isMinWidthAsContent:i.isMinWidthAsContent,$isWidthAsHeight:i.isWidthAsHeight,$isRadius:i.isRadius,$isHidden:i.isHidden,$isPlaystationEffect:i.isPlaystationEffect,$sxTypography:i.sxTypography,$isHiddenBorder:i.isHiddenBorder||i.isPlaystationEffect,disabled:i.isDisabled,type:i.type??"button",className:i.className,onClick:e=>{!i.isDisabled&&i.onClick&&i.onClick(e)},onMouseDown:i.onMouseDown,ref:u,$sx:i.sx,children:[e.jsxRuntimeExports.jsx(t.Ripple,{color:d.colors.checkbox[i.genre].color.rest,isDisabled:i.isDisabled??i.isDisabledRipple,isHidden:i.isHidden}),!i.isOnlyIcon&&e.jsxRuntimeExports.jsx("div",{style:{order:0,display:"contents"},children:i.children&&i.children}),e.jsxRuntimeExports.jsx(x,{$size:i.size,$isIconGroup:i.isIconGroup,$iconGroupOrder:"iconGroupOrder"in i?i.iconGroupOrder:void 0,children:l})]})},exports.ButtonSize=g,exports.ButtonSizeConstructor=y,exports.StyledButton=z,exports.StyledButtonIconsWrapper=x;
|
|
90
|
+
//# sourceMappingURL=component-X4e7zEKk.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-X4e7zEKk.cjs","sources":["../src/components/button/component.styles.ts","../src/components/button/component.tsx"],"sourcesContent":["import { motion } from 'framer-motion'\nimport styled, { css } from 'styled-components'\n\nimport { addRippleDefault } from '@local/components/ripple'\nimport { addSXTypography, getFontSizeStyles } from '@local/components/typography'\nimport { addOutline, addTransition } from '@local/styles/add'\nimport { addSX } from '@local/styles/sx'\nimport { IThemeSizePropertyDefault, KEY_SIZE_DATA } from '@local/theme'\n\nimport { StyledDollarButtonIconsWrapperProps, StyledDollarButtonProps } from '.'\n\n/****************************************** Genre *************************************************/\nconst ButtonGenre = css<StyledDollarButtonProps>`\n ${props => css`\n background: ${props.theme.colors.button[props.$genre].background.rest};\n border-color: ${props.theme.colors.button[props.$genre].border.rest};\n color: ${props.theme.colors.button[props.$genre].color.rest};\n &:hover {\n ${(!props.$isHidden || props.$isNotHoverEffect) &&\n css`\n background: ${props.theme.colors.button[props.$genre].background.hover};\n border-color: ${props.theme.colors.button[props.$genre].border.hover};\n color: ${props.theme.colors.button[props.$genre].color.hover};\n `}\n }\n `};\n`\n\n/****************************************** Disabled *************************************************/\nconst ButtonDisabled = css<StyledDollarButtonProps>`\n ${props =>\n props.$isHidden\n ? css`\n opacity: 0.5;\n background: ${props.theme.colors.button[props.$genre].background.rest} !important;\n color: ${props.theme.colors.button[props.$genre].color.rest} !important;\n `\n : css`\n opacity: 1;\n `}\n`\n/****************************************** is HiddenBorder *************************************************/\nconst ButtonIsHiddenBorder = css<StyledDollarButtonProps>`\n ${props =>\n props.$isHiddenBorder &&\n css`\n border: 0px transparent !important;\n `}\n`\n/****************************************** is Radius *************************************************/\nconst ButtonIsRadius = css<StyledDollarButtonProps>`\n ${props =>\n props.$isRadius &&\n css`\n border-radius: 100px;\n `}\n`\n/****************************************** is PlaystationEffect *************************************************/\nconst ButtonIsPlaystationEffect = css<StyledDollarButtonProps>`\n ${props =>\n props.$isPlaystationEffect &&\n css`\n box-shadow: ${props.theme.effects.button};\n `}\n`\n/****************************************** Icons Wrapper *************************************************/\nexport const StyledButtonIconsWrapper = styled.div<StyledDollarButtonIconsWrapperProps>`\n ${props =>\n props.$isIconGroup\n ? css`\n display: flex;\n gap: ${KEY_SIZE_DATA[props.$size].padding - 2}px;\n align-items: center;\n order: ${props.$iconGroupOrder || 'initial'};\n `\n : css`\n display: contents;\n `}\n`\n\n/****************************************** Size *************************************************/\nexport const ButtonSize = css<StyledDollarButtonProps>`\n ${props =>\n ButtonSizeConstructor({\n ...KEY_SIZE_DATA[props.$size],\n isFullSize: props.$isFullSize,\n isWidthAsHeight: props.$isWidthAsHeight,\n isMinWidthAsContent: props.$isMinWidthAsContent\n })};\n`\nexport const ButtonSizeConstructor = (\n props: IThemeSizePropertyDefault & {\n isFullSize?: boolean\n isWidthAsHeight?: boolean\n isMinWidthAsContent?: boolean\n }\n) => css`\n height: fit-content;\n min-height: ${props.height}px;\n max-height: fit-content;\n padding: 2px ${props.padding}px;\n border-radius: ${props.radius}px;\n gap: ${props.padding - 2}px;\n ${params => getFontSizeStyles(props.font, 700, params.theme.font.family)};\n ${() =>\n props.isFullSize &&\n css`\n height: 100%;\n width: 100%;\n border-radius: 0px;\n `};\n ${props.isWidthAsHeight &&\n css`\n width: ${props.height}px;\n min-width: ${props.height}px;\n padding: 0px;\n `};\n ${props.isMinWidthAsContent &&\n css`\n min-width: max-content;\n `};\n`\n/****************************************** Border *************************************************/\nconst ButtonBorder = css`\n border: 1px solid transparent;\n`\n\n/****************************************** Flex *************************************************/\nconst ButtonFlex = css<StyledDollarButtonProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n`\n/****************************************** Styled *************************************************/\nexport const StyledButton = styled(motion.button)<StyledDollarButtonProps>`\n cursor: pointer;\n user-select: none;\n\n ${ButtonBorder};\n ${ButtonSize};\n ${ButtonGenre};\n ${ButtonDisabled};\n ${ButtonIsHiddenBorder};\n ${ButtonIsRadius};\n ${ButtonIsPlaystationEffect};\n ${ButtonFlex};\n ${addRippleDefault};\n ${addTransition};\n ${addOutline};\n ${addSXTypography};\n ${addSX};\n`\n","import {\n Icon,\n TIconCheckboxNameString,\n TIconIdNameString,\n TIconLoadingNameString,\n TIconLogoNameString,\n TIconRealEbailNameString,\n} from '@local/components/icon';\nimport { Ripple } from '@local/components/ripple';\n\nimport { useMergeRefs } from '@floating-ui/react';\nimport { FC, Ref, useMemo, useRef } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ButtonProps, StyledButton, StyledButtonIconsWrapper } from '.';\n\nexport const Button: FC<ButtonProps> = (props) => {\n const theme = useTheme();\n\n const iconComponents = useMemo(\n () =>\n (props.icons ?? [])\n ?.filter((icon) => !icon.isHidden)\n ?.map((icon, index) =>\n icon?.type === 'id' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconIdNameString}\n type='id'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : icon?.type === 'logo' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconLogoNameString}\n type='logo'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : icon?.type === 'checkbox' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconCheckboxNameString}\n type='checkbox'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : icon?.type === 'loading' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconLoadingNameString}\n type='loading'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : icon?.type === 'realebail' ? (\n <Icon\n key={`${icon.type}-${icon.name}-${index}`}\n name={icon?.name as TIconRealEbailNameString}\n type='realebail'\n size={icon?.size ?? props.size}\n turn={icon.turn}\n order={icon.order}\n />\n ) : null,\n ),\n [props.icons, props.size],\n );\n\n const handleClick: ButtonProps['onClick'] = (event) => {\n if (!props.isDisabled && props.onClick) {\n props.onClick(event);\n }\n };\n const refDefault = useRef<HTMLButtonElement>(null);\n\n const ref = useMergeRefs([refDefault, props.ref]);\n\n return (\n <StyledButton\n $isNotHoverEffect={props.isNotHoverEffect}\n whileTap={props.isWhileTapEffect ? { scale: 0.9, transition: { duration: 0.02 } } : {}}\n id={props.id}\n tabIndex={props.tabIndex ?? 0}\n $isFullSize={props.isFullSize}\n $genre={props.genre}\n $size={props.size}\n $isDisabled={props.isDisabled}\n $isMinWidthAsContent={props.isMinWidthAsContent}\n $isWidthAsHeight={props.isWidthAsHeight}\n $isRadius={props.isRadius}\n $isHidden={props.isHidden}\n $isPlaystationEffect={props.isPlaystationEffect}\n $sxTypography={props.sxTypography}\n $isHiddenBorder={props.isHiddenBorder || props.isPlaystationEffect}\n disabled={props.isDisabled}\n type={props.type ?? 'button'}\n className={props.className}\n onClick={handleClick}\n onMouseDown={props.onMouseDown}\n ref={ref as Ref<HTMLButtonElement>}\n $sx={props.sx}\n >\n <Ripple\n color={theme.colors.checkbox[props.genre].color.rest}\n isDisabled={props.isDisabled ?? props.isDisabledRipple}\n isHidden={props.isHidden}\n />\n\n {!props.isOnlyIcon && <div style={{ order: 0, display: 'contents' }}>{props.children && props.children}</div>}\n <StyledButtonIconsWrapper\n $size={props.size}\n $isIconGroup={props.isIconGroup}\n $iconGroupOrder={'iconGroupOrder' in props ? props.iconGroupOrder : undefined}\n >\n {iconComponents}\n </StyledButtonIconsWrapper>\n </StyledButton>\n );\n};\n"],"names":["ButtonGenre","css","props","theme","colors","button","$genre","background","rest","border","color","$isHidden","$isNotHoverEffect","hover","ButtonDisabled","ButtonIsHiddenBorder","$isHiddenBorder","ButtonIsRadius","$isRadius","ButtonIsPlaystationEffect","$isPlaystationEffect","effects","StyledButtonIconsWrapper","styled","div","$isIconGroup","KEY_SIZE_DATA","$size","padding","$iconGroupOrder","ButtonSize","ButtonSizeConstructor","isFullSize","$isFullSize","isWidthAsHeight","$isWidthAsHeight","isMinWidthAsContent","$isMinWidthAsContent","height","radius","params","getFontSizeStyles","font","family","ButtonBorder","ButtonFlex","StyledButton","motion","addRippleDefault","addTransition","addOutline","addSXTypography","addSX","useTheme","iconComponents","useMemo","_b","_a","icons","filter","icon","isHidden","map","index","type","jsx","Icon","name","size","turn","order","refDefault","useRef","ref","useMergeRefs","jsxs","isNotHoverEffect","whileTap","isWhileTapEffect","scale","transition","duration","id","tabIndex","genre","$isDisabled","isDisabled","isRadius","isPlaystationEffect","$sxTypography","sxTypography","isHiddenBorder","disabled","className","onClick","event","onMouseDown","$sx","sx","children","Ripple","checkbox","isDisabledRipple","isOnlyIcon","style","display","isIconGroup","iconGroupOrder"],"mappings":"2ZAYMA,EAAcC,EAAAA,GAAAA;IAChBC,GAASD,EAAAA,GAAAA;kBACKC,EAAMC,MAAMC,OAAOC,OAAOH,EAAMI,QAAQC,WAAWC;oBACjDN,EAAMC,MAAMC,OAAOC,OAAOH,EAAMI,QAAQG,OAAOD;aACtDN,EAAMC,MA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B5E,UAAWT,EAAM2D,SACjBzC,qBAAsBlB,EAAMsF,oBAC5BC,cAAevF,EAAMwF,aACrB1E,gBAAiBd,EAAMyF,gBAAkBzF,EAAMsF,oBAC/CI,SAAU1F,EAAMoF,WAChBtB,KAAM9D,EAAM8D,MAAQ,SACpB6B,UAAW3F,EAAM2F,UACjBC,QA7ByCC,KACtC7F,EAAMoF,YAAcpF,EAAM4F,SAC7B5F,EAAM4F,QAAQC,IA4BdC,YAAa9F,EAAM8F,YACnBvB,MACAwB,IAAK/F,EAAMgG,GAEXC,SAAA,GAAAlC,kBAAAA,IAACmC,EAAAA,OAAA,CACC1F,MAAOP,EAAMC,OAAOiG,SAASnG,EAAMkF,OAAO1E,MAAMF,KAChD8E,WAAYpF,EAAMoF,YAAcpF,EAAMoG,iBACtCzC,SAAU3D,EAAM2D,YAGhB3D,EAAMqG,YAActC,EAAAA,kBAAAA,IAAC,OAAIuC,MAAO,CAAElC,MAAO,EAAGmC,QAAS,YAAeN,SAAAjG,EAAMiG,UAAYjG,EAAMiG,aAC9FlC,kBAAAA,IAAC3C,EAAA,CACCK,MAAOzB,EAAMkE,KACb3C,aAAcvB,EAAMwG,YACpB7E,gBAAiB,mBAAoB3B,EAAQA,EAAMyG,oBAAiB,EAEnER,SAAA7C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./component.styles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./component.styles-DDUGBJle.cjs");exports.Accordion=o.Accordion,exports.AccordionDetails=o.AccordionDetails,exports.AccordionStyledIcon=o.AccordionStyledIcon,exports.AccordionSummary=o.AccordionSummary,exports.AccordionSummaryContent=o.AccordionSummaryContent,exports.AccordionWrapper=o.AccordionWrapper;
|
|
2
2
|
//# sourceMappingURL=component-accordion.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./component-C0atFCun.cjs");exports.ButtonGroup=t.ButtonGroup,exports.ButtonGroupWrapper=t.ButtonGroupWrapper;
|
|
2
2
|
//# sourceMappingURL=component-button-group.cjs.js.map
|
|
@@ -40,6 +40,7 @@ declare type ButtonPropsDefault = PropsWithChildren & {
|
|
|
40
40
|
size: IThemeSize;
|
|
41
41
|
genre: TButtonGenre;
|
|
42
42
|
id?: string;
|
|
43
|
+
tabIndex?: number;
|
|
43
44
|
ref?: Ref<HTMLElement | null>;
|
|
44
45
|
className?: string;
|
|
45
46
|
icons?: ((Omit<IconItemProps<'id'>, 'size'> & {
|
|
@@ -68,8 +69,10 @@ declare type ButtonPropsDefault = PropsWithChildren & {
|
|
|
68
69
|
isRadius?: boolean;
|
|
69
70
|
isHiddenBorder?: boolean;
|
|
70
71
|
isPlaystationEffect?: boolean;
|
|
72
|
+
isNotHoverEffect?: boolean;
|
|
71
73
|
isFullSize?: boolean;
|
|
72
74
|
onClick?: (event: default_2.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
75
|
+
onMouseDown?: (event: default_2.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
73
76
|
type?: 'button' | 'submit' | 'reset';
|
|
74
77
|
} & addSXProps & addSXTypographyProps;
|
|
75
78
|
|
|
@@ -296,7 +299,7 @@ declare type TypographyDefaultProps = {
|
|
|
296
299
|
decoration?: CSSProperties['textDecoration'];
|
|
297
300
|
family?: IThemeFontFamily;
|
|
298
301
|
flex?: string;
|
|
299
|
-
height?: number;
|
|
302
|
+
height?: number | string;
|
|
300
303
|
isHoverUnderlining?: boolean;
|
|
301
304
|
letterSpacing?: CSSProperties['letterSpacing'];
|
|
302
305
|
line?: number;
|
|
@@ -305,6 +308,7 @@ declare type TypographyDefaultProps = {
|
|
|
305
308
|
transform?: CSSProperties['textTransform'];
|
|
306
309
|
weight?: IThemeTypographyWeight;
|
|
307
310
|
wrap?: CSSProperties['textWrap'];
|
|
311
|
+
isNoUserSelect?: boolean;
|
|
308
312
|
};
|
|
309
313
|
|
|
310
314
|
declare type TypographySXProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./component-X4e7zEKk.cjs");exports.Button=t.Button,exports.ButtonSize=t.ButtonSize,exports.ButtonSizeConstructor=t.ButtonSizeConstructor,exports.StyledButton=t.StyledButton,exports.StyledButtonIconsWrapper=t.StyledButtonIconsWrapper;
|
|
2
2
|
//# sourceMappingURL=component-button.cjs.js.map
|
|
@@ -42,6 +42,7 @@ declare type ButtonPropsDefault = PropsWithChildren & {
|
|
|
42
42
|
size: IThemeSize;
|
|
43
43
|
genre: TButtonGenre;
|
|
44
44
|
id?: string;
|
|
45
|
+
tabIndex?: number;
|
|
45
46
|
ref?: Ref<HTMLElement | null>;
|
|
46
47
|
className?: string;
|
|
47
48
|
icons?: ((Omit<IconItemProps<'id'>, 'size'> & {
|
|
@@ -70,8 +71,10 @@ declare type ButtonPropsDefault = PropsWithChildren & {
|
|
|
70
71
|
isRadius?: boolean;
|
|
71
72
|
isHiddenBorder?: boolean;
|
|
72
73
|
isPlaystationEffect?: boolean;
|
|
74
|
+
isNotHoverEffect?: boolean;
|
|
73
75
|
isFullSize?: boolean;
|
|
74
76
|
onClick?: (event: default_2.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
77
|
+
onMouseDown?: (event: default_2.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
75
78
|
type?: 'button' | 'submit' | 'reset';
|
|
76
79
|
} & addSXProps & addSXTypographyProps;
|
|
77
80
|
|
|
@@ -286,7 +289,7 @@ export declare const StyledButtonIconsWrapper: IStyledComponentBase<"web", Subst
|
|
|
286
289
|
|
|
287
290
|
export declare type StyledDollarButtonIconsWrapperProps = AddDollarSign<Pick<ButtonProps, 'isIconGroup' | 'size'> & Pick<ButtonPropsIconGroup, 'iconGroupOrder'>>;
|
|
288
291
|
|
|
289
|
-
export declare type StyledDollarButtonProps = AddDollarSign<Pick<ButtonProps, 'genre' | 'isDisabled' | 'isHidden' | 'isWidthAsHeight' | 'isMinWidthAsContent' | 'isRadius' | 'isHiddenBorder' | 'isPlaystationEffect' | 'size' | 'isFullSize'>> & addSXStyleProps & addSXTypographyStyleProps;
|
|
292
|
+
export declare type StyledDollarButtonProps = AddDollarSign<Pick<ButtonProps, 'genre' | 'isDisabled' | 'isHidden' | 'isWidthAsHeight' | 'isMinWidthAsContent' | 'isRadius' | 'isHiddenBorder' | 'isPlaystationEffect' | 'size' | 'isFullSize' | 'isNotHoverEffect'>> & addSXStyleProps & addSXTypographyStyleProps;
|
|
290
293
|
|
|
291
294
|
declare type SXProps = ({
|
|
292
295
|
default: CSSObject;
|
|
@@ -323,7 +326,7 @@ declare type TypographyDefaultProps = {
|
|
|
323
326
|
decoration?: CSSProperties['textDecoration'];
|
|
324
327
|
family?: IThemeFontFamily;
|
|
325
328
|
flex?: string;
|
|
326
|
-
height?: number;
|
|
329
|
+
height?: number | string;
|
|
327
330
|
isHoverUnderlining?: boolean;
|
|
328
331
|
letterSpacing?: CSSProperties['letterSpacing'];
|
|
329
332
|
line?: number;
|
|
@@ -332,6 +335,7 @@ declare type TypographyDefaultProps = {
|
|
|
332
335
|
transform?: CSSProperties['textTransform'];
|
|
333
336
|
weight?: IThemeTypographyWeight;
|
|
334
337
|
wrap?: CSSProperties['textWrap'];
|
|
338
|
+
isNoUserSelect?: boolean;
|
|
335
339
|
};
|
|
336
340
|
|
|
337
341
|
declare type TypographySXProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./component.styles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./component.styles-q4ne6jV1.cjs");exports.CheckboxChildren=e.CheckboxChildren,exports.CheckboxGroup=e.CheckboxGroup,exports.CheckboxGroupItem=e.CheckboxGroupItem,exports.CheckboxGroupLabel=e.CheckboxGroupLabel,exports.CheckboxGroupSize=e.CheckboxGroupSize,exports.CheckboxGroupSizeConstructor=e.CheckboxGroupSizeConstructor,exports.CheckboxGroupWrapper=e.CheckboxGroupWrapper;
|
|
2
2
|
//# sourceMappingURL=component-checkbox-group.cjs.js.map
|