@tendaui/react 1.2.3 → 1.3.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/LICENSE +21 -21
- package/README.md +1 -1
- package/es/_chunks/dep--nQ-cjme.js +45 -0
- package/es/_chunks/dep--nQ-cjme.js.map +1 -0
- package/es/_chunks/{dep-DTlQ2dCA.js → dep--qagmRQa.js} +2 -2
- package/es/_chunks/{dep-DTlQ2dCA.js.map → dep--qagmRQa.js.map} +1 -1
- package/es/_chunks/{dep-Dr5wkz0z.js → dep--svkhMCP.js} +12 -12
- package/es/_chunks/{dep-Dr5wkz0z.js.map → dep--svkhMCP.js.map} +1 -1
- package/es/_chunks/{dep-Bjfn7Zv_.js → dep-2HsCYcmp.js} +5 -5
- package/es/_chunks/{dep-Bjfn7Zv_.js.map → dep-2HsCYcmp.js.map} +1 -1
- package/es/_chunks/{dep-CkmtEv0Y.js → dep-B2D1svZy.js} +4 -2
- package/es/_chunks/dep-B2D1svZy.js.map +1 -0
- package/es/_chunks/{dep-BuIAffJt.js → dep-BI5F2D3y.js} +23 -13
- package/es/_chunks/dep-BI5F2D3y.js.map +1 -0
- package/es/_chunks/dep-BK4_iOSv.js +68 -0
- package/es/_chunks/dep-BK4_iOSv.js.map +1 -0
- package/es/_chunks/{dep-BYlJzn45.js → dep-BOj-ayw6.js} +26 -26
- package/es/_chunks/{dep-BYlJzn45.js.map → dep-BOj-ayw6.js.map} +1 -1
- package/es/_chunks/{dep-D68MD94M.js → dep-BZdpKjaa.js} +18 -18
- package/es/_chunks/{dep-D68MD94M.js.map → dep-BZdpKjaa.js.map} +1 -1
- package/es/_chunks/{dep-aX8qrQpB.js → dep-BbOvNxhg.js} +4 -4
- package/es/_chunks/{dep-aX8qrQpB.js.map → dep-BbOvNxhg.js.map} +1 -1
- package/es/_chunks/{dep-oUgTcXgm.js → dep-Blkje0_M.js} +2 -2
- package/es/_chunks/{dep-oUgTcXgm.js.map → dep-Blkje0_M.js.map} +1 -1
- package/es/_chunks/{dep-DJmE940f.js → dep-CHpQ3xhh.js} +2 -2
- package/es/_chunks/dep-CHpQ3xhh.js.map +1 -0
- package/es/_chunks/{dep-DX65P8M9.js → dep-CPjkUfQu.js} +2 -2
- package/es/_chunks/{dep-DX65P8M9.js.map → dep-CPjkUfQu.js.map} +1 -1
- package/es/_chunks/dep-CSzOEACo.js +165 -0
- package/es/_chunks/dep-CSzOEACo.js.map +1 -0
- package/es/_chunks/{dep-CJCt0IS0.js → dep-Cd1UOXnJ.js} +14 -14
- package/es/_chunks/{dep-CJCt0IS0.js.map → dep-Cd1UOXnJ.js.map} +1 -1
- package/es/_chunks/{dep-DQ6kXoi8.js → dep-DHWwZ2Nj.js} +2 -2
- package/es/_chunks/{dep-DQ6kXoi8.js.map → dep-DHWwZ2Nj.js.map} +1 -1
- package/es/_chunks/{dep-Tshfumgl.js → dep-DYFbjXzW.js} +2 -2
- package/es/_chunks/{dep-Tshfumgl.js.map → dep-DYFbjXzW.js.map} +1 -1
- package/es/_chunks/{dep-C_wPqvpm.js → dep-D_qcGLah.js} +2 -2
- package/es/_chunks/{dep-C_wPqvpm.js.map → dep-D_qcGLah.js.map} +1 -1
- package/es/_chunks/dep-DbVHGoUC.js.map +1 -1
- package/es/_chunks/{dep-CsSvR9wN.js → dep-DfsP8eqT.js} +21 -21
- package/es/_chunks/{dep-CsSvR9wN.js.map → dep-DfsP8eqT.js.map} +1 -1
- package/es/_chunks/dep-Dl5DFuGU.js +2001 -0
- package/es/_chunks/dep-Dl5DFuGU.js.map +1 -0
- package/es/_chunks/{dep-DURB9x8g.js → dep-Dnwq3YvL.js} +36 -21
- package/es/_chunks/dep-Dnwq3YvL.js.map +1 -0
- package/es/_chunks/{dep-B4_O1Vgv.js → dep-Dr3i7zFt.js} +12 -12
- package/es/_chunks/{dep-B4_O1Vgv.js.map → dep-Dr3i7zFt.js.map} +1 -1
- package/es/_chunks/{dep-CD_4-1Xb.js → dep-UHQn9biR.js} +5 -5
- package/es/_chunks/dep-UHQn9biR.js.map +1 -0
- package/es/_chunks/{dep-ByzdZjUR.js → dep-bWaVq_y3.js} +2 -2
- package/es/_chunks/{dep-ByzdZjUR.js.map → dep-bWaVq_y3.js.map} +1 -1
- package/es/_chunks/{dep-DwWrhxkd.js → dep-grkSd2UB.js} +3 -3
- package/es/_chunks/{dep-DwWrhxkd.js.map → dep-grkSd2UB.js.map} +1 -1
- package/es/_chunks/{dep-CMPsNAXF.js → dep-hCWFQAqL.js} +15 -9
- package/es/_chunks/dep-hCWFQAqL.js.map +1 -0
- package/es/_chunks/{dep-D6YxJv-F.js → dep-spxR0DG0.js} +3 -3
- package/es/_chunks/{dep-D6YxJv-F.js.map → dep-spxR0DG0.js.map} +1 -1
- package/es/_chunks/{dep-gy8uvBaS.js → dep-u1x3x6MJ.js} +2 -2
- package/es/_chunks/{dep-gy8uvBaS.js.map → dep-u1x3x6MJ.js.map} +1 -1
- package/es/alert/Alert.js +25 -24
- package/es/alert/Alert.js.map +1 -1
- package/es/alert/_example/base.js +27 -0
- package/es/alert/_example/base.js.map +1 -0
- package/es/alert/_example/collapse.js +14 -0
- package/es/alert/_example/collapse.js.map +1 -0
- package/es/alert/index.js +6 -5
- package/es/alert/index.js.map +1 -1
- package/es/badge/Badge.js +6 -5
- package/es/badge/Badge.js.map +1 -1
- package/es/badge/_example/base.js +11 -0
- package/es/badge/_example/base.js.map +1 -0
- package/es/badge/_example/count.js +38 -0
- package/es/badge/_example/count.js.map +1 -0
- package/es/badge/_example/custom-color.js +48 -0
- package/es/badge/_example/custom-color.js.map +1 -0
- package/es/badge/_example/dot.js +36 -0
- package/es/badge/_example/dot.js.map +1 -0
- package/es/badge/_example/max-count.js +37 -0
- package/es/badge/_example/max-count.js.map +1 -0
- package/es/badge/_example/offset.js +41 -0
- package/es/badge/_example/offset.js.map +1 -0
- package/es/badge/_example/shape.js +47 -0
- package/es/badge/_example/shape.js.map +1 -0
- package/es/badge/_example/show-zero.js +31 -0
- package/es/badge/_example/show-zero.js.map +1 -0
- package/es/badge/_example/size.js +54 -0
- package/es/badge/_example/size.js.map +1 -0
- package/es/badge/_example/standalone.js +27 -0
- package/es/badge/_example/standalone.js.map +1 -0
- package/es/badge/_example/text-count.js +32 -0
- package/es/badge/_example/text-count.js.map +1 -0
- package/es/badge/_example/with-button.js +33 -0
- package/es/badge/_example/with-button.js.map +1 -0
- package/es/badge/index.js +3 -2
- package/es/badge/index.js.map +1 -1
- package/es/button/Button.js +10 -9
- package/es/button/Button.js.map +1 -1
- package/es/button/__tests__/Button.test.js +54700 -0
- package/es/button/__tests__/Button.test.js.map +1 -0
- package/es/button/_example/base.js +3 -3
- package/es/button/_example/base.js.map +1 -1
- package/es/button/_example/block.js +26 -0
- package/es/button/_example/block.js.map +1 -0
- package/es/button/_example/disabled.js +32 -0
- package/es/button/_example/disabled.js.map +1 -0
- package/es/button/_example/ghost.js +32 -0
- package/es/button/_example/ghost.js.map +1 -0
- package/es/button/_example/icon.js +10 -10
- package/es/button/_example/icon.js.map +1 -1
- package/es/button/_example/link.js +24 -0
- package/es/button/_example/link.js.map +1 -0
- package/es/button/_example/loading.js +28 -0
- package/es/button/_example/loading.js.map +1 -0
- package/es/button/_example/shape.js +31 -0
- package/es/button/_example/shape.js.map +1 -0
- package/es/button/_example/size.js +25 -0
- package/es/button/_example/size.js.map +1 -0
- package/es/button/_example/suffix.js +23 -0
- package/es/button/_example/suffix.js.map +1 -0
- package/es/button/_example/theme.js +25 -0
- package/es/button/_example/theme.js.map +1 -0
- package/es/button/_example/variant-base.js +30 -0
- package/es/button/_example/variant-base.js.map +1 -0
- package/es/button/_example/variant-dashed.js +30 -0
- package/es/button/_example/variant-dashed.js.map +1 -0
- package/es/button/_example/variant-outline.js +30 -0
- package/es/button/_example/variant-outline.js.map +1 -0
- package/es/button/_example/variant-text.js +30 -0
- package/es/button/_example/variant-text.js.map +1 -0
- package/es/button/index.js +5 -4
- package/es/button/index.js.map +1 -1
- package/es/button/style/index.css +3 -3
- package/es/checkbox/Checkbox.js +6 -5
- package/es/checkbox/Checkbox.js.map +1 -1
- package/es/checkbox/CheckboxGroup.js +6 -5
- package/es/checkbox/CheckboxGroup.js.map +1 -1
- package/es/checkbox/_example/base.js +9 -0
- package/es/checkbox/_example/base.js.map +1 -0
- package/es/checkbox/_example/controlled.js +19 -0
- package/es/checkbox/_example/controlled.js.map +1 -0
- package/es/checkbox/_example/group-disabled.js +20 -0
- package/es/checkbox/_example/group-disabled.js.map +1 -0
- package/es/checkbox/_example/group-with-check-all.js +41 -0
- package/es/checkbox/_example/group-with-check-all.js.map +1 -0
- package/es/checkbox/_example/group-with-max.js +34 -0
- package/es/checkbox/_example/group-with-max.js.map +1 -0
- package/es/checkbox/_example/group-with-options.js +40 -0
- package/es/checkbox/_example/group-with-options.js.map +1 -0
- package/es/checkbox/_example/group.js +33 -0
- package/es/checkbox/_example/group.js.map +1 -0
- package/es/checkbox/_example/states.js +27 -0
- package/es/checkbox/_example/states.js.map +1 -0
- package/es/checkbox/index.js +6 -5
- package/es/checkbox/index.js.map +1 -1
- package/es/color-picker/ColorPickPanel.js +76 -12
- package/es/color-picker/ColorPickPanel.js.map +1 -1
- package/es/color-picker/ColorPicker.js +67 -18
- package/es/color-picker/ColorPicker.js.map +1 -1
- package/es/color-picker/_example/base.js +26 -0
- package/es/color-picker/_example/base.js.map +1 -0
- package/es/color-picker/_example/borderless.js +29 -0
- package/es/color-picker/_example/borderless.js.map +1 -0
- package/es/color-picker/_example/clearable.js +29 -0
- package/es/color-picker/_example/clearable.js.map +1 -0
- package/es/color-picker/_example/disabled.js +29 -0
- package/es/color-picker/_example/disabled.js.map +1 -0
- package/es/color-picker/_example/formats.js +79 -0
- package/es/color-picker/_example/formats.js.map +1 -0
- package/es/color-picker/_example/manual-input.js +91 -0
- package/es/color-picker/_example/manual-input.js.map +1 -0
- package/es/color-picker/_example/recent-colors.js +31 -0
- package/es/color-picker/_example/recent-colors.js.map +1 -0
- package/es/color-picker/_example/swatch-colors.js +27 -0
- package/es/color-picker/_example/swatch-colors.js.map +1 -0
- package/es/color-picker/_example/with-alpha.js +35 -0
- package/es/color-picker/_example/with-alpha.js.map +1 -0
- package/es/color-picker/components/panel/alpha.js +5 -4
- package/es/color-picker/components/panel/alpha.js.map +1 -1
- package/es/color-picker/components/panel/format/index.js +25 -23
- package/es/color-picker/components/panel/format/index.js.map +1 -1
- package/es/color-picker/components/panel/format/inputs.js +20 -18
- package/es/color-picker/components/panel/format/inputs.js.map +1 -1
- package/es/color-picker/components/panel/header.js +16 -14
- package/es/color-picker/components/panel/header.js.map +1 -1
- package/es/color-picker/components/panel/hue.js +5 -4
- package/es/color-picker/components/panel/hue.js.map +1 -1
- package/es/color-picker/components/panel/index.js +73 -9
- package/es/color-picker/components/panel/index.js.map +1 -1
- package/es/color-picker/components/panel/saturation.js +6 -5
- package/es/color-picker/components/panel/saturation.js.map +1 -1
- package/es/color-picker/components/panel/slider.js +9 -8
- package/es/color-picker/components/panel/slider.js.map +1 -1
- package/es/color-picker/components/panel/swatches.js +17 -16
- package/es/color-picker/components/panel/swatches.js.map +1 -1
- package/es/color-picker/components/trigger.js +58 -25
- package/es/color-picker/components/trigger.js.map +1 -1
- package/es/color-picker/index.js +63 -20
- package/es/color-picker/index.js.map +1 -1
- package/es/color-picker/utils/color-picker/index.js +4 -67
- package/es/color-picker/utils/color-picker/index.js.map +1 -1
- package/es/common/Check.js +11 -10
- package/es/common/Check.js.map +1 -1
- package/es/common/FakeArrow.js +6 -5
- package/es/common/FakeArrow.js.map +1 -1
- package/es/common/PluginContainer.js +4 -3
- package/es/common/PluginContainer.js.map +1 -1
- package/es/common/Portal.js +3 -2
- package/es/common/Portal.js.map +1 -1
- package/es/config-provider/ConfigContext.js +303 -4
- package/es/config-provider/ConfigContext.js.map +1 -1
- package/es/config-provider/ConfigProvider.js +17 -4
- package/es/config-provider/ConfigProvider.js.map +1 -1
- package/es/config-provider/index.js +2 -1
- package/es/config-provider/index.js.map +1 -1
- package/es/dialog/Dialog.js +19 -18
- package/es/dialog/Dialog.js.map +1 -1
- package/es/dialog/DialogCard.js +8 -7
- package/es/dialog/DialogCard.js.map +1 -1
- package/es/dialog/_example/base.js +32 -0
- package/es/dialog/_example/base.js.map +1 -0
- package/es/dialog/_example/confirm-loading.js +38 -0
- package/es/dialog/_example/confirm-loading.js.map +1 -0
- package/es/dialog/_example/custom-buttons.js +36 -0
- package/es/dialog/_example/custom-buttons.js.map +1 -0
- package/es/dialog/_example/full-screen.js +33 -0
- package/es/dialog/_example/full-screen.js.map +1 -0
- package/es/dialog/_example/hide-buttons.js +50 -0
- package/es/dialog/_example/hide-buttons.js.map +1 -0
- package/es/dialog/_example/modeless.js +30 -0
- package/es/dialog/_example/modeless.js.map +1 -0
- package/es/dialog/_example/placement.js +53 -0
- package/es/dialog/_example/placement.js.map +1 -0
- package/es/dialog/_example/plugin-example.js +81 -0
- package/es/dialog/_example/plugin-example.js.map +1 -0
- package/es/dialog/_example/themes.js +62 -0
- package/es/dialog/_example/themes.js.map +1 -0
- package/es/dialog/index.js +10 -9
- package/es/dialog/index.js.map +1 -1
- package/es/dialog/plugin.js +15 -14
- package/es/dialog/plugin.js.map +1 -1
- package/es/dialog/style/index.css +3 -3
- package/es/drawer/Drawer.js +46 -37
- package/es/drawer/Drawer.js.map +1 -1
- package/es/drawer/_example/custom-header-footer.js +78 -0
- package/es/drawer/_example/custom-header-footer.js.map +1 -0
- package/es/drawer/_example/default.js +61 -0
- package/es/drawer/_example/default.js.map +1 -0
- package/es/drawer/_example/events.js +81 -0
- package/es/drawer/_example/events.js.map +1 -0
- package/es/drawer/_example/no-footer.js +62 -0
- package/es/drawer/_example/no-footer.js.map +1 -0
- package/es/drawer/_example/no-overlay.js +62 -0
- package/es/drawer/_example/no-overlay.js.map +1 -0
- package/es/drawer/_example/placement.js +91 -0
- package/es/drawer/_example/placement.js.map +1 -0
- package/es/drawer/_example/size-draggable.js +65 -0
- package/es/drawer/_example/size-draggable.js.map +1 -0
- package/es/drawer/_example/size.js +96 -0
- package/es/drawer/_example/size.js.map +1 -0
- package/es/drawer/index.js +9 -8
- package/es/drawer/index.js.map +1 -1
- package/es/drawer/style/index.css +4 -4
- package/es/fireworks/Fireworks.js +7 -6
- package/es/fireworks/Fireworks.js.map +1 -1
- package/es/fireworks/index.js +3 -2
- package/es/fireworks/index.js.map +1 -1
- package/es/form/Form.js +26 -173
- package/es/form/Form.js.map +1 -1
- package/es/form/FormContext.js +5 -5
- package/es/form/FormContext.js.map +1 -1
- package/es/form/FormItem.js +12 -11
- package/es/form/FormItem.js.map +1 -1
- package/es/form/FormList.js +2 -2
- package/es/form/FormList.js.map +1 -1
- package/es/form/_example/complex.js +105 -0
- package/es/form/_example/complex.js.map +1 -0
- package/es/form/_example/default.js +87 -0
- package/es/form/_example/default.js.map +1 -0
- package/es/form/_example/disabled.js +40 -0
- package/es/form/_example/disabled.js.map +1 -0
- package/es/form/_example/form-list.js +122 -0
- package/es/form/_example/form-list.js.map +1 -0
- package/es/form/_example/inline-layout.js +32 -0
- package/es/form/_example/inline-layout.js.map +1 -0
- package/es/form/_example/label-align.js +73 -0
- package/es/form/_example/label-align.js.map +1 -0
- package/es/form/_example/methods.js +118 -0
- package/es/form/_example/methods.js.map +1 -0
- package/es/form/_example/validation.js +97 -0
- package/es/form/_example/validation.js.map +1 -0
- package/es/form/hooks/useFormItemStyle.js +5 -4
- package/es/form/hooks/useFormItemStyle.js.map +1 -1
- package/es/form/hooks/useInstance.js +5 -4
- package/es/form/hooks/useInstance.js.map +1 -1
- package/es/form/index.js +22 -17
- package/es/form/index.js.map +1 -1
- package/es/form/style/index.css +6 -6
- package/es/hooks/useDragSorter.js +4 -4
- package/es/hooks/useDragSorter.js.map +1 -1
- package/es/index.js +37 -30
- package/es/index.js.map +1 -1
- package/es/input/Input.js +165 -26
- package/es/input/Input.js.map +1 -1
- package/es/input/InputGroup.js +2 -2
- package/es/input/InputGroup.js.map +1 -1
- package/es/input/_example/auto-width.js +53 -0
- package/es/input/_example/auto-width.js.map +1 -0
- package/es/input/_example/borderless.js +52 -0
- package/es/input/_example/borderless.js.map +1 -0
- package/es/input/_example/clearable.js +54 -0
- package/es/input/_example/clearable.js.map +1 -0
- package/es/input/_example/default.js +37 -0
- package/es/input/_example/default.js.map +1 -0
- package/es/input/_example/disabled-readonly.js +48 -0
- package/es/input/_example/disabled-readonly.js.map +1 -0
- package/es/input/_example/events.js +87 -0
- package/es/input/_example/events.js.map +1 -0
- package/es/input/_example/group.js +47 -0
- package/es/input/_example/group.js.map +1 -0
- package/es/input/_example/label-suffix.js +48 -0
- package/es/input/_example/label-suffix.js.map +1 -0
- package/es/input/_example/max-length.js +44 -0
- package/es/input/_example/max-length.js.map +1 -0
- package/es/input/_example/password.js +43 -0
- package/es/input/_example/password.js.map +1 -0
- package/es/input/_example/sizes.js +47 -0
- package/es/input/_example/sizes.js.map +1 -0
- package/es/input/_example/status.js +55 -0
- package/es/input/_example/status.js.map +1 -0
- package/es/input/_example/text-align.js +50 -0
- package/es/input/_example/text-align.js.map +1 -0
- package/es/input/_example/with-icon.js +48 -0
- package/es/input/_example/with-icon.js.map +1 -0
- package/es/input/index.js +6 -5
- package/es/input/index.js.map +1 -1
- package/es/input/style/index.css +18 -9
- package/es/input-number/InputNumber.js +19 -18
- package/es/input-number/InputNumber.js.map +1 -1
- package/es/input-number/_example/align.js +88 -0
- package/es/input-number/_example/align.js.map +1 -0
- package/es/input-number/_example/auto-width.js +54 -0
- package/es/input-number/_example/auto-width.js.map +1 -0
- package/es/input-number/_example/default.js +55 -0
- package/es/input-number/_example/default.js.map +1 -0
- package/es/input-number/_example/events.js +103 -0
- package/es/input-number/_example/events.js.map +1 -0
- package/es/input-number/_example/format.js +94 -0
- package/es/input-number/_example/format.js.map +1 -0
- package/es/input-number/_example/large-number.js +81 -0
- package/es/input-number/_example/large-number.js.map +1 -0
- package/es/input-number/_example/min-max.js +70 -0
- package/es/input-number/_example/min-max.js.map +1 -0
- package/es/input-number/_example/sizes.js +128 -0
- package/es/input-number/_example/sizes.js.map +1 -0
- package/es/input-number/_example/status.js +175 -0
- package/es/input-number/_example/status.js.map +1 -0
- package/es/input-number/_example/step-and-decimal.js +70 -0
- package/es/input-number/_example/step-and-decimal.js.map +1 -0
- package/es/input-number/_example/themes.js +80 -0
- package/es/input-number/_example/themes.js.map +1 -0
- package/es/input-number/_example/with-suffix.js +74 -0
- package/es/input-number/_example/with-suffix.js.map +1 -0
- package/es/input-number/index.js +9 -8
- package/es/input-number/index.js.map +1 -1
- package/es/input-number/style/index.css +47 -31
- package/es/input-number/useInputNumber.js +5 -4
- package/es/input-number/useInputNumber.js.map +1 -1
- package/es/ip-input/IPInput.js +5 -4
- package/es/ip-input/IPInput.js.map +1 -1
- package/es/ip-input/_example/controlled.js +65 -0
- package/es/ip-input/_example/controlled.js.map +1 -0
- package/es/ip-input/_example/default.js +27 -0
- package/es/ip-input/_example/default.js.map +1 -0
- package/es/ip-input/_example/full-featured.js +48 -0
- package/es/ip-input/_example/full-featured.js.map +1 -0
- package/es/ip-input/_example/ipv6.js +47 -0
- package/es/ip-input/_example/ipv6.js.map +1 -0
- package/es/ip-input/_example/keyboard-navigation.js +46 -0
- package/es/ip-input/_example/keyboard-navigation.js.map +1 -0
- package/es/ip-input/_example/paste-demo.js +54 -0
- package/es/ip-input/_example/paste-demo.js.map +1 -0
- package/es/ip-input/_example/states.js +52 -0
- package/es/ip-input/_example/states.js.map +1 -0
- package/es/ip-input/_example/with-cidr.js +47 -0
- package/es/ip-input/_example/with-cidr.js.map +1 -0
- package/es/ip-input/index.js +5 -4
- package/es/ip-input/index.js.map +1 -1
- package/es/layout/Aside.js +5 -4
- package/es/layout/Aside.js.map +1 -1
- package/es/layout/Layout.js +10 -9
- package/es/layout/Layout.js.map +1 -1
- package/es/layout/_example/combine-left.js +68 -0
- package/es/layout/_example/combine-left.js.map +1 -0
- package/es/layout/_example/combine-right.js +68 -0
- package/es/layout/_example/combine-right.js.map +1 -0
- package/es/layout/_example/custom-aside-width.js +69 -0
- package/es/layout/_example/custom-aside-width.js.map +1 -0
- package/es/layout/_example/custom-height.js +59 -0
- package/es/layout/_example/custom-height.js.map +1 -0
- package/es/layout/_example/double-sidebar.js +72 -0
- package/es/layout/_example/double-sidebar.js.map +1 -0
- package/es/layout/_example/side-navigation-right.js +66 -0
- package/es/layout/_example/side-navigation-right.js.map +1 -0
- package/es/layout/_example/side-navigation.js +66 -0
- package/es/layout/_example/side-navigation.js.map +1 -0
- package/es/layout/_example/top-navigation.js +57 -0
- package/es/layout/_example/top-navigation.js.map +1 -0
- package/es/layout/index.js +4 -3
- package/es/layout/index.js.map +1 -1
- package/es/list/List.js +18 -17
- package/es/list/List.js.map +1 -1
- package/es/list/ListItem.js +7 -6
- package/es/list/ListItem.js.map +1 -1
- package/es/list/ListItemMeta.js +12 -11
- package/es/list/ListItemMeta.js.map +1 -1
- package/es/list/_example/async-loading.js +114 -0
- package/es/list/_example/async-loading.js.map +1 -0
- package/es/list/_example/default.js +62 -0
- package/es/list/_example/default.js.map +1 -0
- package/es/list/_example/header-footer.js +98 -0
- package/es/list/_example/header-footer.js.map +1 -0
- package/es/list/_example/multiline.js +66 -0
- package/es/list/_example/multiline.js.map +1 -0
- package/es/list/_example/scroll-loading.js +133 -0
- package/es/list/_example/scroll-loading.js.map +1 -0
- package/es/list/_example/sizes.js +94 -0
- package/es/list/_example/sizes.js.map +1 -0
- package/es/list/_example/split.js +93 -0
- package/es/list/_example/split.js.map +1 -0
- package/es/list/_example/stripe.js +68 -0
- package/es/list/_example/stripe.js.map +1 -0
- package/es/list/_example/virtual-scroll.js +97 -0
- package/es/list/_example/virtual-scroll.js.map +1 -0
- package/es/list/_example/with-image.js +72 -0
- package/es/list/_example/with-image.js.map +1 -0
- package/es/list/index.js +6 -5
- package/es/list/index.js.map +1 -1
- package/es/list/style/index.css +5 -5
- package/es/loading/Gradient.js +8 -7
- package/es/loading/Gradient.js.map +1 -1
- package/es/loading/Loading.js +14 -13
- package/es/loading/Loading.js.map +1 -1
- package/es/loading/_example/default.js +30 -0
- package/es/loading/_example/default.js.map +1 -0
- package/es/loading/_example/delay.js +70 -0
- package/es/loading/_example/delay.js.map +1 -0
- package/es/loading/_example/fullscreen.js +38 -0
- package/es/loading/_example/fullscreen.js.map +1 -0
- package/es/loading/_example/inherit-color.js +58 -0
- package/es/loading/_example/inherit-color.js.map +1 -0
- package/es/loading/_example/no-overlay.js +28 -0
- package/es/loading/_example/no-overlay.js.map +1 -0
- package/es/loading/_example/sizes.js +84 -0
- package/es/loading/_example/sizes.js.map +1 -0
- package/es/loading/_example/with-text.js +41 -0
- package/es/loading/_example/with-text.js.map +1 -0
- package/es/loading/_example/wrapper.js +41 -0
- package/es/loading/_example/wrapper.js.map +1 -0
- package/es/loading/index.js +4 -3
- package/es/loading/index.js.map +1 -1
- package/es/notification/NotifyContainer.js +7 -6
- package/es/notification/NotifyContainer.js.map +1 -1
- package/es/notification/NotifyContext.js +7 -6
- package/es/notification/NotifyContext.js.map +1 -1
- package/es/notification/NotifyItem.js +20 -19
- package/es/notification/NotifyItem.js.map +1 -1
- package/es/notification/_example/default.js +55 -0
- package/es/notification/_example/default.js.map +1 -0
- package/es/notification/_example/long-content.js +36 -0
- package/es/notification/_example/long-content.js.map +1 -0
- package/es/notification/_example/stacking.js +56 -0
- package/es/notification/_example/stacking.js.map +1 -0
- package/es/notification/_example/types.js +75 -0
- package/es/notification/_example/types.js.map +1 -0
- package/es/notification/_example/usage-example.js +68 -0
- package/es/notification/_example/usage-example.js.map +1 -0
- package/es/notification/index.js +3 -2
- package/es/notification/index.js.map +1 -1
- package/es/notification/style/index.css +4 -4
- package/es/popup/Popup.js +30 -17
- package/es/popup/Popup.js.map +1 -1
- package/es/popup/_example/controlled.js +55 -0
- package/es/popup/_example/controlled.js.map +1 -0
- package/es/popup/_example/custom-content.js +81 -0
- package/es/popup/_example/custom-content.js.map +1 -0
- package/es/popup/_example/default.js +24 -0
- package/es/popup/_example/default.js.map +1 -0
- package/es/popup/_example/delay.js +43 -0
- package/es/popup/_example/delay.js.map +1 -0
- package/es/popup/_example/disabled.js +35 -0
- package/es/popup/_example/disabled.js.map +1 -0
- package/es/popup/_example/no-arrow.js +32 -0
- package/es/popup/_example/no-arrow.js.map +1 -0
- package/es/popup/_example/placements.js +138 -0
- package/es/popup/_example/placements.js.map +1 -0
- package/es/popup/_example/triggers.js +49 -0
- package/es/popup/_example/triggers.js.map +1 -0
- package/es/popup/index.js +5 -4
- package/es/popup/index.js.map +1 -1
- package/es/radio/Radio.js +8 -7
- package/es/radio/Radio.js.map +1 -1
- package/es/radio/RadioGroup.js +8 -7
- package/es/radio/RadioGroup.js.map +1 -1
- package/es/radio/_example/allow-uncheck.js +37 -0
- package/es/radio/_example/allow-uncheck.js.map +1 -0
- package/es/radio/_example/button-style.js +79 -0
- package/es/radio/_example/button-style.js.map +1 -0
- package/es/radio/_example/controlled.js +19 -0
- package/es/radio/_example/controlled.js.map +1 -0
- package/es/radio/_example/default.js +11 -0
- package/es/radio/_example/default.js.map +1 -0
- package/es/radio/_example/group-disabled.js +34 -0
- package/es/radio/_example/group-disabled.js.map +1 -0
- package/es/radio/_example/group-with-options.js +40 -0
- package/es/radio/_example/group-with-options.js.map +1 -0
- package/es/radio/_example/group.js +33 -0
- package/es/radio/_example/group.js.map +1 -0
- package/es/radio/_example/sizes.js +57 -0
- package/es/radio/_example/sizes.js.map +1 -0
- package/es/radio/_example/states.js +25 -0
- package/es/radio/_example/states.js.map +1 -0
- package/es/radio/index.js +8 -7
- package/es/radio/index.js.map +1 -1
- package/es/select/Option.js +10 -9
- package/es/select/Option.js.map +1 -1
- package/es/select/OptionGroup.js +4 -3
- package/es/select/OptionGroup.js.map +1 -1
- package/es/select/PopupContent.js +5 -4
- package/es/select/PopupContent.js.map +1 -1
- package/es/select/Select.js +21 -20
- package/es/select/Select.js.map +1 -1
- package/es/select/_example/collapsed.js +55 -0
- package/es/select/_example/collapsed.js.map +1 -0
- package/es/select/_example/creatable.js +61 -0
- package/es/select/_example/creatable.js.map +1 -0
- package/es/select/_example/custom-content.js +41 -0
- package/es/select/_example/custom-content.js.map +1 -0
- package/es/select/_example/default.js +54 -0
- package/es/select/_example/default.js.map +1 -0
- package/es/select/_example/disabled.js +54 -0
- package/es/select/_example/disabled.js.map +1 -0
- package/es/select/_example/filterable.js +44 -0
- package/es/select/_example/filterable.js.map +1 -0
- package/es/select/_example/group-options.js +57 -0
- package/es/select/_example/group-options.js.map +1 -0
- package/es/select/_example/label-suffix.js +51 -0
- package/es/select/_example/label-suffix.js.map +1 -0
- package/es/select/_example/loading.js +45 -0
- package/es/select/_example/loading.js.map +1 -0
- package/es/select/_example/multiple.js +58 -0
- package/es/select/_example/multiple.js.map +1 -0
- package/es/select/_example/sizes.js +54 -0
- package/es/select/_example/sizes.js.map +1 -0
- package/es/select/_example/status.js +66 -0
- package/es/select/_example/status.js.map +1 -0
- package/es/select/index.js +12 -11
- package/es/select/index.js.map +1 -1
- package/es/select/style/index.css +1 -1
- package/es/select-input/SelectInput.js +14 -13
- package/es/select-input/SelectInput.js.map +1 -1
- package/es/select-input/hook/useMultiple.js +9 -8
- package/es/select-input/hook/useMultiple.js.map +1 -1
- package/es/select-input/hook/useSingle.js +9 -8
- package/es/select-input/hook/useSingle.js.map +1 -1
- package/es/select-input/index.js +8 -7
- package/es/select-input/index.js.map +1 -1
- package/es/slider/Slider.js +37 -27
- package/es/slider/Slider.js.map +1 -1
- package/es/slider/SliderHandleButton.js +3 -3
- package/es/slider/SliderHandleButton.js.map +1 -1
- package/es/slider/_example/custom-label.js +33 -0
- package/es/slider/_example/custom-label.js.map +1 -0
- package/es/slider/_example/default.js +33 -0
- package/es/slider/_example/default.js.map +1 -0
- package/es/slider/_example/disabled.js +38 -0
- package/es/slider/_example/disabled.js.map +1 -0
- package/es/slider/_example/marks.js +61 -0
- package/es/slider/_example/marks.js.map +1 -0
- package/es/slider/_example/range.js +30 -0
- package/es/slider/_example/range.js.map +1 -0
- package/es/slider/_example/step.js +31 -0
- package/es/slider/_example/step.js.map +1 -0
- package/es/slider/_example/vertical.js +67 -0
- package/es/slider/_example/vertical.js.map +1 -0
- package/es/slider/_example/with-input-number.js +55 -0
- package/es/slider/_example/with-input-number.js.map +1 -0
- package/es/slider/index.js +9 -8
- package/es/slider/index.js.map +1 -1
- package/es/slider/style/index.css +8 -8
- package/es/style/index.css +21 -63
- package/es/switch/Switch.js +13 -12
- package/es/switch/Switch.js.map +1 -1
- package/es/switch/_example/async-change.js +36 -0
- package/es/switch/_example/async-change.js.map +1 -0
- package/es/switch/_example/before-change.js +31 -0
- package/es/switch/_example/before-change.js.map +1 -0
- package/es/switch/_example/controlled.js +23 -0
- package/es/switch/_example/controlled.js.map +1 -0
- package/es/switch/_example/custom-value.js +50 -0
- package/es/switch/_example/custom-value.js.map +1 -0
- package/es/switch/_example/default.js +11 -0
- package/es/switch/_example/default.js.map +1 -0
- package/es/switch/_example/disabled.js +72 -0
- package/es/switch/_example/disabled.js.map +1 -0
- package/es/switch/_example/loading.js +44 -0
- package/es/switch/_example/loading.js.map +1 -0
- package/es/switch/_example/sizes.js +60 -0
- package/es/switch/_example/sizes.js.map +1 -0
- package/es/switch/_example/with-label.js +48 -0
- package/es/switch/_example/with-label.js.map +1 -0
- package/es/switch/index.js +6 -5
- package/es/switch/index.js.map +1 -1
- package/es/switch/style/index.css +56 -0
- package/es/tab/TabBar.js +8 -7
- package/es/tab/TabBar.js.map +1 -1
- package/es/tab/TabNav.js +12 -11
- package/es/tab/TabNav.js.map +1 -1
- package/es/tab/TabNavItem.js +11 -10
- package/es/tab/TabNavItem.js.map +1 -1
- package/es/tab/TabPanel.js +6 -4
- package/es/tab/TabPanel.js.map +1 -1
- package/es/tab/Tabs.js +20 -19
- package/es/tab/Tabs.js.map +1 -1
- package/es/tab/_example/addable.js +92 -0
- package/es/tab/_example/addable.js.map +1 -0
- package/es/tab/_example/card-theme.js +66 -0
- package/es/tab/_example/card-theme.js.map +1 -0
- package/es/tab/_example/default.js +65 -0
- package/es/tab/_example/default.js.map +1 -0
- package/es/tab/_example/disabled.js +99 -0
- package/es/tab/_example/disabled.js.map +1 -0
- package/es/tab/_example/lazy.js +73 -0
- package/es/tab/_example/lazy.js.map +1 -0
- package/es/tab/_example/placement.js +96 -0
- package/es/tab/_example/placement.js.map +1 -0
- package/es/tab/_example/removable.js +78 -0
- package/es/tab/_example/removable.js.map +1 -0
- package/es/tab/_example/sizes.js +85 -0
- package/es/tab/_example/sizes.js.map +1 -0
- package/es/tab/_example/with-action.js +71 -0
- package/es/tab/_example/with-action.js.map +1 -0
- package/es/tab/index.js +8 -7
- package/es/tab/index.js.map +1 -1
- package/es/tab/style/index.css +17 -18
- package/es/table/Cell.js +10 -11
- package/es/table/Cell.js.map +1 -1
- package/es/table/Ellipsis.js +77 -0
- package/es/table/Ellipsis.js.map +1 -0
- package/es/table/TBody.js +16 -13
- package/es/table/TBody.js.map +1 -1
- package/es/table/THead.js +7 -6
- package/es/table/THead.js.map +1 -1
- package/es/table/TR.js +9 -5
- package/es/table/TR.js.map +1 -1
- package/es/table/Table.js +14 -11
- package/es/table/Table.js.map +1 -1
- package/es/table/_example/alignment.js +96 -0
- package/es/table/_example/alignment.js.map +1 -0
- package/es/table/_example/auto-width.js +90 -0
- package/es/table/_example/auto-width.js.map +1 -0
- package/es/table/_example/bordered-stripe-hover.js +96 -0
- package/es/table/_example/bordered-stripe-hover.js.map +1 -0
- package/es/table/_example/bordered.js +94 -0
- package/es/table/_example/bordered.js.map +1 -0
- package/es/table/_example/cell-click.js +107 -0
- package/es/table/_example/cell-click.js.map +1 -0
- package/es/table/_example/complex.js +131 -0
- package/es/table/_example/complex.js.map +1 -0
- package/es/table/_example/custom-cell.js +115 -0
- package/es/table/_example/custom-cell.js.map +1 -0
- package/es/table/_example/custom-empty.js +64 -0
- package/es/table/_example/custom-empty.js.map +1 -0
- package/es/table/_example/custom-row-class-name.js +105 -0
- package/es/table/_example/custom-row-class-name.js.map +1 -0
- package/es/table/_example/default.js +93 -0
- package/es/table/_example/default.js.map +1 -0
- package/es/table/_example/ellipsis.js +96 -0
- package/es/table/_example/ellipsis.js.map +1 -0
- package/es/table/_example/empty.js +58 -0
- package/es/table/_example/empty.js.map +1 -0
- package/es/table/_example/fixed-width.js +98 -0
- package/es/table/_example/fixed-width.js.map +1 -0
- package/es/table/_example/hover.js +94 -0
- package/es/table/_example/hover.js.map +1 -0
- package/es/table/_example/row-click.js +100 -0
- package/es/table/_example/row-click.js.map +1 -0
- package/es/table/_example/sizes.js +111 -0
- package/es/table/_example/sizes.js.map +1 -0
- package/es/table/_example/stripe.js +94 -0
- package/es/table/_example/stripe.js.map +1 -0
- package/es/table/_example/vertical-align.js +110 -0
- package/es/table/_example/vertical-align.js.map +1 -0
- package/es/table/hooks/index.js +6 -5
- package/es/table/hooks/index.js.map +1 -1
- package/es/table/index.js +6 -3
- package/es/table/index.js.map +1 -1
- package/es/table/style/index.css +6 -6
- package/es/tag/Tag.js +8 -7
- package/es/tag/Tag.js.map +1 -1
- package/es/tag/_example/closable.js +43 -0
- package/es/tag/_example/closable.js.map +1 -0
- package/es/tag/_example/default.js +24 -0
- package/es/tag/_example/default.js.map +1 -0
- package/es/tag/_example/disabled.js +26 -0
- package/es/tag/_example/disabled.js.map +1 -0
- package/es/tag/_example/sizes.js +24 -0
- package/es/tag/_example/sizes.js.map +1 -0
- package/es/tag/_example/variants.js +49 -0
- package/es/tag/_example/variants.js.map +1 -0
- package/es/tag/index.js +4 -3
- package/es/tag/index.js.map +1 -1
- package/es/tag-input/TagInput.js +10 -9
- package/es/tag-input/TagInput.js.map +1 -1
- package/es/tag-input/_example/collapsed.js +39 -0
- package/es/tag-input/_example/collapsed.js.map +1 -0
- package/es/tag-input/_example/controlled-uncontrolled.js +47 -0
- package/es/tag-input/_example/controlled-uncontrolled.js.map +1 -0
- package/es/tag-input/_example/default.js +31 -0
- package/es/tag-input/_example/default.js.map +1 -0
- package/es/tag-input/_example/disabled-readonly.js +50 -0
- package/es/tag-input/_example/disabled-readonly.js.map +1 -0
- package/es/tag-input/_example/events.js +84 -0
- package/es/tag-input/_example/events.js.map +1 -0
- package/es/tag-input/_example/excess-display.js +40 -0
- package/es/tag-input/_example/excess-display.js.map +1 -0
- package/es/tag-input/_example/max-tags.js +36 -0
- package/es/tag-input/_example/max-tags.js.map +1 -0
- package/es/tag-input/_example/sizes.js +51 -0
- package/es/tag-input/_example/sizes.js.map +1 -0
- package/es/tag-input/_example/status.js +49 -0
- package/es/tag-input/_example/status.js.map +1 -0
- package/es/tag-input/_example/with-label.js +31 -0
- package/es/tag-input/_example/with-label.js.map +1 -0
- package/es/tag-input/hooks/useTagList.js +11 -10
- package/es/tag-input/hooks/useTagList.js.map +1 -1
- package/es/tag-input/index.js +7 -6
- package/es/tag-input/index.js.map +1 -1
- package/es/tag-input/style/index.css +3 -3
- package/es/tag-input/useTagList.js +11 -10
- package/es/tag-input/useTagList.js.map +1 -1
- package/es/tooltip/Tooltip.js +100 -0
- package/es/tooltip/Tooltip.js.map +1 -0
- package/es/tooltip/_example/base.js +32 -0
- package/es/tooltip/_example/base.js.map +1 -0
- package/es/tooltip/_example/custom-content.js +62 -0
- package/es/tooltip/_example/custom-content.js.map +1 -0
- package/es/tooltip/_example/placement.js +31 -0
- package/es/tooltip/_example/placement.js.map +1 -0
- package/es/tooltip/_example/theme.js +47 -0
- package/es/tooltip/_example/theme.js.map +1 -0
- package/es/tooltip/index.js +36 -0
- package/es/tooltip/index.js.map +1 -0
- package/es/tooltip/style/index.css +59 -0
- package/es/tooltip/style/index.js +2 -0
- package/es/tooltip/style/index.js.map +1 -0
- package/es/utils/log/index.js.map +1 -1
- package/package.json +3 -3
- package/es/_chunks/dep-5U9UjDaf.js +0 -345
- package/es/_chunks/dep-5U9UjDaf.js.map +0 -1
- package/es/_chunks/dep-BuIAffJt.js.map +0 -1
- package/es/_chunks/dep-CD_4-1Xb.js.map +0 -1
- package/es/_chunks/dep-CMPsNAXF.js.map +0 -1
- package/es/_chunks/dep-CkmtEv0Y.js.map +0 -1
- package/es/_chunks/dep-DJmE940f.js.map +0 -1
- package/es/_chunks/dep-DURB9x8g.js.map +0 -1
- package/es/alert/style/css.js +0 -1
- package/es/badge/style/css.js +0 -1
- package/es/button/style/css.js +0 -1
- package/es/checkbox/style/css.js +0 -1
- package/es/color-picker/style/css.js +0 -1
- package/es/dialog/style/css.js +0 -1
- package/es/drawer/style/css.js +0 -1
- package/es/fireworks/style/css.js +0 -0
- package/es/form/style/css.js +0 -1
- package/es/input/style/css.js +0 -1
- package/es/input-number/style/css.js +0 -1
- package/es/ip-input/style/css.js +0 -1
- package/es/layout/style/css.js +0 -1
- package/es/list/style/css.js +0 -1
- package/es/loading/style/css.js +0 -1
- package/es/notification/style/css.js +0 -1
- package/es/popup/style/css.js +0 -1
- package/es/radio/style/css.js +0 -0
- package/es/select/style/css.js +0 -1
- package/es/select-input/style/css.js +0 -1
- package/es/slider/style/css.js +0 -1
- package/es/switch/style/css.js +0 -1
- package/es/table/style/css.js +0 -1
- package/es/tag/style/css.js +0 -1
- package/es/tag-input/style/css.js +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { _ as _slicedToArray } from '../../_chunks/dep-CzLhKWCf.js';
|
|
2
|
+
import React__default, { useState } from 'react';
|
|
3
|
+
import { Drawer } from '../index.js';
|
|
4
|
+
import { Button } from '../../button/index.js';
|
|
5
|
+
import '../Drawer.js';
|
|
6
|
+
import '../../_chunks/dep-Cwish4GD.js';
|
|
7
|
+
import '../../_chunks/dep-D-UKOauR.js';
|
|
8
|
+
import '../../_chunks/dep-DN7d1SzH.js';
|
|
9
|
+
import 'react-transition-group';
|
|
10
|
+
import '@tendaui/icons';
|
|
11
|
+
import 'classnames';
|
|
12
|
+
import 'lodash-es';
|
|
13
|
+
import '../../_chunks/dep-BbOvNxhg.js';
|
|
14
|
+
import '../../common/Portal.js';
|
|
15
|
+
import 'react-dom';
|
|
16
|
+
import '../../_chunks/dep-DRwijJcv.js';
|
|
17
|
+
import '../../_chunks/dep-u1x3x6MJ.js';
|
|
18
|
+
import '../../config-provider/ConfigContext.js';
|
|
19
|
+
import '../../_chunks/dep--nQ-cjme.js';
|
|
20
|
+
import 'dayjs';
|
|
21
|
+
import '../../_chunks/dep-BRbJGDI9.js';
|
|
22
|
+
import '../../_chunks/dep-D_qcGLah.js';
|
|
23
|
+
import '../../_chunks/dep-DGvfel3I.js';
|
|
24
|
+
import '../../_chunks/dep-bWaVq_y3.js';
|
|
25
|
+
import '../utils/index.js';
|
|
26
|
+
import '../../_chunks/dep-UHQn9biR.js';
|
|
27
|
+
import '../../config-provider/index.js';
|
|
28
|
+
import '../../config-provider/ConfigProvider.js';
|
|
29
|
+
import '../../button/Button.js';
|
|
30
|
+
import '../../loading/index.js';
|
|
31
|
+
import '../../loading/Loading.js';
|
|
32
|
+
import '../../loading/Gradient.js';
|
|
33
|
+
import '../../_chunks/dep-DHWwZ2Nj.js';
|
|
34
|
+
import '../../_chunks/dep-PPA-yoAy.js';
|
|
35
|
+
import '../../_chunks/dep-DbVHGoUC.js';
|
|
36
|
+
import '../../loading/style/css.js';
|
|
37
|
+
import '../../_chunks/dep-spxR0DG0.js';
|
|
38
|
+
import '../../button/style/css.js';
|
|
39
|
+
import '../style/css.js';
|
|
40
|
+
|
|
41
|
+
var PlacementDrawer = function PlacementDrawer() {
|
|
42
|
+
var _useState = useState(false),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
visible = _useState2[0],
|
|
45
|
+
setVisible = _useState2[1];
|
|
46
|
+
var _useState3 = useState("right"),
|
|
47
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
|
+
placement = _useState4[0],
|
|
49
|
+
setPlacement = _useState4[1];
|
|
50
|
+
var openDrawer = function openDrawer(p) {
|
|
51
|
+
setPlacement(p);
|
|
52
|
+
setVisible(true);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement("div", {
|
|
55
|
+
style: {
|
|
56
|
+
display: "flex",
|
|
57
|
+
gap: "12px",
|
|
58
|
+
flexWrap: "wrap"
|
|
59
|
+
}
|
|
60
|
+
}, /* @__PURE__ */React__default.createElement(Button, {
|
|
61
|
+
theme: "primary",
|
|
62
|
+
onClick: function onClick() {
|
|
63
|
+
return openDrawer("left");
|
|
64
|
+
}
|
|
65
|
+
}, "\u4ECE\u5DE6\u4FA7\u6253\u5F00"), /* @__PURE__ */React__default.createElement(Button, {
|
|
66
|
+
theme: "primary",
|
|
67
|
+
onClick: function onClick() {
|
|
68
|
+
return openDrawer("right");
|
|
69
|
+
}
|
|
70
|
+
}, "\u4ECE\u53F3\u4FA7\u6253\u5F00"), /* @__PURE__ */React__default.createElement(Button, {
|
|
71
|
+
theme: "primary",
|
|
72
|
+
onClick: function onClick() {
|
|
73
|
+
return openDrawer("top");
|
|
74
|
+
}
|
|
75
|
+
}, "\u4ECE\u9876\u90E8\u6253\u5F00"), /* @__PURE__ */React__default.createElement(Button, {
|
|
76
|
+
theme: "primary",
|
|
77
|
+
onClick: function onClick() {
|
|
78
|
+
return openDrawer("bottom");
|
|
79
|
+
}
|
|
80
|
+
}, "\u4ECE\u5E95\u90E8\u6253\u5F00")), /* @__PURE__ */React__default.createElement(Drawer, {
|
|
81
|
+
header: "".concat(placement, " \u65B9\u5411\u62BD\u5C49"),
|
|
82
|
+
placement: placement,
|
|
83
|
+
visible: visible,
|
|
84
|
+
onClose: function onClose() {
|
|
85
|
+
return setVisible(false);
|
|
86
|
+
}
|
|
87
|
+
}, /* @__PURE__ */React__default.createElement("p", null, "\u8FD9\u662F\u4ECE ", placement, " \u65B9\u5411\u6ED1\u51FA\u7684\u62BD\u5C49\u3002")));
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export { PlacementDrawer as default };
|
|
91
|
+
//# sourceMappingURL=placement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placement.js","sources":["../../../../components/drawer/_example/placement.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport Drawer from \"../index\";\nimport { Button } from \"../../button\";\nimport type { TdDrawerProps } from \"../type\";\n\nconst PlacementDrawer = () => {\n const [visible, setVisible] = useState(false);\n const [placement, setPlacement] = useState<TdDrawerProps[\"placement\"]>(\"right\");\n\n const openDrawer = (p: TdDrawerProps[\"placement\"]) => {\n setPlacement(p);\n setVisible(true);\n };\n\n return (\n <>\n <div style={{ display: \"flex\", gap: \"12px\", flexWrap: \"wrap\" }}>\n <Button theme=\"primary\" onClick={() => openDrawer(\"left\")}>\n 从左侧打开\n </Button>\n <Button theme=\"primary\" onClick={() => openDrawer(\"right\")}>\n 从右侧打开\n </Button>\n <Button theme=\"primary\" onClick={() => openDrawer(\"top\")}>\n 从顶部打开\n </Button>\n <Button theme=\"primary\" onClick={() => openDrawer(\"bottom\")}>\n 从底部打开\n </Button>\n </div>\n <Drawer\n header={`${placement} 方向抽屉`}\n placement={placement}\n visible={visible}\n onClose={() => setVisible(false)}\n >\n <p>这是从 {placement} 方向滑出的抽屉。</p>\n </Drawer>\n </>\n );\n};\n\nexport default PlacementDrawer;\n"],"names":["PlacementDrawer","_useState","useState","_useState2","_slicedToArray","visible","setVisible","_useState3","_useState4","placement","setPlacement","openDrawer","p","React","createElement","Fragment","style","display","gap","flexWrap","Button","theme","onClick","Drawer","header","concat","onClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,SAAlBA,kBAAwB;AAC5B,EAAA,IAAAC,SAAA,GAA8BC,SAAS,KAAK,CAAA;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAArCI,IAAAA,OAAA,GAAAF,UAAA,CAAA,CAAA,CAAA;AAASG,IAAAA,UAAU,GAAAH,UAAA,CAAA,CAAA,CAAA;AAC1B,EAAA,IAAAI,UAAA,GAAkCL,SAAqC,OAAO,CAAA;IAAAM,UAAA,GAAAJ,c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,UAAA,CAAW,QAAQ,CAAA;AAAA,IAAA;GAAA,EAAG,gCAE7D,CACF,CAAA,iBACAE,cAAA,CAAAC,aAAA,CAACS,MAAA,EAAA;AACCC,IAAAA,MAAA,EAAA,EAAA,CAAAC,MAAA,CAAWhB,SAAS,EAAA,2BAAA,CAAA;AACpBA,IAAAA,SAAA,EAAAA,SAAA;AACAJ,IAAAA,OAAA,EAAAA,OAAA;IACAqB,OAAA,EAAS,SAATA,OAAAA,GAAA;MAAA,OAAepB,UAAA,CAAW,KAAK,CAAA;AAAA,IAAA;AAAA,GAAA,iBAE/BO,cAAA,CAAAC,aAAA,CAAC,GAAA,EAAA,IAAA,EAAE,qBAAA,EAAKL,SAAA,EAAU,mDAAS,CAC7B,CACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { _ as _slicedToArray } from '../../_chunks/dep-CzLhKWCf.js';
|
|
2
|
+
import React__default, { useState } from 'react';
|
|
3
|
+
import { Drawer } from '../index.js';
|
|
4
|
+
import { Button } from '../../button/index.js';
|
|
5
|
+
import '../Drawer.js';
|
|
6
|
+
import '../../_chunks/dep-Cwish4GD.js';
|
|
7
|
+
import '../../_chunks/dep-D-UKOauR.js';
|
|
8
|
+
import '../../_chunks/dep-DN7d1SzH.js';
|
|
9
|
+
import 'react-transition-group';
|
|
10
|
+
import '@tendaui/icons';
|
|
11
|
+
import 'classnames';
|
|
12
|
+
import 'lodash-es';
|
|
13
|
+
import '../../_chunks/dep-BbOvNxhg.js';
|
|
14
|
+
import '../../common/Portal.js';
|
|
15
|
+
import 'react-dom';
|
|
16
|
+
import '../../_chunks/dep-DRwijJcv.js';
|
|
17
|
+
import '../../_chunks/dep-u1x3x6MJ.js';
|
|
18
|
+
import '../../config-provider/ConfigContext.js';
|
|
19
|
+
import '../../_chunks/dep--nQ-cjme.js';
|
|
20
|
+
import 'dayjs';
|
|
21
|
+
import '../../_chunks/dep-BRbJGDI9.js';
|
|
22
|
+
import '../../_chunks/dep-D_qcGLah.js';
|
|
23
|
+
import '../../_chunks/dep-DGvfel3I.js';
|
|
24
|
+
import '../../_chunks/dep-bWaVq_y3.js';
|
|
25
|
+
import '../utils/index.js';
|
|
26
|
+
import '../../_chunks/dep-UHQn9biR.js';
|
|
27
|
+
import '../../config-provider/index.js';
|
|
28
|
+
import '../../config-provider/ConfigProvider.js';
|
|
29
|
+
import '../../button/Button.js';
|
|
30
|
+
import '../../loading/index.js';
|
|
31
|
+
import '../../loading/Loading.js';
|
|
32
|
+
import '../../loading/Gradient.js';
|
|
33
|
+
import '../../_chunks/dep-DHWwZ2Nj.js';
|
|
34
|
+
import '../../_chunks/dep-PPA-yoAy.js';
|
|
35
|
+
import '../../_chunks/dep-DbVHGoUC.js';
|
|
36
|
+
import '../../loading/style/css.js';
|
|
37
|
+
import '../../_chunks/dep-spxR0DG0.js';
|
|
38
|
+
import '../../button/style/css.js';
|
|
39
|
+
import '../style/css.js';
|
|
40
|
+
|
|
41
|
+
var DraggableDrawer = function DraggableDrawer() {
|
|
42
|
+
var _useState = useState(false),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
visible = _useState2[0],
|
|
45
|
+
setVisible = _useState2[1];
|
|
46
|
+
return /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement(Button, {
|
|
47
|
+
theme: "primary",
|
|
48
|
+
onClick: function onClick() {
|
|
49
|
+
return setVisible(true);
|
|
50
|
+
}
|
|
51
|
+
}, "\u53EF\u62D6\u62FD\u5927\u5C0F\u7684\u62BD\u5C49"), /* @__PURE__ */React__default.createElement(Drawer, {
|
|
52
|
+
header: "\u53EF\u62D6\u62FD\u8C03\u6574\u5927\u5C0F",
|
|
53
|
+
visible: visible,
|
|
54
|
+
sizeDraggable: {
|
|
55
|
+
min: 200,
|
|
56
|
+
max: 800
|
|
57
|
+
},
|
|
58
|
+
onClose: function onClose() {
|
|
59
|
+
return setVisible(false);
|
|
60
|
+
}
|
|
61
|
+
}, /* @__PURE__ */React__default.createElement("p", null, "\u62D6\u52A8\u62BD\u5C49\u8FB9\u7F18\u53EF\u4EE5\u8C03\u6574\u5BBD\u5EA6\u3002"), /* @__PURE__ */React__default.createElement("p", null, "\u6700\u5C0F\u5BBD\u5EA6: 200px"), /* @__PURE__ */React__default.createElement("p", null, "\u6700\u5927\u5BBD\u5EA6: 800px")));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { DraggableDrawer as default };
|
|
65
|
+
//# sourceMappingURL=size-draggable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size-draggable.js","sources":["../../../../components/drawer/_example/size-draggable.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport Drawer from \"../index\";\nimport { Button } from \"../../button\";\n\nconst DraggableDrawer = () => {\n const [visible, setVisible] = useState(false);\n return (\n <>\n <Button theme=\"primary\" onClick={() => setVisible(true)}>\n 可拖拽大小的抽屉\n </Button>\n <Drawer\n header=\"可拖拽调整大小\"\n visible={visible}\n sizeDraggable={{ min: 200, max: 800 }}\n onClose={() => setVisible(false)}\n >\n <p>拖动抽屉边缘可以调整宽度。</p>\n <p>最小宽度: 200px</p>\n <p>最大宽度: 800px</p>\n </Drawer>\n </>\n );\n};\n\nexport default DraggableDrawer;\n"],"names":["DraggableDrawer","_useState","useState","_useState2","_slicedToArray","visible","setVisible","React","createElement","Fragment","Button","theme","onClick","Drawer","header","sizeDraggable","min","max","onClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,kBAAkB,SAAlBA,kBAAwB;AAC5B,EAAA,IAAAC,SAAA,GAA8BC,SAAS,KAAK,CAAA;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAArCI,IAAAA,OAAA,GAAAF,UAAA,CAAA,CAAA,CAAA;AAASG,IAAAA,UAAU,GAAAH,UAAA,CAAA,CAAA,CAAA;AAC1B,EAAA,sBACEI,cAAA,CAAAC,aAAA,CAAAD,cAAA,CAAAE,QAAA,EAAA,IAAA,iBACEF,cAAA,CAAAC,aAAA,CAACE,MAAA,EAAA;AAAOC,IAAAA,KAAA,EAAM,SAAA;IAAUC,OAAA,EAAS,SAATA,OAAAA,GAAA;MAAA,OAAeN,UAAA,CAAW,IAAI,CAAA;AAAA,IAAA;GAAA,EAAG,kDAEzD,CAAA,iBACAC,cAAA,CAAAC,aAAA,CAACK,MAAA,EAAA;AACCC,IAAAA,MAAA,EAAO,4CAAA;AACPT,IAAAA,OAAA,EAAAA,OAAA;AACAU,IAAAA,aAAA,EAAe;AAAEC,MAAAA,GAAA,EAAK,GAAA;AAAKC,MAAAA,KAAK;KAAI;IACpCC,OAAA,EAAS,SAATA,OAAAA,GAAA;MAAA,OAAeZ,UAAA,CAAW,KAAK,CAAA;AAAA,IAAA;AAAA,GAAA,iBAE/BC,cAAA,CAAAC,aAAA,CAAC,WAAE,gFAAa,CAAA,iBAChBD,cAAA,CAAAC,aAAA,CAAC,WAAE,iCAAW,CAAA,iBACdD,cAAA,CAAAC,aAAA,CAAC,WAAE,iCAAW,CAChB,CACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { _ as _slicedToArray } from '../../_chunks/dep-CzLhKWCf.js';
|
|
2
|
+
import React__default, { useState } from 'react';
|
|
3
|
+
import { Drawer } from '../index.js';
|
|
4
|
+
import { Button } from '../../button/index.js';
|
|
5
|
+
import '../Drawer.js';
|
|
6
|
+
import '../../_chunks/dep-Cwish4GD.js';
|
|
7
|
+
import '../../_chunks/dep-D-UKOauR.js';
|
|
8
|
+
import '../../_chunks/dep-DN7d1SzH.js';
|
|
9
|
+
import 'react-transition-group';
|
|
10
|
+
import '@tendaui/icons';
|
|
11
|
+
import 'classnames';
|
|
12
|
+
import 'lodash-es';
|
|
13
|
+
import '../../_chunks/dep-BbOvNxhg.js';
|
|
14
|
+
import '../../common/Portal.js';
|
|
15
|
+
import 'react-dom';
|
|
16
|
+
import '../../_chunks/dep-DRwijJcv.js';
|
|
17
|
+
import '../../_chunks/dep-u1x3x6MJ.js';
|
|
18
|
+
import '../../config-provider/ConfigContext.js';
|
|
19
|
+
import '../../_chunks/dep--nQ-cjme.js';
|
|
20
|
+
import 'dayjs';
|
|
21
|
+
import '../../_chunks/dep-BRbJGDI9.js';
|
|
22
|
+
import '../../_chunks/dep-D_qcGLah.js';
|
|
23
|
+
import '../../_chunks/dep-DGvfel3I.js';
|
|
24
|
+
import '../../_chunks/dep-bWaVq_y3.js';
|
|
25
|
+
import '../utils/index.js';
|
|
26
|
+
import '../../_chunks/dep-UHQn9biR.js';
|
|
27
|
+
import '../../config-provider/index.js';
|
|
28
|
+
import '../../config-provider/ConfigProvider.js';
|
|
29
|
+
import '../../button/Button.js';
|
|
30
|
+
import '../../loading/index.js';
|
|
31
|
+
import '../../loading/Loading.js';
|
|
32
|
+
import '../../loading/Gradient.js';
|
|
33
|
+
import '../../_chunks/dep-DHWwZ2Nj.js';
|
|
34
|
+
import '../../_chunks/dep-PPA-yoAy.js';
|
|
35
|
+
import '../../_chunks/dep-DbVHGoUC.js';
|
|
36
|
+
import '../../loading/style/css.js';
|
|
37
|
+
import '../../_chunks/dep-spxR0DG0.js';
|
|
38
|
+
import '../../button/style/css.js';
|
|
39
|
+
import '../style/css.js';
|
|
40
|
+
|
|
41
|
+
var SizeDrawer = function SizeDrawer() {
|
|
42
|
+
var _useState = useState(false),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
visible = _useState2[0],
|
|
45
|
+
setVisible = _useState2[1];
|
|
46
|
+
var _useState3 = useState("small"),
|
|
47
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
|
+
size = _useState4[0],
|
|
49
|
+
setSize = _useState4[1];
|
|
50
|
+
var openDrawer = function openDrawer(s) {
|
|
51
|
+
setSize(s);
|
|
52
|
+
setVisible(true);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement("div", {
|
|
55
|
+
style: {
|
|
56
|
+
display: "flex",
|
|
57
|
+
gap: "12px",
|
|
58
|
+
flexWrap: "wrap"
|
|
59
|
+
}
|
|
60
|
+
}, /* @__PURE__ */React__default.createElement(Button, {
|
|
61
|
+
theme: "primary",
|
|
62
|
+
onClick: function onClick() {
|
|
63
|
+
return openDrawer("small");
|
|
64
|
+
}
|
|
65
|
+
}, "\u5C0F\u5C3A\u5BF8"), /* @__PURE__ */React__default.createElement(Button, {
|
|
66
|
+
theme: "primary",
|
|
67
|
+
onClick: function onClick() {
|
|
68
|
+
return openDrawer("medium");
|
|
69
|
+
}
|
|
70
|
+
}, "\u4E2D\u5C3A\u5BF8"), /* @__PURE__ */React__default.createElement(Button, {
|
|
71
|
+
theme: "primary",
|
|
72
|
+
onClick: function onClick() {
|
|
73
|
+
return openDrawer("large");
|
|
74
|
+
}
|
|
75
|
+
}, "\u5927\u5C3A\u5BF8"), /* @__PURE__ */React__default.createElement(Button, {
|
|
76
|
+
theme: "primary",
|
|
77
|
+
onClick: function onClick() {
|
|
78
|
+
return openDrawer("60%");
|
|
79
|
+
}
|
|
80
|
+
}, "60% \u5BBD\u5EA6"), /* @__PURE__ */React__default.createElement(Button, {
|
|
81
|
+
theme: "primary",
|
|
82
|
+
onClick: function onClick() {
|
|
83
|
+
return openDrawer("500px");
|
|
84
|
+
}
|
|
85
|
+
}, "500px \u5BBD\u5EA6")), /* @__PURE__ */React__default.createElement(Drawer, {
|
|
86
|
+
header: "\u5C3A\u5BF8: ".concat(size),
|
|
87
|
+
size: size,
|
|
88
|
+
visible: visible,
|
|
89
|
+
onClose: function onClose() {
|
|
90
|
+
return setVisible(false);
|
|
91
|
+
}
|
|
92
|
+
}, /* @__PURE__ */React__default.createElement("p", null, "\u5F53\u524D\u62BD\u5C49\u5C3A\u5BF8: ", size)));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export { SizeDrawer as default };
|
|
96
|
+
//# sourceMappingURL=size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.js","sources":["../../../../components/drawer/_example/size.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport Drawer from \"../index\";\nimport { Button } from \"../../button\";\n\nconst SizeDrawer = () => {\n const [visible, setVisible] = useState(false);\n const [size, setSize] = useState(\"small\");\n\n const openDrawer = (s: string) => {\n setSize(s);\n setVisible(true);\n };\n\n return (\n <>\n <div style={{ display: \"flex\", gap: \"12px\", flexWrap: \"wrap\" }}>\n <Button theme=\"primary\" onClick={() => openDrawer(\"small\")}>\n 小尺寸\n </Button>\n <Button theme=\"primary\" onClick={() => openDrawer(\"medium\")}>\n 中尺寸\n </Button>\n <Button theme=\"primary\" onClick={() => openDrawer(\"large\")}>\n 大尺寸\n </Button>\n <Button theme=\"primary\" onClick={() => openDrawer(\"60%\")}>\n 60% 宽度\n </Button>\n <Button theme=\"primary\" onClick={() => openDrawer(\"500px\")}>\n 500px 宽度\n </Button>\n </div>\n <Drawer header={`尺寸: ${size}`} size={size} visible={visible} onClose={() => setVisible(false)}>\n <p>当前抽屉尺寸: {size}</p>\n </Drawer>\n </>\n );\n};\n\nexport default SizeDrawer;\n"],"names":["SizeDrawer","_useState","useState","_useState2","_slicedToArray","visible","setVisible","_useState3","_useState4","size","setSize","openDrawer","s","React","createElement","style","display","gap","flexWrap","Button","theme","onClick","Drawer","header","onClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,aAAa,SAAbA,aAAmB;AACvB,EAAA,IAAAC,SAAA,GAA8BC,SAAS,KAAK,CAAA;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAArCI,IAAAA,OAAA,GAAAF,UAAA,CAAA,CAAA,CAAA;AAASG,IAAAA,UAAU,GAAAH,UAAA,CAAA,CAAA,CAAA;AAC1B,EAAA,IAAAI,UA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AAAA,GAAA;MAAA,OAAeV,WAAW,OAAO,CAAA;AAAA,IAAA;GAAA,EAAG,oBAE5D,CACF,kBACAE,cAAA,CAAAC,aAAA,CAACQ,MAAA,EAAA;AAAOC,IAAAA,gCAAed,IAAI;AAAIA,IAAAA,IAAA,EAAAA,IAAA;AAAYJ,IAAAA,OAAA,EAAAA,OAAA;IAAkBmB,SAAS,SAATA;aAAelB,UAAA,CAAW,KAAK,CAAA;AAAA,IAAA;AAAA,GAAA,iBAC1FO,cAAA,CAAAC,aAAA,CAAC,WAAE,wCAAA,EAASL,IAAK,CACnB,CACF,CAAA;AAEJ;;;;"}
|
package/es/drawer/index.js
CHANGED
|
@@ -9,11 +9,12 @@ import 'react-transition-group';
|
|
|
9
9
|
import '@tendaui/icons';
|
|
10
10
|
import 'classnames';
|
|
11
11
|
import 'lodash-es';
|
|
12
|
-
import '../_chunks/dep-
|
|
12
|
+
import '../_chunks/dep-BbOvNxhg.js';
|
|
13
13
|
import '../button/index.js';
|
|
14
14
|
import '../button/Button.js';
|
|
15
|
-
import '../_chunks/dep-
|
|
16
|
-
import '../
|
|
15
|
+
import '../_chunks/dep-u1x3x6MJ.js';
|
|
16
|
+
import '../config-provider/ConfigContext.js';
|
|
17
|
+
import '../_chunks/dep--nQ-cjme.js';
|
|
17
18
|
import 'dayjs';
|
|
18
19
|
import '../loading/index.js';
|
|
19
20
|
import '../loading/Loading.js';
|
|
@@ -22,17 +23,17 @@ import '../common/Portal.js';
|
|
|
22
23
|
import 'react-dom';
|
|
23
24
|
import '../_chunks/dep-BRbJGDI9.js';
|
|
24
25
|
import '../loading/Gradient.js';
|
|
25
|
-
import '../_chunks/dep-
|
|
26
|
+
import '../_chunks/dep-DHWwZ2Nj.js';
|
|
26
27
|
import '../_chunks/dep-PPA-yoAy.js';
|
|
27
28
|
import '../_chunks/dep-DGvfel3I.js';
|
|
28
29
|
import '../_chunks/dep-DbVHGoUC.js';
|
|
29
30
|
import '../loading/style/css.js';
|
|
30
|
-
import '../_chunks/dep-
|
|
31
|
+
import '../_chunks/dep-spxR0DG0.js';
|
|
31
32
|
import '../button/style/css.js';
|
|
32
|
-
import '../_chunks/dep-
|
|
33
|
-
import '../_chunks/dep-
|
|
33
|
+
import '../_chunks/dep-D_qcGLah.js';
|
|
34
|
+
import '../_chunks/dep-bWaVq_y3.js';
|
|
34
35
|
import './utils/index.js';
|
|
35
|
-
import '../_chunks/dep-
|
|
36
|
+
import '../_chunks/dep-UHQn9biR.js';
|
|
36
37
|
import '../config-provider/index.js';
|
|
37
38
|
import '../config-provider/ConfigProvider.js';
|
|
38
39
|
|
package/es/drawer/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../components/drawer/index.ts"],"sourcesContent":["import _Drawer from \"./Drawer\";\nimport \"./style/index\";\nexport type { TdDrawerProps } from \"./type\";\nexport const Drawer = _Drawer;\nexport default Drawer;\n"],"names":["Drawer","_Drawer"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../components/drawer/index.ts"],"sourcesContent":["import _Drawer from \"./Drawer\";\nimport \"./style/index\";\nexport type { TdDrawerProps } from \"./type\";\nexport const Drawer = _Drawer;\nexport default Drawer;\n"],"names":["Drawer","_Drawer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,MAAA,GAASC;;;;"}
|
|
@@ -144,16 +144,16 @@
|
|
|
144
144
|
.t-drawer__footer {
|
|
145
145
|
width: 100%;
|
|
146
146
|
padding: var(--td-comp-paddingTB-l) var(--td-comp-paddingLR-l);
|
|
147
|
-
text-align:
|
|
147
|
+
text-align: start;
|
|
148
148
|
border-top: 1px solid var(--td-border-level-1-color);
|
|
149
149
|
background-color: var(--td-bg-color-container);
|
|
150
150
|
box-sizing: border-box;
|
|
151
151
|
}
|
|
152
152
|
.t-drawer__footer .t-button {
|
|
153
|
-
margin-
|
|
153
|
+
margin-inline-start: var(--td-comp-margin-s);
|
|
154
154
|
}
|
|
155
155
|
.t-drawer__footer .t-button:first-child {
|
|
156
|
-
margin-
|
|
156
|
+
margin-inline-start: 0;
|
|
157
157
|
}
|
|
158
158
|
.t-drawer__close-btn {
|
|
159
159
|
position: absolute;
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
width: var(--td-comp-size-xs);
|
|
164
164
|
height: var(--td-comp-size-xs);
|
|
165
165
|
top: calc((var(--td-comp-size-xxxl) - var(--td-comp-size-xs)) / 2);
|
|
166
|
-
|
|
166
|
+
inset-inline-end: var(--td-comp-margin-s);
|
|
167
167
|
color: var(--td-text-color-primary);
|
|
168
168
|
background-color: var(--td-bg-color-container);
|
|
169
169
|
border-radius: var(--td-radius-default);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_chunks/dep-Cwish4GD.js';
|
|
2
2
|
import { _ as _slicedToArray } from '../_chunks/dep-CzLhKWCf.js';
|
|
3
3
|
import { _ as _objectWithoutProperties } from '../_chunks/dep-DN7d1SzH.js';
|
|
4
|
-
import
|
|
4
|
+
import React__default, { forwardRef, useState, useRef, useMemo, useCallback, useEffect } from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
import { u as useConfig } from '../_chunks/dep-
|
|
6
|
+
import { u as useConfig } from '../_chunks/dep-u1x3x6MJ.js';
|
|
7
7
|
import '../_chunks/dep-D-UKOauR.js';
|
|
8
|
-
import '../
|
|
8
|
+
import '../config-provider/ConfigContext.js';
|
|
9
|
+
import '../_chunks/dep--nQ-cjme.js';
|
|
9
10
|
import 'dayjs';
|
|
10
11
|
|
|
11
12
|
var _excluded = ["className", "style", "count", "colors", "duration", "size", "interval", "particleCount", "loop", "onLaunch"];
|
|
@@ -99,7 +100,7 @@ var Fireworks = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
99
100
|
}
|
|
100
101
|
};
|
|
101
102
|
}, []);
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */React__default.createElement("div", _objectSpread({
|
|
103
104
|
ref: ref,
|
|
104
105
|
className: classNames(componentCls, className),
|
|
105
106
|
style: style,
|
|
@@ -114,7 +115,7 @@ var Fireworks = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
114
115
|
"--fireworks-size": "".concat(size, "px"),
|
|
115
116
|
"--fireworks-duration": "".concat(duration, "ms")
|
|
116
117
|
};
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */React__default.createElement("span", {
|
|
118
119
|
key: burst.id,
|
|
119
120
|
className: "".concat(componentCls, "__burst"),
|
|
120
121
|
style: burstStyle
|
|
@@ -125,7 +126,7 @@ var Fireworks = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
125
126
|
"--fireworks-color": burst.color,
|
|
126
127
|
"--fireworks-rotate": "".concat(angle + burst.rotationOffset, "deg")
|
|
127
128
|
};
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */React__default.createElement("i", {
|
|
129
130
|
key: "".concat(burst.id, "-").concat(index),
|
|
130
131
|
className: "".concat(componentCls, "__spark"),
|
|
131
132
|
style: sparkStyle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fireworks.js","sources":["../../../components/fireworks/Fireworks.tsx"],"sourcesContent":["import React, {\n CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport classNames from \"classnames\";\n\nimport useConfig from \"../hooks/useConfig\";\nimport { StyledProps } from \"../common\";\nimport type { FireworkBurst, FireworksLaunchContext, TdFireworksProps } from \"./type\";\n\nconst DEFAULT_COLORS = [\"#FF5F6D\", \"#FFC371\", \"#00C9FF\", \"#92FE9D\", \"#C77DFF\", \"#F2EA02\"];\n\ntype CSSPropertiesWithVars = CSSProperties & {\n [key: `--${string}`]: string | number;\n};\n\nconst randomInRange = (min: number, max: number) => Math.random() * (max - min) + min;\n\nconst pickColor = (palette: string[]) => {\n if (!palette || palette.length === 0) return DEFAULT_COLORS[0];\n const index = Math.floor(Math.random() * palette.length);\n return palette[index];\n};\n\nconst createBurstList = (count: number, colors: string[]): FireworkBurst[] =>\n Array.from({ length: Math.max(1, count) }).map((_, index) => ({\n id: `${Date.now()}-${index}-${Math.random().toString(36).slice(2, 7)}`,\n color: pickColor(colors),\n left: randomInRange(8, 92),\n top: randomInRange(15, 85),\n delay: randomInRange(0, 500),\n rotationOffset: randomInRange(0, 360)\n }));\n\nexport interface FireworksProps extends TdFireworksProps, StyledProps {}\n\nconst Fireworks = forwardRef<HTMLDivElement, FireworksProps>((props, ref) => {\n const {\n className,\n style,\n count = 6,\n colors = DEFAULT_COLORS,\n duration = 2400,\n size = 140,\n interval = 2800,\n particleCount = 12,\n loop = true,\n onLaunch,\n ...rest\n } = props;\n\n const { classPrefix } = useConfig();\n const componentCls = `${classPrefix}-fireworks`;\n const safeParticleCount = Math.max(6, particleCount);\n const [bursts, setBursts] = useState<FireworkBurst[]>(() => createBurstList(count, colors));\n const timerRef = useRef<ReturnType<typeof setInterval>>();\n\n const particleAngles = useMemo(() => {\n return Array.from({ length: safeParticleCount }).map((_, index) => (360 / safeParticleCount) * index);\n }, [safeParticleCount]);\n\n const triggerLaunch = useCallback(() => {\n const nextBursts = createBurstList(count, colors);\n setBursts(nextBursts);\n const context: FireworksLaunchContext = { bursts: nextBursts };\n onLaunch?.(context);\n }, [count, colors, onLaunch]);\n\n useEffect(() => {\n triggerLaunch();\n }, [triggerLaunch]);\n\n useEffect(() => {\n if (!loop) return undefined;\n timerRef.current && clearInterval(timerRef.current);\n timerRef.current = setInterval(triggerLaunch, Math.max(interval, duration));\n return () => {\n if (timerRef.current) {\n clearInterval(timerRef.current);\n }\n };\n }, [duration, interval, loop, triggerLaunch]);\n\n useEffect(\n () => () => {\n if (timerRef.current) {\n clearInterval(timerRef.current);\n }\n },\n []\n );\n\n return (\n <div\n ref={ref}\n className={classNames(componentCls, className)}\n style={style}\n role=\"presentation\"\n aria-hidden=\"true\"\n {...rest}\n >\n {bursts.map((burst) => {\n const burstStyle: CSSPropertiesWithVars = {\n \"--fireworks-left\": `${burst.left}%`,\n \"--fireworks-top\": `${burst.top}%`,\n \"--fireworks-delay\": `${burst.delay}ms`,\n \"--fireworks-color\": burst.color,\n \"--fireworks-size\": `${size}px`,\n \"--fireworks-duration\": `${duration}ms`\n };\n\n return (\n <span key={burst.id} className={`${componentCls}__burst`} style={burstStyle}>\n {particleAngles.map((angle, index) => {\n const sparkStyle: CSSPropertiesWithVars = {\n \"--fireworks-delay\": `${burst.delay}ms`,\n \"--fireworks-duration\": `${duration}ms`,\n \"--fireworks-color\": burst.color,\n \"--fireworks-rotate\": `${angle + burst.rotationOffset}deg`\n };\n return <i key={`${burst.id}-${index}`} className={`${componentCls}__spark`} style={sparkStyle} />;\n })}\n </span>\n );\n })}\n </div>\n );\n});\n\nFireworks.displayName = \"Fireworks\";\n\nexport default Fireworks;\n\n"],"names":["DEFAULT_COLORS","randomInRange","min","max","Math","random","pickColor","palette","length","index","floor","createBurstList","count","colors","Array","from","map","_","id","Date","now","concat","toString","slice","color","left","top","delay","rotationOffset","Fireworks","forwardRef","props","ref","className","style","_props$count","_props$colors","_props$duration","duration","_props$size","size","_props$interval","interval","_props$particleCount","particleCount","_props$loop","loop","onLaunch","rest","_objectWithoutProperties","_excluded","_useConfig","useConfig","classPrefix","componentCls","safeParticleCount","_useState","useState","_useState2","_slicedToArray","bursts","setBursts","timerRef","useRef","particleAngles","useMemo","triggerLaunch","useCallback","nextBursts","context","useEffect","current","clearInterval","setInterval","React","createElement","_objectSpread","classNames","role","burst","burstStyle","key","angle","sparkStyle","displayName"],"mappings":";;;;;;;;;;;;;AAeA,IAAMA,iBAAiB,CAAC,SAAA,EAAW,WAAW,SAAA,EAAW,SAAA,EAAW,WAAW,SAAS,CAAA;AAMxF,IAAMC,aAAA,GAAgB,SAAhBA,aAAAA,CAAiBC,GAAA,EAAaC,GAAA,EAAA;EAAA,OAAgBC,KAAKC,M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Ref, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport classNames from \"classnames\";\n\nimport useConfig from \"../hooks/useConfig\";\nimport { StyledProps } from \"../common\";\nimport type { FireworkBurst, FireworksLaunchContext, TdFireworksProps } from \"./type\";\n\nconst DEFAULT_COLORS = [\"#FF5F6D\", \"#FFC371\", \"#00C9FF\", \"#92FE9D\", \"#C77DFF\", \"#F2EA02\"];\n\ntype CSSPropertiesWithVars = CSSProperties & {\n [key: `--${string}`]: string | number;\n};\n\nconst randomInRange = (min: number, max: number) => Math.random() * (max - min) + min;\n\nconst pickColor = (palette: string[]) => {\n if (!palette || palette.length === 0) return DEFAULT_COLORS[0];\n const index = Math.floor(Math.random() * palette.length);\n return palette[index];\n};\n\nconst createBurstList = (count: number, colors: string[]): FireworkBurst[] =>\n Array.from({ length: Math.max(1, count) }).map((_, index) => ({\n id: `${Date.now()}-${index}-${Math.random().toString(36).slice(2, 7)}`,\n color: pickColor(colors),\n left: randomInRange(8, 92),\n top: randomInRange(15, 85),\n delay: randomInRange(0, 500),\n rotationOffset: randomInRange(0, 360)\n }));\n\nexport interface FireworksProps extends TdFireworksProps, StyledProps {}\n\nconst Fireworks = forwardRef<HTMLDivElement, FireworksProps>((props, ref) => {\n const {\n className,\n style,\n count = 6,\n colors = DEFAULT_COLORS,\n duration = 2400,\n size = 140,\n interval = 2800,\n particleCount = 12,\n loop = true,\n onLaunch,\n ...rest\n } = props;\n\n const { classPrefix } = useConfig();\n const componentCls = `${classPrefix}-fireworks`;\n const safeParticleCount = Math.max(6, particleCount);\n const [bursts, setBursts] = useState<FireworkBurst[]>(() => createBurstList(count, colors));\n const timerRef = useRef<ReturnType<typeof setInterval>>();\n\n const particleAngles = useMemo(() => {\n return Array.from({ length: safeParticleCount }).map((_, index) => (360 / safeParticleCount) * index);\n }, [safeParticleCount]);\n\n const triggerLaunch = useCallback(() => {\n const nextBursts = createBurstList(count, colors);\n setBursts(nextBursts);\n const context: FireworksLaunchContext = { bursts: nextBursts };\n onLaunch?.(context);\n }, [count, colors, onLaunch]);\n\n useEffect(() => {\n triggerLaunch();\n }, [triggerLaunch]);\n\n useEffect(() => {\n if (!loop) return undefined;\n timerRef.current && clearInterval(timerRef.current);\n timerRef.current = setInterval(triggerLaunch, Math.max(interval, duration));\n return () => {\n if (timerRef.current) {\n clearInterval(timerRef.current);\n }\n };\n }, [duration, interval, loop, triggerLaunch]);\n\n useEffect(\n () => () => {\n if (timerRef.current) {\n clearInterval(timerRef.current);\n }\n },\n []\n );\n\n return (\n <div\n ref={ref}\n className={classNames(componentCls, className)}\n style={style}\n role=\"presentation\"\n aria-hidden=\"true\"\n {...rest}\n >\n {bursts.map((burst) => {\n const burstStyle: CSSPropertiesWithVars = {\n \"--fireworks-left\": `${burst.left}%`,\n \"--fireworks-top\": `${burst.top}%`,\n \"--fireworks-delay\": `${burst.delay}ms`,\n \"--fireworks-color\": burst.color,\n \"--fireworks-size\": `${size}px`,\n \"--fireworks-duration\": `${duration}ms`\n };\n\n return (\n <span key={burst.id} className={`${componentCls}__burst`} style={burstStyle}>\n {particleAngles.map((angle, index) => {\n const sparkStyle: CSSPropertiesWithVars = {\n \"--fireworks-delay\": `${burst.delay}ms`,\n \"--fireworks-duration\": `${duration}ms`,\n \"--fireworks-color\": burst.color,\n \"--fireworks-rotate\": `${angle + burst.rotationOffset}deg`\n };\n return <i key={`${burst.id}-${index}`} className={`${componentCls}__spark`} style={sparkStyle} />;\n })}\n </span>\n );\n })}\n </div>\n );\n});\n\nFireworks.displayName = \"Fireworks\";\n\nexport default Fireworks;\n"],"names":["DEFAULT_COLORS","randomInRange","min","max","Math","random","pickColor","palette","length","index","floor","createBurstList","count","colors","Array","from","map","_","id","Date","now","concat","toString","slice","color","left","top","delay","rotationOffset","Fireworks","forwardRef","props","ref","className","style","_props$count","_props$colors","_props$duration","duration","_props$size","size","_props$interval","interval","_props$particleCount","particleCount","_props$loop","loop","onLaunch","rest","_objectWithoutProperties","_excluded","_useConfig","useConfig","classPrefix","componentCls","safeParticleCount","_useState","useState","_useState2","_slicedToArray","bursts","setBursts","timerRef","useRef","particleAngles","useMemo","triggerLaunch","useCallback","nextBursts","context","useEffect","current","clearInterval","setInterval","React","createElement","_objectSpread","classNames","role","burst","burstStyle","key","angle","sparkStyle","displayName"],"mappings":";;;;;;;;;;;;;;AAOA,IAAMA,iBAAiB,CAAC,SAAA,EAAW,WAAW,SAAA,EAAW,SAAA,EAAW,WAAW,SAAS,CAAA;AAMxF,IAAMC,aAAA,GAAgB,SAAhBA,aAAAA,CAAiBC,GAAA,EAAaC,GAAA,EAAA;EAAA,OAAgBC,KAAKC,MAAA,EAAO,IAAKF,MAAMD,GAAA,CAAA,GAAOA,GAAA;AAAA,CAAA;AAElF,IAAMI,SAAA,GAAY,SAAZA,SAAAA,CAAaC,OAAA,EAAsB;AACvC,EAAA,IAAI,CAACA,OAAA,IAAWA,OAAA,CAAQC,WAAW,CAAA,EAAG,OAAOR,eAAe,CAAC,CAAA;AAC7D,EAAA,IAAMS,QAAQL,IAAA,CAAKM,KAAA,CAAMN,KAAKC,MAAA,EAAO,GAAIE,QAAQC,MAAM,CAAA;EACvD,OAAOD,QAAQE,KAAK,CAAA;AACtB,CAAA;AAEA,IAAME,kBAAkB,SAAlBA,gBAAmBC,KAAA,EAAeC;SACtCC,KAAA,CAAMC,IAAA,CAAK;AAAEP,IAAAA,MAAA,EAAQJ,IAAA,CAAKD,GAAA,CAAI,CAAA,EAAGS,KAAK;AAAE,GAAC,EAAEI,GAAA,CAAI,UAACC,GAAGR,KAAA,EAAA;IAAA,OAAW;AAC5DS,MAAAA,cAAOC,IAAA,CAAKC,GAAA,EAAK,EAAA,GAAA,CAAA,CAAAC,MAAA,CAAIZ,KAAK,EAAA,GAAA,CAAA,CAAAY,MAAA,CAAIjB,IAAA,CAAKC,MAAA,GAASiB,QAAA,CAAS,EAAE,EAAEC,KAAA,CAAM,CAAA,EAAG,CAAC,CAAC,CAAA;AACpEC,MAAAA,KAAA,EAAOlB,UA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,EAAA,GAAA,CAAA,CAAAG,MAAA,CAAIZ,KAAK,CAAA;AAAIwB,QAAAA,SAAA,EAAA,EAAA,CAAAZ,MAAA,CAAciC,YAAY,EAAA,SAAA,CAAA;AAAWpB,QAAAA,OAAOiD;AAAA,OAAY,CAAA;AACjG,IAAA,CAAC,CACH,CAAA;AAEJ,EAAA,CAAC,CACH,CAAA;AAEJ,CAAC;AAEDtD,SAAA,CAAUuD,WAAA,GAAc,WAAA;;;;"}
|
package/es/fireworks/index.js
CHANGED
|
@@ -6,8 +6,9 @@ import '../_chunks/dep-CzLhKWCf.js';
|
|
|
6
6
|
import '../_chunks/dep-DN7d1SzH.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'classnames';
|
|
9
|
-
import '../_chunks/dep-
|
|
10
|
-
import '../
|
|
9
|
+
import '../_chunks/dep-u1x3x6MJ.js';
|
|
10
|
+
import '../config-provider/ConfigContext.js';
|
|
11
|
+
import '../_chunks/dep--nQ-cjme.js';
|
|
11
12
|
import 'dayjs';
|
|
12
13
|
|
|
13
14
|
var Fireworks = Fireworks$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../components/fireworks/index.ts"],"sourcesContent":["import _Fireworks from \"./Fireworks\";\n\nimport \"./style/index.js\";\n\nexport type { FireworksProps } from \"./Fireworks\";\nexport * from \"./type\";\n\nexport const Fireworks = _Fireworks;\nexport default Fireworks;\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../components/fireworks/index.ts"],"sourcesContent":["import _Fireworks from \"./Fireworks\";\n\nimport \"./style/index.js\";\n\nexport type { FireworksProps } from \"./Fireworks\";\nexport * from \"./type\";\n\nexport const Fireworks = _Fireworks;\nexport default Fireworks;\n"],"names":["Fireworks","_Fireworks"],"mappings":";;;;;;;;;;;;;AAOO,IAAMA,SAAA,GAAYC;;;;"}
|