@fibrae/semi-foundation 0.0.0-stage → 0.1.1
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 +84 -0
- package/README.md +76 -2
- package/dist/_portal/portal.css +12 -0
- package/dist/_portal/portal.scss +18 -0
- package/dist/anchor/anchor.css +118 -0
- package/dist/anchor/anchor.scss +148 -0
- package/dist/anchor/animation.scss +7 -0
- package/dist/anchor/constants.d.ts +9 -0
- package/dist/anchor/constants.js +14 -0
- package/dist/anchor/foundation.d.ts +49 -0
- package/dist/anchor/foundation.js +143 -0
- package/dist/anchor/rtl.scss +9 -0
- package/dist/anchor/utils.d.ts +6 -0
- package/dist/anchor/utils.js +16 -0
- package/dist/anchor/variables.scss +34 -0
- package/dist/audio-player/audio-player.css +226 -0
- package/dist/audio-player/audio-player.scss +278 -0
- package/dist/audio-player/constants.d.ts +11 -0
- package/dist/audio-player/constants.js +27 -0
- package/dist/audio-player/foundation.d.ts +46 -0
- package/dist/audio-player/foundation.js +116 -0
- package/dist/audio-player/utils.d.ts +2 -0
- package/dist/audio-player/utils.js +6 -0
- package/dist/audio-player/variables.scss +53 -0
- package/dist/auto-complete/animation.scss +5 -0
- package/dist/auto-complete/auto-complete.css +99 -0
- package/dist/auto-complete/auto-complete.scss +36 -0
- package/dist/auto-complete/constants.d.ts +4 -0
- package/dist/auto-complete/constants.js +7 -0
- package/dist/auto-complete/foundation.d.ts +77 -0
- package/dist/auto-complete/foundation.js +219 -0
- package/dist/auto-complete/option.scss +78 -0
- package/dist/auto-complete/rtl.scss +9 -0
- package/dist/auto-complete/variables.scss +23 -0
- package/dist/avatar/animation.scss +13 -0
- package/dist/avatar/avatar.css +652 -0
- package/dist/avatar/avatar.scss +540 -0
- package/dist/avatar/constants.d.ts +6 -0
- package/dist/avatar/constants.js +13 -0
- package/dist/avatar/foundation.d.ts +29 -0
- package/dist/avatar/foundation.js +31 -0
- package/dist/avatar/mixin.scss +7 -0
- package/dist/avatar/rtl.scss +11 -0
- package/dist/avatar/variables.scss +113 -0
- package/dist/backtop/backtop.css +9 -0
- package/dist/backtop/backtop.scss +15 -0
- package/dist/backtop/constants.d.ts +6 -0
- package/dist/backtop/constants.js +35 -0
- package/dist/backtop/foundation.d.ts +26 -0
- package/dist/backtop/foundation.js +69 -0
- package/dist/backtop/rtl.scss +8 -0
- package/dist/backtop/variables.scss +4 -0
- package/dist/badge/badge.css +131 -0
- package/dist/badge/badge.scss +158 -0
- package/dist/badge/constants.d.ts +3 -0
- package/dist/badge/constants.js +4 -0
- package/dist/badge/rtl.scss +8 -0
- package/dist/badge/variables.scss +46 -0
- package/dist/banner/banner.css +75 -0
- package/dist/banner/banner.scss +107 -0
- package/dist/banner/constants.d.ts +3 -0
- package/dist/banner/constants.js +4 -0
- package/dist/banner/foundation.d.ts +9 -0
- package/dist/banner/foundation.js +9 -0
- package/dist/banner/rtl.scss +8 -0
- package/dist/banner/variables.scss +29 -0
- package/dist/base/auto-close-foundation.d.ts +30 -0
- package/dist/base/auto-close-foundation.js +61 -0
- package/dist/base/base.scss +36 -0
- package/dist/base/constants.d.ts +11 -0
- package/dist/base/constants.js +23 -0
- package/dist/base/env.d.ts +1 -0
- package/dist/base/env.js +3 -0
- package/dist/base/foundation.d.ts +75 -0
- package/dist/base/foundation.js +79 -0
- package/dist/base/list-store.d.ts +26 -0
- package/dist/base/list-store.js +80 -0
- package/dist/base/mixin.scss +61 -0
- package/dist/base/tokens.css +799 -0
- package/dist/base/tokens.scss +3 -0
- package/dist/breadcrumb/animation.scss +7 -0
- package/dist/breadcrumb/breadcrumb.css +91 -0
- package/dist/breadcrumb/breadcrumb.scss +116 -0
- package/dist/breadcrumb/constants.d.ts +7 -0
- package/dist/breadcrumb/constants.js +8 -0
- package/dist/breadcrumb/foundation.d.ts +37 -0
- package/dist/breadcrumb/foundation.js +61 -0
- package/dist/breadcrumb/item-foundation.d.ts +45 -0
- package/dist/breadcrumb/item-foundation.js +36 -0
- package/dist/breadcrumb/rtl.scss +9 -0
- package/dist/breadcrumb/variables.scss +23 -0
- package/dist/button/animation.scss +63 -0
- package/dist/button/button.css +406 -0
- package/dist/button/button.scss +513 -0
- package/dist/button/constants.d.ts +6 -0
- package/dist/button/constants.js +5 -0
- package/dist/button/icon-button.css +65 -0
- package/dist/button/icon-button.scss +76 -0
- package/dist/button/rtl.scss +18 -0
- package/dist/button/split-button-group.scss +36 -0
- package/dist/button/utils.d.ts +27 -0
- package/dist/button/utils.js +89 -0
- package/dist/button/variables.scss +169 -0
- package/dist/calendar/calendar.css +486 -0
- package/dist/calendar/calendar.scss +518 -0
- package/dist/calendar/constants.d.ts +10 -0
- package/dist/calendar/constants.js +14 -0
- package/dist/calendar/event-util.d.ts +74 -0
- package/dist/calendar/event-util.js +203 -0
- package/dist/calendar/foundation.d.ts +80 -0
- package/dist/calendar/foundation.js +198 -0
- package/dist/calendar/month-foundation.d.ts +11 -0
- package/dist/calendar/month-foundation.js +13 -0
- package/dist/calendar/rtl.scss +10 -0
- package/dist/calendar/variables.scss +95 -0
- package/dist/card/card.css +124 -0
- package/dist/card/card.scss +149 -0
- package/dist/card/constants.d.ts +3 -0
- package/dist/card/constants.js +4 -0
- package/dist/card/rtl.scss +18 -0
- package/dist/card/variables.scss +32 -0
- package/dist/carousel/animation.scss +9 -0
- package/dist/carousel/carousel.css +345 -0
- package/dist/carousel/carousel.scss +451 -0
- package/dist/carousel/constants.d.ts +27 -0
- package/dist/carousel/constants.js +42 -0
- package/dist/carousel/foundation.d.ts +61 -0
- package/dist/carousel/foundation.js +204 -0
- package/dist/carousel/rtl.scss +14 -0
- package/dist/carousel/variables.scss +49 -0
- package/dist/cascader/animation.scss +5 -0
- package/dist/cascader/cascader.css +488 -0
- package/dist/cascader/cascader.scss +586 -0
- package/dist/cascader/constants.d.ts +19 -0
- package/dist/cascader/constants.js +20 -0
- package/dist/cascader/foundation.d.ts +300 -0
- package/dist/cascader/foundation.js +893 -0
- package/dist/cascader/rtl.scss +14 -0
- package/dist/cascader/util.d.ts +37 -0
- package/dist/cascader/util.js +155 -0
- package/dist/cascader/variables.scss +134 -0
- package/dist/checkbox/animation.scss +11 -0
- package/dist/checkbox/checkbox-foundation.d.ts +97 -0
- package/dist/checkbox/checkbox-foundation.js +65 -0
- package/dist/checkbox/checkbox-group-foundation.d.ts +21 -0
- package/dist/checkbox/checkbox-group-foundation.js +28 -0
- package/dist/checkbox/checkbox.css +301 -0
- package/dist/checkbox/checkbox.scss +415 -0
- package/dist/checkbox/constants.d.ts +14 -0
- package/dist/checkbox/constants.js +15 -0
- package/dist/checkbox/mixin.scss +3 -0
- package/dist/checkbox/rtl.scss +11 -0
- package/dist/checkbox/variables.scss +72 -0
- package/dist/code-highlight/code-highlight.css +54 -0
- package/dist/code-highlight/code-highlight.scss +65 -0
- package/dist/code-highlight/constants.d.ts +3 -0
- package/dist/code-highlight/constants.js +4 -0
- package/dist/code-highlight/highlighter.d.ts +3 -0
- package/dist/code-highlight/highlighter.js +56 -0
- package/dist/code-highlight/index.d.ts +25 -0
- package/dist/code-highlight/index.js +19 -0
- package/dist/code-highlight/registry.d.ts +23 -0
- package/dist/code-highlight/registry.js +33 -0
- package/dist/code-highlight/variables.scss +1 -0
- package/dist/collapse/collapse.css +101 -0
- package/dist/collapse/collapse.scss +112 -0
- package/dist/collapse/constants.d.ts +3 -0
- package/dist/collapse/constants.js +4 -0
- package/dist/collapse/foundation.d.ts +47 -0
- package/dist/collapse/foundation.js +44 -0
- package/dist/collapse/rtl.scss +8 -0
- package/dist/collapse/variables.scss +25 -0
- package/dist/collapsible/animation.scss +9 -0
- package/dist/collapsible/collapsible.css +17 -0
- package/dist/collapsible/collapsible.scss +28 -0
- package/dist/collapsible/constants.d.ts +3 -0
- package/dist/collapsible/constants.js +4 -0
- package/dist/collapsible/foundation.d.ts +68 -0
- package/dist/collapsible/foundation.js +123 -0
- package/dist/collapsible/variables.scss +1 -0
- package/dist/color-picker/alpha-slider-foundation.d.ts +29 -0
- package/dist/color-picker/alpha-slider-foundation.js +41 -0
- package/dist/color-picker/color-choose-area-foundation.d.ts +36 -0
- package/dist/color-picker/color-choose-area-foundation.js +57 -0
- package/dist/color-picker/color-picker.css +104 -0
- package/dist/color-picker/color-picker.scss +131 -0
- package/dist/color-picker/color-slider-foundation.d.ts +29 -0
- package/dist/color-picker/color-slider-foundation.js +41 -0
- package/dist/color-picker/constants.d.ts +3 -0
- package/dist/color-picker/constants.js +4 -0
- package/dist/color-picker/data-part-foundation.d.ts +28 -0
- package/dist/color-picker/data-part-foundation.js +76 -0
- package/dist/color-picker/foundation.d.ts +56 -0
- package/dist/color-picker/foundation.js +149 -0
- package/dist/color-picker/interface.d.ts +32 -0
- package/dist/color-picker/interface.js +0 -0
- package/dist/color-picker/utils/convert.d.ts +16 -0
- package/dist/color-picker/utils/convert.js +150 -0
- package/dist/color-picker/utils/round.d.ts +1 -0
- package/dist/color-picker/utils/round.js +5 -0
- package/dist/color-picker/utils/split.d.ts +5 -0
- package/dist/color-picker/utils/split.js +26 -0
- package/dist/color-picker/variables.scss +26 -0
- package/dist/config-provider/breakpoint-observer.d.ts +23 -0
- package/dist/config-provider/breakpoint-observer.js +139 -0
- package/dist/config-provider/inherit-config.d.ts +24 -0
- package/dist/config-provider/inherit-config.js +24 -0
- package/dist/config-provider/responsive-types.d.ts +39 -0
- package/dist/config-provider/responsive-types.js +0 -0
- package/dist/cropper/constants.d.ts +21 -0
- package/dist/cropper/constants.js +37 -0
- package/dist/cropper/cropper.css +101 -0
- package/dist/cropper/cropper.scss +129 -0
- package/dist/cropper/foundation.d.ts +91 -0
- package/dist/cropper/foundation.js +804 -0
- package/dist/cropper/utils.d.ts +20 -0
- package/dist/cropper/utils.js +23 -0
- package/dist/cropper/variables.scss +8 -0
- package/dist/date-picker/_utils/formatter.d.ts +6 -0
- package/dist/date-picker/_utils/formatter.js +21 -0
- package/dist/date-picker/_utils/get-day-of-week.d.ts +5 -0
- package/dist/date-picker/_utils/get-day-of-week.js +14 -0
- package/dist/date-picker/_utils/get-default-format-token.d.ts +10 -0
- package/dist/date-picker/_utils/get-default-format-token.js +18 -0
- package/dist/date-picker/_utils/get-default-picker-date.d.ts +15 -0
- package/dist/date-picker/_utils/get-default-picker-date.js +38 -0
- package/dist/date-picker/_utils/get-full-date-offset.d.ts +3 -0
- package/dist/date-picker/_utils/get-full-date-offset.js +11 -0
- package/dist/date-picker/_utils/get-inset-input-format-token.d.ts +20 -0
- package/dist/date-picker/_utils/get-inset-input-format-token.js +35 -0
- package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.d.ts +30 -0
- package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.js +59 -0
- package/dist/date-picker/_utils/get-month-table.d.ts +15 -0
- package/dist/date-picker/_utils/get-month-table.js +33 -0
- package/dist/date-picker/_utils/get-year-and-month.d.ts +16 -0
- package/dist/date-picker/_utils/get-year-and-month.js +18 -0
- package/dist/date-picker/_utils/get-year-month-from-value.d.ts +12 -0
- package/dist/date-picker/_utils/get-year-month-from-value.js +18 -0
- package/dist/date-picker/_utils/get-years.d.ts +1 -0
- package/dist/date-picker/_utils/get-years.js +9 -0
- package/dist/date-picker/_utils/index.d.ts +11 -0
- package/dist/date-picker/_utils/index.js +11 -0
- package/dist/date-picker/_utils/is-after.d.ts +1 -0
- package/dist/date-picker/_utils/is-after.js +7 -0
- package/dist/date-picker/_utils/is-before.d.ts +1 -0
- package/dist/date-picker/_utils/is-before.js +7 -0
- package/dist/date-picker/_utils/is-between.d.ts +8 -0
- package/dist/date-picker/_utils/is-between.js +11 -0
- package/dist/date-picker/_utils/is-same-day.d.ts +1 -0
- package/dist/date-picker/_utils/is-same-day.js +7 -0
- package/dist/date-picker/_utils/is-timestamp.d.ts +1 -0
- package/dist/date-picker/_utils/is-timestamp.js +6 -0
- package/dist/date-picker/_utils/is-valid-date.d.ts +1 -0
- package/dist/date-picker/_utils/is-valid-date.js +5 -0
- package/dist/date-picker/_utils/parser.d.ts +5 -0
- package/dist/date-picker/_utils/parser.js +24 -0
- package/dist/date-picker/_utils/picker-type.d.ts +20 -0
- package/dist/date-picker/_utils/picker-type.js +30 -0
- package/dist/date-picker/_utils/to-callback-args.d.ts +18 -0
- package/dist/date-picker/_utils/to-callback-args.js +47 -0
- package/dist/date-picker/_utils/to-date-arg.d.ts +6 -0
- package/dist/date-picker/_utils/to-date-arg.js +13 -0
- package/dist/date-picker/animation.scss +1 -0
- package/dist/date-picker/constants.d.ts +53 -0
- package/dist/date-picker/constants.js +78 -0
- package/dist/date-picker/date-picker.css +1285 -0
- package/dist/date-picker/date-picker.scss +1765 -0
- package/dist/date-picker/foundation.d.ts +336 -0
- package/dist/date-picker/foundation.js +736 -0
- package/dist/date-picker/input-foundation.d.ts +144 -0
- package/dist/date-picker/input-foundation.js +214 -0
- package/dist/date-picker/month-foundation.d.ts +157 -0
- package/dist/date-picker/month-foundation.js +188 -0
- package/dist/date-picker/months-grid-foundation.d.ts +180 -0
- package/dist/date-picker/months-grid-foundation.js +557 -0
- package/dist/date-picker/rtl.scss +28 -0
- package/dist/date-picker/variables.scss +237 -0
- package/dist/date-picker/year-and-month-foundation.d.ts +75 -0
- package/dist/date-picker/year-and-month-foundation.js +115 -0
- package/dist/descriptions/constants.d.ts +3 -0
- package/dist/descriptions/constants.js +4 -0
- package/dist/descriptions/descriptions.css +138 -0
- package/dist/descriptions/descriptions.scss +182 -0
- package/dist/descriptions/foundation.d.ts +12 -0
- package/dist/descriptions/foundation.js +36 -0
- package/dist/descriptions/rtl.scss +8 -0
- package/dist/descriptions/variables.scss +26 -0
- package/dist/divider/constants.d.ts +3 -0
- package/dist/divider/constants.js +4 -0
- package/dist/divider/divider.css +60 -0
- package/dist/divider/divider.scss +83 -0
- package/dist/divider/variables.scss +24 -0
- package/dist/drag-move/foundation.d.ts +31 -0
- package/dist/drag-move/foundation.js +178 -0
- package/dist/dropdown/animation.scss +5 -0
- package/dist/dropdown/constants.d.ts +11 -0
- package/dist/dropdown/constants.js +12 -0
- package/dist/dropdown/dropdown.css +154 -0
- package/dist/dropdown/dropdown.scss +128 -0
- package/dist/dropdown/foundation.d.ts +37 -0
- package/dist/dropdown/foundation.js +120 -0
- package/dist/dropdown/menu-foundation.d.ts +36 -0
- package/dist/dropdown/menu-foundation.js +82 -0
- package/dist/dropdown/rtl.scss +9 -0
- package/dist/dropdown/variables.scss +42 -0
- package/dist/empty/constants.d.ts +6 -0
- package/dist/empty/constants.js +5 -0
- package/dist/empty/empty.css +41 -0
- package/dist/empty/empty.scss +56 -0
- package/dist/empty/rtl.scss +8 -0
- package/dist/empty/variables.scss +10 -0
- package/dist/feedback/constants.d.ts +12 -0
- package/dist/feedback/constants.js +19 -0
- package/dist/feedback/feedback.css +110 -0
- package/dist/feedback/feedback.scss +153 -0
- package/dist/feedback/foundation.d.ts +43 -0
- package/dist/feedback/foundation.js +72 -0
- package/dist/feedback/variables.scss +26 -0
- package/dist/float-button/constants.d.ts +10 -0
- package/dist/float-button/constants.js +13 -0
- package/dist/float-button/float-button.css +159 -0
- package/dist/float-button/float-button.scss +203 -0
- package/dist/float-button/rtl.scss +2 -0
- package/dist/float-button/variables.scss +47 -0
- package/dist/form/constants.d.ts +7 -0
- package/dist/form/constants.js +8 -0
- package/dist/form/field-store.d.ts +10 -0
- package/dist/form/field-store.js +28 -0
- package/dist/form/form-api-proxy.d.ts +13 -0
- package/dist/form/form-api-proxy.js +48 -0
- package/dist/form/form.css +229 -0
- package/dist/form/form.scss +307 -0
- package/dist/form/foundation.d.ts +65 -0
- package/dist/form/foundation.js +836 -0
- package/dist/form/interface.d.ts +171 -0
- package/dist/form/interface.js +0 -0
- package/dist/form/rtl.scss +13 -0
- package/dist/form/utils.d.ts +89 -0
- package/dist/form/utils.js +115 -0
- package/dist/form/variables.scss +53 -0
- package/dist/grid/constants.d.ts +6 -0
- package/dist/grid/constants.js +12 -0
- package/dist/grid/grid.css +4206 -0
- package/dist/grid/grid.scss +101 -0
- package/dist/grid/gutter.d.ts +12 -0
- package/dist/grid/gutter.js +39 -0
- package/dist/grid/mixin.scss +119 -0
- package/dist/grid/rtl.scss +10 -0
- package/dist/grid/utils.d.ts +22 -0
- package/dist/grid/utils.js +39 -0
- package/dist/grid/variables.scss +29 -0
- package/dist/highlight/constants.d.ts +3 -0
- package/dist/highlight/constants.js +4 -0
- package/dist/highlight/foundation.d.ts +59 -0
- package/dist/highlight/foundation.js +110 -0
- package/dist/highlight/highlight.css +5 -0
- package/dist/highlight/highlight.scss +11 -0
- package/dist/highlight/variables.scss +6 -0
- package/dist/hot-keys/constants.d.ts +105 -0
- package/dist/hot-keys/constants.js +207 -0
- package/dist/hot-keys/foundation.d.ts +19 -0
- package/dist/hot-keys/foundation.js +92 -0
- package/dist/hot-keys/hot-keys.css +29 -0
- package/dist/hot-keys/hot-keys.scss +30 -0
- package/dist/hot-keys/variables.scss +12 -0
- package/dist/image/animation.scss +9 -0
- package/dist/image/constants.d.ts +6 -0
- package/dist/image/constants.js +5 -0
- package/dist/image/image-foundation.d.ts +30 -0
- package/dist/image/image-foundation.js +40 -0
- package/dist/image/image.css +250 -0
- package/dist/image/image.scss +272 -0
- package/dist/image/preview-footer-foundation.d.ts +26 -0
- package/dist/image/preview-footer-foundation.js +30 -0
- package/dist/image/preview-foundation.d.ts +51 -0
- package/dist/image/preview-foundation.js +70 -0
- package/dist/image/preview-image-foundation.d.ts +70 -0
- package/dist/image/preview-image-foundation.js +226 -0
- package/dist/image/preview-inner-foundation.d.ts +87 -0
- package/dist/image/preview-inner-foundation.js +238 -0
- package/dist/image/rtl.scss +28 -0
- package/dist/image/utils.d.ts +4 -0
- package/dist/image/utils.js +66 -0
- package/dist/image/variables.scss +44 -0
- package/dist/input/animation.scss +11 -0
- package/dist/input/constants.d.ts +9 -0
- package/dist/input/constants.js +14 -0
- package/dist/input/foundation.d.ts +51 -0
- package/dist/input/foundation.js +79 -0
- package/dist/input/input.css +616 -0
- package/dist/input/input.scss +738 -0
- package/dist/input/rtl.scss +11 -0
- package/dist/input/text-entry-foundation.d.ts +55 -0
- package/dist/input/text-entry-foundation.js +93 -0
- package/dist/input/textarea-foundation.d.ts +61 -0
- package/dist/input/textarea-foundation.js +130 -0
- package/dist/input/textarea.css +257 -0
- package/dist/input/textarea.scss +313 -0
- package/dist/input/util/line-number.d.ts +2 -0
- package/dist/input/util/line-number.js +42 -0
- package/dist/input/util/truncate-value.d.ts +5 -0
- package/dist/input/util/truncate-value.js +14 -0
- package/dist/input/variables.scss +107 -0
- package/dist/input-number/animation.scss +11 -0
- package/dist/input-number/caret.d.ts +4 -0
- package/dist/input-number/caret.js +21 -0
- package/dist/input-number/constants.d.ts +15 -0
- package/dist/input-number/constants.js +13 -0
- package/dist/input-number/foundation.d.ts +110 -0
- package/dist/input-number/foundation.js +557 -0
- package/dist/input-number/input-number.css +84 -0
- package/dist/input-number/input-number.scss +124 -0
- package/dist/input-number/rtl.scss +9 -0
- package/dist/input-number/variables.scss +26 -0
- package/dist/json-viewer/constants.d.ts +3 -0
- package/dist/json-viewer/constants.js +4 -0
- package/dist/json-viewer/foundation.d.ts +42 -0
- package/dist/json-viewer/foundation.js +124 -0
- package/dist/json-viewer/json-viewer.css +183 -0
- package/dist/json-viewer/json-viewer.scss +224 -0
- package/dist/json-viewer/variables.scss +18 -0
- package/dist/layout/constants.d.ts +3 -0
- package/dist/layout/constants.js +4 -0
- package/dist/layout/layout.css +36 -0
- package/dist/layout/layout.scss +51 -0
- package/dist/layout/rtl.scss +7 -0
- package/dist/list/constants.d.ts +3 -0
- package/dist/list/constants.js +4 -0
- package/dist/list/list.css +123 -0
- package/dist/list/list.scss +162 -0
- package/dist/list/rtl.scss +9 -0
- package/dist/list/variables.scss +18 -0
- package/dist/locale/interface.d.ts +663 -0
- package/dist/locale/interface.js +0 -0
- package/dist/locale/resolve-locale.d.ts +6 -0
- package/dist/locale/resolve-locale.js +17 -0
- package/dist/locale/source/ar.d.ts +3 -0
- package/dist/locale/source/ar.js +502 -0
- package/dist/locale/source/az.d.ts +3 -0
- package/dist/locale/source/az.js +502 -0
- package/dist/locale/source/bg.d.ts +3 -0
- package/dist/locale/source/bg.js +502 -0
- package/dist/locale/source/bn_IN.d.ts +3 -0
- package/dist/locale/source/bn_IN.js +502 -0
- package/dist/locale/source/ca.d.ts +3 -0
- package/dist/locale/source/ca.js +502 -0
- package/dist/locale/source/ceb_PH.d.ts +3 -0
- package/dist/locale/source/ceb_PH.js +502 -0
- package/dist/locale/source/cs_CZ.d.ts +3 -0
- package/dist/locale/source/cs_CZ.js +502 -0
- package/dist/locale/source/da.d.ts +3 -0
- package/dist/locale/source/da.js +502 -0
- package/dist/locale/source/de.d.ts +3 -0
- package/dist/locale/source/de.js +502 -0
- package/dist/locale/source/el_GR.d.ts +3 -0
- package/dist/locale/source/el_GR.js +502 -0
- package/dist/locale/source/en_GB.d.ts +3 -0
- package/dist/locale/source/en_GB.js +502 -0
- package/dist/locale/source/en_US.d.ts +3 -0
- package/dist/locale/source/en_US.js +502 -0
- package/dist/locale/source/es.d.ts +3 -0
- package/dist/locale/source/es.js +502 -0
- package/dist/locale/source/es_419.d.ts +3 -0
- package/dist/locale/source/es_419.js +502 -0
- package/dist/locale/source/et.d.ts +3 -0
- package/dist/locale/source/et.js +502 -0
- package/dist/locale/source/fa_IR.d.ts +3 -0
- package/dist/locale/source/fa_IR.js +502 -0
- package/dist/locale/source/fi_FI.d.ts +3 -0
- package/dist/locale/source/fi_FI.js +502 -0
- package/dist/locale/source/fil_PH.d.ts +3 -0
- package/dist/locale/source/fil_PH.js +502 -0
- package/dist/locale/source/fr.d.ts +3 -0
- package/dist/locale/source/fr.js +502 -0
- package/dist/locale/source/fr_CA.d.ts +3 -0
- package/dist/locale/source/fr_CA.js +502 -0
- package/dist/locale/source/ga.d.ts +3 -0
- package/dist/locale/source/ga.js +502 -0
- package/dist/locale/source/he_IL.d.ts +3 -0
- package/dist/locale/source/he_IL.js +502 -0
- package/dist/locale/source/hi_IN.d.ts +3 -0
- package/dist/locale/source/hi_IN.js +502 -0
- package/dist/locale/source/hr.d.ts +3 -0
- package/dist/locale/source/hr.js +502 -0
- package/dist/locale/source/hu_HU.d.ts +3 -0
- package/dist/locale/source/hu_HU.js +502 -0
- package/dist/locale/source/id_ID.d.ts +3 -0
- package/dist/locale/source/id_ID.js +502 -0
- package/dist/locale/source/is.d.ts +3 -0
- package/dist/locale/source/is.js +502 -0
- package/dist/locale/source/it.d.ts +3 -0
- package/dist/locale/source/it.js +502 -0
- package/dist/locale/source/ja_JP.d.ts +3 -0
- package/dist/locale/source/ja_JP.js +502 -0
- package/dist/locale/source/jv_ID.d.ts +3 -0
- package/dist/locale/source/jv_ID.js +502 -0
- package/dist/locale/source/kk.d.ts +3 -0
- package/dist/locale/source/kk.js +502 -0
- package/dist/locale/source/km_KH.d.ts +3 -0
- package/dist/locale/source/km_KH.js +502 -0
- package/dist/locale/source/ko_KR.d.ts +3 -0
- package/dist/locale/source/ko_KR.js +502 -0
- package/dist/locale/source/lt.d.ts +3 -0
- package/dist/locale/source/lt.js +502 -0
- package/dist/locale/source/lv.d.ts +3 -0
- package/dist/locale/source/lv.js +502 -0
- package/dist/locale/source/ms_MY.d.ts +3 -0
- package/dist/locale/source/ms_MY.js +502 -0
- package/dist/locale/source/my_MM.d.ts +3 -0
- package/dist/locale/source/my_MM.js +502 -0
- package/dist/locale/source/nb.d.ts +3 -0
- package/dist/locale/source/nb.js +502 -0
- package/dist/locale/source/nl_NL.d.ts +3 -0
- package/dist/locale/source/nl_NL.js +502 -0
- package/dist/locale/source/pl_PL.d.ts +3 -0
- package/dist/locale/source/pl_PL.js +502 -0
- package/dist/locale/source/pt.d.ts +3 -0
- package/dist/locale/source/pt.js +502 -0
- package/dist/locale/source/pt_BR.d.ts +3 -0
- package/dist/locale/source/pt_BR.js +502 -0
- package/dist/locale/source/ro.d.ts +3 -0
- package/dist/locale/source/ro.js +502 -0
- package/dist/locale/source/ru_RU.d.ts +3 -0
- package/dist/locale/source/ru_RU.js +502 -0
- package/dist/locale/source/sk.d.ts +3 -0
- package/dist/locale/source/sk.js +502 -0
- package/dist/locale/source/sl.d.ts +3 -0
- package/dist/locale/source/sl.js +502 -0
- package/dist/locale/source/sq.d.ts +3 -0
- package/dist/locale/source/sq.js +502 -0
- package/dist/locale/source/sv_SE.d.ts +3 -0
- package/dist/locale/source/sv_SE.js +502 -0
- package/dist/locale/source/sw.d.ts +3 -0
- package/dist/locale/source/sw.js +502 -0
- package/dist/locale/source/th_TH.d.ts +3 -0
- package/dist/locale/source/th_TH.js +502 -0
- package/dist/locale/source/tr_TR.d.ts +3 -0
- package/dist/locale/source/tr_TR.js +502 -0
- package/dist/locale/source/uk_UA.d.ts +3 -0
- package/dist/locale/source/uk_UA.js +502 -0
- package/dist/locale/source/ur.d.ts +3 -0
- package/dist/locale/source/ur.js +502 -0
- package/dist/locale/source/uz.d.ts +3 -0
- package/dist/locale/source/uz.js +502 -0
- package/dist/locale/source/vi_VN.d.ts +3 -0
- package/dist/locale/source/vi_VN.js +502 -0
- package/dist/locale/source/zh_CN.d.ts +3 -0
- package/dist/locale/source/zh_CN.js +502 -0
- package/dist/locale/source/zh_TW.d.ts +3 -0
- package/dist/locale/source/zh_TW.js +502 -0
- package/dist/lottie/constants.d.ts +3 -0
- package/dist/lottie/constants.js +4 -0
- package/dist/lottie/foundation.d.ts +24 -0
- package/dist/lottie/foundation.js +62 -0
- package/dist/markdown-render/constants.d.ts +3 -0
- package/dist/markdown-render/constants.js +4 -0
- package/dist/markdown-render/foundation.d.ts +50 -0
- package/dist/markdown-render/foundation.js +101 -0
- package/dist/markdown-render/markdown-render.css +59 -0
- package/dist/markdown-render/markdown-render.scss +79 -0
- package/dist/markdown-render/variables.scss +31 -0
- package/dist/modal/animation.scss +25 -0
- package/dist/modal/confirm.d.ts +13 -0
- package/dist/modal/confirm.js +34 -0
- package/dist/modal/constants.d.ts +3 -0
- package/dist/modal/constants.js +4 -0
- package/dist/modal/modal-content-foundation.d.ts +40 -0
- package/dist/modal/modal-content-foundation.js +48 -0
- package/dist/modal/modal-foundation.d.ts +85 -0
- package/dist/modal/modal-foundation.js +74 -0
- package/dist/modal/modal.css +235 -0
- package/dist/modal/modal.scss +285 -0
- package/dist/modal/rtl.scss +10 -0
- package/dist/modal/variables.scss +70 -0
- package/dist/navigation/animation.scss +5 -0
- package/dist/navigation/constants.d.ts +17 -0
- package/dist/navigation/constants.js +20 -0
- package/dist/navigation/foundation.d.ts +75 -0
- package/dist/navigation/foundation.js +158 -0
- package/dist/navigation/item-foundation.d.ts +44 -0
- package/dist/navigation/item-foundation.js +42 -0
- package/dist/navigation/mixin.scss +100 -0
- package/dist/navigation/navigation.css +779 -0
- package/dist/navigation/navigation.scss +764 -0
- package/dist/navigation/rtl.scss +17 -0
- package/dist/navigation/sub-nav-foundation.d.ts +31 -0
- package/dist/navigation/sub-nav-foundation.js +54 -0
- package/dist/navigation/variables.scss +120 -0
- package/dist/notification/animation.scss +12 -0
- package/dist/notification/constants.d.ts +19 -0
- package/dist/notification/constants.js +32 -0
- package/dist/notification/notification-foundation.d.ts +33 -0
- package/dist/notification/notification-foundation.js +5 -0
- package/dist/notification/notification-list-foundation.d.ts +56 -0
- package/dist/notification/notification-list-foundation.js +49 -0
- package/dist/notification/notification.css +398 -0
- package/dist/notification/notification.scss +428 -0
- package/dist/notification/rtl.scss +9 -0
- package/dist/notification/variables.scss +41 -0
- package/dist/overflow-list/constants.d.ts +17 -0
- package/dist/overflow-list/constants.js +16 -0
- package/dist/overflow-list/foundation.d.ts +78 -0
- package/dist/overflow-list/foundation.js +189 -0
- package/dist/overflow-list/overflow-list.css +19 -0
- package/dist/overflow-list/overflow-list.scss +24 -0
- package/dist/overflow-list/rtl.scss +7 -0
- package/dist/pagination/animation.scss +11 -0
- package/dist/pagination/constants.d.ts +8 -0
- package/dist/pagination/constants.js +14 -0
- package/dist/pagination/foundation.d.ts +61 -0
- package/dist/pagination/foundation.js +175 -0
- package/dist/pagination/pagination.css +192 -0
- package/dist/pagination/pagination.scss +189 -0
- package/dist/pagination/rtl.scss +14 -0
- package/dist/pagination/variables.scss +45 -0
- package/dist/pincode/constants.d.ts +3 -0
- package/dist/pincode/constants.js +4 -0
- package/dist/pincode/foundation.d.ts +39 -0
- package/dist/pincode/foundation.js +86 -0
- package/dist/pincode/pincode.css +30 -0
- package/dist/pincode/pincode.scss +47 -0
- package/dist/pincode/variables.scss +9 -0
- package/dist/popconfirm/constants.d.ts +7 -0
- package/dist/popconfirm/constants.js +8 -0
- package/dist/popconfirm/popconfirm-foundation.d.ts +38 -0
- package/dist/popconfirm/popconfirm-foundation.js +57 -0
- package/dist/popconfirm/popconfirm.css +69 -0
- package/dist/popconfirm/popconfirm.scss +84 -0
- package/dist/popconfirm/rtl.scss +12 -0
- package/dist/popconfirm/variables.scss +26 -0
- package/dist/popover/animation.scss +5 -0
- package/dist/popover/constants.d.ts +21 -0
- package/dist/popover/constants.js +47 -0
- package/dist/popover/popover.css +212 -0
- package/dist/popover/popover.scss +64 -0
- package/dist/popover/rtl.scss +9 -0
- package/dist/popover/variables.scss +25 -0
- package/dist/progress/constants.d.ts +7 -0
- package/dist/progress/constants.js +8 -0
- package/dist/progress/generates.d.ts +11 -0
- package/dist/progress/generates.js +27 -0
- package/dist/progress/progress.css +142 -0
- package/dist/progress/progress.scss +170 -0
- package/dist/progress/rtl.scss +13 -0
- package/dist/progress/utils.d.ts +18 -0
- package/dist/progress/utils.js +45 -0
- package/dist/progress/variables.scss +26 -0
- package/dist/radio/animation.scss +9 -0
- package/dist/radio/constants.d.ts +16 -0
- package/dist/radio/constants.js +19 -0
- package/dist/radio/mixin.scss +3 -0
- package/dist/radio/radio-foundation.d.ts +78 -0
- package/dist/radio/radio-foundation.js +94 -0
- package/dist/radio/radio-group-foundation.d.ts +18 -0
- package/dist/radio/radio-group-foundation.js +27 -0
- package/dist/radio/radio.css +332 -0
- package/dist/radio/radio.scss +457 -0
- package/dist/radio/rtl.scss +11 -0
- package/dist/radio/variables.scss +107 -0
- package/dist/rating/animation.scss +7 -0
- package/dist/rating/constants.d.ts +6 -0
- package/dist/rating/constants.js +5 -0
- package/dist/rating/foundation.d.ts +109 -0
- package/dist/rating/foundation.js +167 -0
- package/dist/rating/rating.css +89 -0
- package/dist/rating/rating.scss +119 -0
- package/dist/rating/rtl.scss +9 -0
- package/dist/rating/variables.scss +19 -0
- package/dist/resizable/constants.d.ts +3 -0
- package/dist/resizable/constants.js +4 -0
- package/dist/resizable/foundation.d.ts +3 -0
- package/dist/resizable/foundation.js +3 -0
- package/dist/resizable/group/index.d.ts +55 -0
- package/dist/resizable/group/index.js +313 -0
- package/dist/resizable/resizable.css +125 -0
- package/dist/resizable/resizable.scss +147 -0
- package/dist/resizable/single/index.d.ts +90 -0
- package/dist/resizable/single/index.js +429 -0
- package/dist/resizable/types.d.ts +43 -0
- package/dist/resizable/types.js +18 -0
- package/dist/resizable/utils.d.ts +23 -0
- package/dist/resizable/utils.js +53 -0
- package/dist/resizable/variables.scss +10 -0
- package/dist/scroll-list/animation.scss +5 -0
- package/dist/scroll-list/constants.d.ts +8 -0
- package/dist/scroll-list/constants.js +11 -0
- package/dist/scroll-list/item-foundation.d.ts +56 -0
- package/dist/scroll-list/item-foundation.js +336 -0
- package/dist/scroll-list/rtl.scss +9 -0
- package/dist/scroll-list/scroll-list.css +178 -0
- package/dist/scroll-list/scroll-list.scss +198 -0
- package/dist/scroll-list/scroll-to.d.ts +2 -0
- package/dist/scroll-list/scroll-to.js +15 -0
- package/dist/scroll-list/variables.scss +50 -0
- package/dist/select/animation.scss +16 -0
- package/dist/select/combobox-name.d.ts +10 -0
- package/dist/select/combobox-name.js +21 -0
- package/dist/select/constants.d.ts +15 -0
- package/dist/select/constants.js +22 -0
- package/dist/select/foundation.d.ts +140 -0
- package/dist/select/foundation.js +775 -0
- package/dist/select/mixin.scss +8 -0
- package/dist/select/option-foundation.d.ts +51 -0
- package/dist/select/option-foundation.js +44 -0
- package/dist/select/option.scss +86 -0
- package/dist/select/rtl.scss +10 -0
- package/dist/select/select.css +533 -0
- package/dist/select/select.scss +554 -0
- package/dist/select/variables.scss +128 -0
- package/dist/side-sheet/animation.scss +17 -0
- package/dist/side-sheet/constants.d.ts +6 -0
- package/dist/side-sheet/constants.js +5 -0
- package/dist/side-sheet/rtl.scss +9 -0
- package/dist/side-sheet/side-sheet-foundation.d.ts +69 -0
- package/dist/side-sheet/side-sheet-foundation.js +54 -0
- package/dist/side-sheet/side-sheet.css +285 -0
- package/dist/side-sheet/side-sheet.scss +356 -0
- package/dist/side-sheet/variables.scss +27 -0
- package/dist/skeleton/animation.scss +4 -0
- package/dist/skeleton/constants.d.ts +3 -0
- package/dist/skeleton/constants.js +4 -0
- package/dist/skeleton/rtl.scss +9 -0
- package/dist/skeleton/skeleton.css +84 -0
- package/dist/skeleton/skeleton.scss +115 -0
- package/dist/skeleton/variables.scss +21 -0
- package/dist/slider/animation.scss +7 -0
- package/dist/slider/constants.d.ts +9 -0
- package/dist/slider/constants.js +12 -0
- package/dist/slider/foundation.d.ts +167 -0
- package/dist/slider/foundation.js +441 -0
- package/dist/slider/rtl.scss +23 -0
- package/dist/slider/slider.css +239 -0
- package/dist/slider/slider.scss +269 -0
- package/dist/slider/variables.scss +67 -0
- package/dist/sortable/accessibility.d.ts +14 -0
- package/dist/sortable/accessibility.js +45 -0
- package/dist/space/constants.d.ts +8 -0
- package/dist/space/constants.js +9 -0
- package/dist/space/rtl.scss +8 -0
- package/dist/space/space.css +46 -0
- package/dist/space/space.scss +65 -0
- package/dist/space/variables.scss +5 -0
- package/dist/spin/animation.scss +4 -0
- package/dist/spin/constants.d.ts +3 -0
- package/dist/spin/constants.js +3 -0
- package/dist/spin/foundation.d.ts +20 -0
- package/dist/spin/foundation.js +43 -0
- package/dist/spin/mixin.scss +7 -0
- package/dist/spin/rtl.scss +11 -0
- package/dist/spin/spin.css +97 -0
- package/dist/spin/spin.scss +111 -0
- package/dist/spin/variables.scss +11 -0
- package/dist/steps/animation.scss +15 -0
- package/dist/steps/bacis-steps.scss +338 -0
- package/dist/steps/constants.d.ts +5 -0
- package/dist/steps/constants.js +8 -0
- package/dist/steps/fill-steps.scss +179 -0
- package/dist/steps/mixin.scss +3 -0
- package/dist/steps/nav-steps.scss +66 -0
- package/dist/steps/rtl.scss +14 -0
- package/dist/steps/steps.css +523 -0
- package/dist/steps/steps.scss +17 -0
- package/dist/steps/utils.d.ts +10 -0
- package/dist/steps/utils.js +15 -0
- package/dist/steps/variables.scss +95 -0
- package/dist/switch/animation.scss +5 -0
- package/dist/switch/constants.d.ts +13 -0
- package/dist/switch/constants.js +16 -0
- package/dist/switch/foundation.d.ts +24 -0
- package/dist/switch/foundation.js +19 -0
- package/dist/switch/rtl.scss +98 -0
- package/dist/switch/switch.css +293 -0
- package/dist/switch/switch.scss +317 -0
- package/dist/switch/variables.scss +75 -0
- package/dist/table/animation.scss +7 -0
- package/dist/table/constants.d.ts +62 -0
- package/dist/table/constants.js +97 -0
- package/dist/table/foundation.d.ts +354 -0
- package/dist/table/foundation.js +870 -0
- package/dist/table/mixin.scss +12 -0
- package/dist/table/operation-panel.scss +42 -0
- package/dist/table/rtl.scss +24 -0
- package/dist/table/table.css +636 -0
- package/dist/table/table.scss +789 -0
- package/dist/table/utils.d.ts +187 -0
- package/dist/table/utils.js +482 -0
- package/dist/table/variables.scss +85 -0
- package/dist/tabs/animation.scss +30 -0
- package/dist/tabs/constants.d.ts +28 -0
- package/dist/tabs/constants.js +37 -0
- package/dist/tabs/foundation.d.ts +91 -0
- package/dist/tabs/foundation.js +189 -0
- package/dist/tabs/rtl.scss +16 -0
- package/dist/tabs/tabs.css +699 -0
- package/dist/tabs/tabs.scss +933 -0
- package/dist/tabs/variables.scss +155 -0
- package/dist/tag/constants.d.ts +8 -0
- package/dist/tag/constants.js +35 -0
- package/dist/tag/focus.d.ts +6 -0
- package/dist/tag/focus.js +23 -0
- package/dist/tag/mixin.scss +18 -0
- package/dist/tag/rtl.scss +12 -0
- package/dist/tag/tag-key.d.ts +9 -0
- package/dist/tag/tag-key.js +18 -0
- package/dist/tag/tag.css +537 -0
- package/dist/tag/tag.scss +359 -0
- package/dist/tag/variables.scss +85 -0
- package/dist/tag-input/animation.scss +9 -0
- package/dist/tag-input/constants.d.ts +6 -0
- package/dist/tag-input/constants.js +9 -0
- package/dist/tag-input/foundation.d.ts +91 -0
- package/dist/tag-input/foundation.js +222 -0
- package/dist/tag-input/rtl.scss +9 -0
- package/dist/tag-input/tag-input.css +297 -0
- package/dist/tag-input/tag-input.scss +358 -0
- package/dist/tag-input/utils/get-splited-array.d.ts +4 -0
- package/dist/tag-input/utils/get-splited-array.js +16 -0
- package/dist/tag-input/utils/tag-focus.d.ts +3 -0
- package/dist/tag-input/utils/tag-focus.js +15 -0
- package/dist/tag-input/variables.scss +57 -0
- package/dist/theme/_font.scss +49 -0
- package/dist/theme/_palette.scss +474 -0
- package/dist/theme/animation.scss +40 -0
- package/dist/theme/global.scss +287 -0
- package/dist/theme/index.scss +3 -0
- package/dist/theme/mixin.scss +66 -0
- package/dist/theme/variables.scss +56 -0
- package/dist/time-picker/combox-foundation.d.ts +79 -0
- package/dist/time-picker/combox-foundation.js +103 -0
- package/dist/time-picker/constants.d.ts +18 -0
- package/dist/time-picker/constants.js +23 -0
- package/dist/time-picker/foundation.d.ts +108 -0
- package/dist/time-picker/foundation.js +254 -0
- package/dist/time-picker/input-foundation.d.ts +15 -0
- package/dist/time-picker/input-foundation.js +33 -0
- package/dist/time-picker/rtl.scss +10 -0
- package/dist/time-picker/time-picker.css +82 -0
- package/dist/time-picker/time-picker.scss +128 -0
- package/dist/time-picker/utils/index.d.ts +18 -0
- package/dist/time-picker/utils/index.js +68 -0
- package/dist/time-picker/variables.scss +19 -0
- package/dist/timeline/constants.d.ts +4 -0
- package/dist/timeline/constants.js +7 -0
- package/dist/timeline/rtl.scss +13 -0
- package/dist/timeline/timeline.css +137 -0
- package/dist/timeline/timeline.scss +190 -0
- package/dist/timeline/utils.d.ts +3 -0
- package/dist/timeline/utils.js +10 -0
- package/dist/timeline/variables.scss +48 -0
- package/dist/toast/animation.scss +16 -0
- package/dist/toast/constants.d.ts +25 -0
- package/dist/toast/constants.js +34 -0
- package/dist/toast/rtl.scss +9 -0
- package/dist/toast/toast-foundation.d.ts +37 -0
- package/dist/toast/toast-foundation.js +5 -0
- package/dist/toast/toast-list-foundation.d.ts +25 -0
- package/dist/toast/toast-list-foundation.js +54 -0
- package/dist/toast/toast.css +174 -0
- package/dist/toast/toast.scss +238 -0
- package/dist/toast/variables.scss +45 -0
- package/dist/tooltip/adjust-position.d.ts +41 -0
- package/dist/tooltip/adjust-position.js +202 -0
- package/dist/tooltip/animation.scss +4 -0
- package/dist/tooltip/arrow.scss +178 -0
- package/dist/tooltip/constants.d.ts +50 -0
- package/dist/tooltip/constants.js +96 -0
- package/dist/tooltip/foundation.d.ts +105 -0
- package/dist/tooltip/foundation.js +650 -0
- package/dist/tooltip/position.scss +63 -0
- package/dist/tooltip/rtl.scss +9 -0
- package/dist/tooltip/tooltip.css +229 -0
- package/dist/tooltip/tooltip.scss +72 -0
- package/dist/tooltip/variables.scss +34 -0
- package/dist/transfer/animation.scss +5 -0
- package/dist/transfer/constants.d.ts +11 -0
- package/dist/transfer/constants.js +10 -0
- package/dist/transfer/foundation.d.ts +112 -0
- package/dist/transfer/foundation.js +179 -0
- package/dist/transfer/rtl.scss +9 -0
- package/dist/transfer/transfer-utils.d.ts +5 -0
- package/dist/transfer/transfer-utils.js +45 -0
- package/dist/transfer/transfer.css +237 -0
- package/dist/transfer/transfer.scss +260 -0
- package/dist/transfer/variables.scss +50 -0
- package/dist/tree/animation.scss +7 -0
- package/dist/tree/constants.d.ts +7 -0
- package/dist/tree/constants.js +8 -0
- package/dist/tree/foundation.d.ts +296 -0
- package/dist/tree/foundation.js +539 -0
- package/dist/tree/rtl.scss +16 -0
- package/dist/tree/shared.d.ts +128 -0
- package/dist/tree/shared.js +308 -0
- package/dist/tree/tree-util.d.ts +105 -0
- package/dist/tree/tree-util.js +455 -0
- package/dist/tree/tree.css +387 -0
- package/dist/tree/tree.scss +439 -0
- package/dist/tree/variables.scss +39 -0
- package/dist/tree-select/constants.d.ts +11 -0
- package/dist/tree-select/constants.js +19 -0
- package/dist/tree-select/foundation.d.ts +176 -0
- package/dist/tree-select/foundation.js +610 -0
- package/dist/tree-select/rtl.scss +9 -0
- package/dist/tree-select/tree-select.css +376 -0
- package/dist/tree-select/tree-select.scss +467 -0
- package/dist/tree-select/variables.scss +90 -0
- package/dist/typography/constants.d.ts +12 -0
- package/dist/typography/constants.js +50 -0
- package/dist/typography/ellipsis.d.ts +36 -0
- package/dist/typography/ellipsis.js +156 -0
- package/dist/typography/format-numeral.d.ts +10 -0
- package/dist/typography/format-numeral.js +99 -0
- package/dist/typography/rtl.scss +13 -0
- package/dist/typography/typography.css +380 -0
- package/dist/typography/typography.scss +384 -0
- package/dist/typography/variables.scss +94 -0
- package/dist/upload/constants.d.ts +24 -0
- package/dist/upload/constants.js +39 -0
- package/dist/upload/foundation.d.ts +187 -0
- package/dist/upload/foundation.js +762 -0
- package/dist/upload/rtl.scss +13 -0
- package/dist/upload/upload.css +599 -0
- package/dist/upload/upload.scss +640 -0
- package/dist/upload/utils.d.ts +25 -0
- package/dist/upload/utils.js +98 -0
- package/dist/upload/variables.scss +89 -0
- package/dist/user-guide/animation.scss +4 -0
- package/dist/user-guide/constants.d.ts +9 -0
- package/dist/user-guide/constants.js +12 -0
- package/dist/user-guide/foundation.d.ts +47 -0
- package/dist/user-guide/foundation.js +73 -0
- package/dist/user-guide/user-guide.css +120 -0
- package/dist/user-guide/user-guide.scss +151 -0
- package/dist/user-guide/variables.scss +40 -0
- package/dist/utils/a11y.d.ts +99 -0
- package/dist/utils/a11y.js +168 -0
- package/dist/utils/animated-height.d.ts +8 -0
- package/dist/utils/animated-height.js +28 -0
- package/dist/utils/announcer.d.ts +35 -0
- package/dist/utils/announcer.js +54 -0
- package/dist/utils/array-move.d.ts +1 -0
- package/dist/utils/array-move.js +5 -0
- package/dist/utils/array.d.ts +10 -0
- package/dist/utils/array.js +21 -0
- package/dist/utils/classnames.d.ts +2 -0
- package/dist/utils/classnames.js +10 -0
- package/dist/utils/clipboard.d.ts +1 -0
- package/dist/utils/clipboard.js +5 -0
- package/dist/utils/date-fns-extra.d.ts +38 -0
- package/dist/utils/date-fns-extra.js +105 -0
- package/dist/utils/dom.d.ts +31 -0
- package/dist/utils/dom.js +53 -0
- package/dist/utils/escape-html.d.ts +9 -0
- package/dist/utils/escape-html.js +67 -0
- package/dist/utils/event.d.ts +9 -0
- package/dist/utils/event.js +36 -0
- package/dist/utils/field-sizing.d.ts +15 -0
- package/dist/utils/field-sizing.js +52 -0
- package/dist/utils/focus-handle.d.ts +44 -0
- package/dist/utils/focus-handle.js +93 -0
- package/dist/utils/focus-handover.d.ts +11 -0
- package/dist/utils/focus-handover.js +22 -0
- package/dist/utils/focus-scope.d.ts +25 -0
- package/dist/utils/focus-scope.js +78 -0
- package/dist/utils/function.d.ts +1 -0
- package/dist/utils/function.js +3 -0
- package/dist/utils/get-data-attr.d.ts +3 -0
- package/dist/utils/get-data-attr.js +5 -0
- package/dist/utils/is-element.d.ts +1 -0
- package/dist/utils/is-element.js +5 -0
- package/dist/utils/is-enter-press.d.ts +3 -0
- package/dist/utils/is-enter-press.js +6 -0
- package/dist/utils/is-object.d.ts +1 -0
- package/dist/utils/is-object.js +5 -0
- package/dist/utils/is-promise.d.ts +1 -0
- package/dist/utils/is-promise.js +6 -0
- package/dist/utils/is-valid-time-zone.d.ts +1 -0
- package/dist/utils/is-valid-time-zone.js +5 -0
- package/dist/utils/key-code.d.ts +12 -0
- package/dist/utils/key-code.js +11 -0
- package/dist/utils/layer.d.ts +25 -0
- package/dist/utils/layer.js +73 -0
- package/dist/utils/object.d.ts +10 -0
- package/dist/utils/object.js +66 -0
- package/dist/utils/pointer.d.ts +1 -0
- package/dist/utils/pointer.js +5 -0
- package/dist/utils/release-holder.d.ts +9 -0
- package/dist/utils/release-holder.js +18 -0
- package/dist/utils/scroll-lock.d.ts +7 -0
- package/dist/utils/scroll-lock.js +38 -0
- package/dist/utils/shallow-equal-objects.d.ts +5 -0
- package/dist/utils/shallow-equal-objects.js +8 -0
- package/dist/utils/supports.d.ts +18 -0
- package/dist/utils/supports.js +93 -0
- package/dist/utils/tween.d.ts +14 -0
- package/dist/utils/tween.js +16 -0
- package/dist/utils/type.d.ts +2 -0
- package/dist/utils/type.js +0 -0
- package/dist/utils/uuid.d.ts +2 -0
- package/dist/utils/uuid.js +7 -0
- package/dist/utils/warning.d.ts +8 -0
- package/dist/utils/warning.js +14 -0
- package/dist/video-player/animation.scss +7 -0
- package/dist/video-player/constants.d.ts +27 -0
- package/dist/video-player/constants.js +48 -0
- package/dist/video-player/foundation.d.ts +94 -0
- package/dist/video-player/foundation.js +287 -0
- package/dist/video-player/progress-foundation.d.ts +80 -0
- package/dist/video-player/progress-foundation.js +117 -0
- package/dist/video-player/utils.d.ts +24 -0
- package/dist/video-player/utils.js +50 -0
- package/dist/video-player/variables.scss +69 -0
- package/dist/video-player/video-player.css +282 -0
- package/dist/video-player/video-player.scss +344 -0
- package/package.json +53 -3
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
import BaseFoundation from "../base/foundation.js";
|
|
2
|
+
import { strings } from "./constants.js";
|
|
3
|
+
import { calcCheckedKeys, calcDisabledKeys, calcDropActualPosition, calcDropRelativePosition, calcExpandedKeys, calcExpandedKeysForValues, calcMotionKeys, convertDataToEntities, convertJsonToData, filterTreeData, findAncestorKeys, findDescendantKeys, findKeysForValues, flattenTreeData, getDragNodesKeys, getFilterProp, getMotionKeys, getValueOrKey, keepExistingKeys, matchTreeNode, normalizeKeyList, normalizeValue, normalizedArr } from "./tree-util.js";
|
|
4
|
+
import { getDataForKeyNotInKeyEntities, getMultipleSelectResult, isTreeNodeLeaf } from "./shared.js";
|
|
5
|
+
import { isEqual, throttle } from "es-toolkit";
|
|
6
|
+
import { get, pick as pick$1 } from "es-toolkit/compat";
|
|
7
|
+
// src/tree/foundation.ts
|
|
8
|
+
/**
|
|
9
|
+
* The drag and drop handler implementation is referenced from rc-tree
|
|
10
|
+
* https://github.com/react-component/tree
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Every prop `TreeFoundation.deriveState` reads. A host that hands it a snapshot of the props instead of the props
|
|
14
|
+
* object (Solid) picks these keys, so a prop deriveState starts reading goes on this list too.
|
|
15
|
+
*/
|
|
16
|
+
const treeDerivedPropKeys = [
|
|
17
|
+
"autoExpandParent",
|
|
18
|
+
"checkRelation",
|
|
19
|
+
"defaultExpandAll",
|
|
20
|
+
"defaultExpandedKeys",
|
|
21
|
+
"defaultValue",
|
|
22
|
+
"disableStrictly",
|
|
23
|
+
"expandAll",
|
|
24
|
+
"expandedKeys",
|
|
25
|
+
"filterTreeNode",
|
|
26
|
+
"keyMaps",
|
|
27
|
+
"loadData",
|
|
28
|
+
"loadedKeys",
|
|
29
|
+
"motion",
|
|
30
|
+
"multiple",
|
|
31
|
+
"onChangeWithObject",
|
|
32
|
+
"showFilteredOnly",
|
|
33
|
+
"treeData",
|
|
34
|
+
"treeDataSimpleJson",
|
|
35
|
+
"treeNodeFilterProp",
|
|
36
|
+
"value"
|
|
37
|
+
];
|
|
38
|
+
/** Compares key/value/children only: a label that is a ReactNode is a new object on every render */
|
|
39
|
+
function isTreeDataStructureEqual(prevTreeData, nextTreeData, keyMaps) {
|
|
40
|
+
if (prevTreeData === nextTreeData) return true;
|
|
41
|
+
if (!prevTreeData || !nextTreeData) return false;
|
|
42
|
+
const realKeyName = keyMaps?.key ?? "key";
|
|
43
|
+
const realValueName = keyMaps?.value ?? "value";
|
|
44
|
+
const realChildrenName = keyMaps?.children ?? "children";
|
|
45
|
+
const compareNodes = (nodesA, nodesB) => nodesA.length === nodesB.length && nodesA.every((nodeA, i) => {
|
|
46
|
+
const nodeB = nodesB[i];
|
|
47
|
+
return nodeA[realKeyName] === nodeB[realKeyName] && nodeA[realValueName] === nodeB[realValueName] && compareNodes(nodeA[realChildrenName] || [], nodeB[realChildrenName] || []);
|
|
48
|
+
});
|
|
49
|
+
return compareNodes(prevTreeData, nextTreeData);
|
|
50
|
+
}
|
|
51
|
+
var TreeFoundation = class TreeFoundation extends BaseFoundation {
|
|
52
|
+
#dragNode = null;
|
|
53
|
+
#dragEnterTimers = /* @__PURE__ */ new Set();
|
|
54
|
+
#autoExpandTimer;
|
|
55
|
+
#throttledDragOverUpdate;
|
|
56
|
+
constructor(adapter) {
|
|
57
|
+
super({ ...adapter });
|
|
58
|
+
this.#throttledDragOverUpdate = throttle((dropPosition) => {
|
|
59
|
+
this._adapter.updateState({ dropPosition });
|
|
60
|
+
}, 16);
|
|
61
|
+
}
|
|
62
|
+
#isMultiple() {
|
|
63
|
+
return this.getProp("multiple");
|
|
64
|
+
}
|
|
65
|
+
#isAnimated() {
|
|
66
|
+
return this.getProp("motion");
|
|
67
|
+
}
|
|
68
|
+
#isDisabled(treeNode = {}) {
|
|
69
|
+
return this.getProp("disabled") || treeNode.disabled;
|
|
70
|
+
}
|
|
71
|
+
#isExpandControlled() {
|
|
72
|
+
return this.getProp("expandedKeys") !== void 0;
|
|
73
|
+
}
|
|
74
|
+
#isLoadControlled() {
|
|
75
|
+
return this.getProp("loadedKeys") !== void 0;
|
|
76
|
+
}
|
|
77
|
+
#showFilteredOnly() {
|
|
78
|
+
const { inputValue } = this.getStates();
|
|
79
|
+
const { showFilteredOnly } = this.getProps();
|
|
80
|
+
return Boolean(inputValue) && showFilteredOnly;
|
|
81
|
+
}
|
|
82
|
+
#notifyJsonChange(key) {
|
|
83
|
+
const data = this.getProp("treeDataSimpleJson");
|
|
84
|
+
const selectedPath = normalizedArr(key).map((i) => i.split(strings.JSON_KEY_SPLIT));
|
|
85
|
+
const value = pick$1(data, selectedPath);
|
|
86
|
+
this._adapter.notifyChange(value);
|
|
87
|
+
}
|
|
88
|
+
#notifyMultipleChange(key) {
|
|
89
|
+
const { keyEntities } = this.getStates();
|
|
90
|
+
const props = this.getProps();
|
|
91
|
+
const { leafOnly, checkRelation, keyMaps, autoMergeValue } = props;
|
|
92
|
+
let value;
|
|
93
|
+
let keyList = [];
|
|
94
|
+
if (checkRelation === "related") keyList = autoMergeValue || leafOnly ? normalizeKeyList(key, keyEntities, leafOnly, true) : key;
|
|
95
|
+
else if (checkRelation === "unRelated") keyList = key;
|
|
96
|
+
const nodes = keyList.map((key) => keyEntities[key] ? keyEntities[key].data : getDataForKeyNotInKeyEntities(key, props));
|
|
97
|
+
if (this.getProp("onChangeWithObject")) value = nodes;
|
|
98
|
+
else value = getValueOrKey(nodes, keyMaps);
|
|
99
|
+
this._adapter.notifyChange(value);
|
|
100
|
+
}
|
|
101
|
+
#notifyChange(key) {
|
|
102
|
+
const isMultiple = this.#isMultiple();
|
|
103
|
+
const { keyMaps } = this.getProps();
|
|
104
|
+
const { keyEntities } = this.getStates();
|
|
105
|
+
if (this.getProp("treeDataSimpleJson")) this.#notifyJsonChange(key);
|
|
106
|
+
else if (isMultiple) this.#notifyMultipleChange(key);
|
|
107
|
+
else {
|
|
108
|
+
let value;
|
|
109
|
+
if (this.getProp("onChangeWithObject")) value = get(keyEntities, key).data;
|
|
110
|
+
else {
|
|
111
|
+
const { data } = get(keyEntities, key);
|
|
112
|
+
value = getValueOrKey(data, keyMaps);
|
|
113
|
+
}
|
|
114
|
+
this._adapter.notifyChange(value);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
#handleSingleSelect(_e, { selected, eventKey, data }) {
|
|
118
|
+
let selectedKeys = [...this.getState("selectedKeys")];
|
|
119
|
+
const targetSelected = !selected;
|
|
120
|
+
this._adapter.notifySelect(eventKey, true, data);
|
|
121
|
+
if (!targetSelected) return;
|
|
122
|
+
if (!selectedKeys.includes(eventKey)) {
|
|
123
|
+
selectedKeys = [eventKey];
|
|
124
|
+
this.#notifyChange(eventKey);
|
|
125
|
+
if (!this._isControlledComponent()) this._adapter.updateState({ selectedKeys });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
#handleMultipleSelect(_e, treeNode) {
|
|
129
|
+
const result = getMultipleSelectResult(treeNode, this.getProps(), this.getStates());
|
|
130
|
+
if (!result) return;
|
|
131
|
+
this._adapter.notifySelect(treeNode.eventKey, result.targetStatus, treeNode.data);
|
|
132
|
+
this.#notifyChange(result.keys);
|
|
133
|
+
if (!this._isControlledComponent()) this._adapter.updateState(result.state);
|
|
134
|
+
}
|
|
135
|
+
#setExpandedStatus({ eventKey, expanded, data }) {
|
|
136
|
+
const { inputValue, treeData, filteredShownKeys, keyEntities } = this.getStates();
|
|
137
|
+
const { keyMaps } = this.getProps();
|
|
138
|
+
const isSearching = Boolean(inputValue);
|
|
139
|
+
const showFilteredOnly = this.#showFilteredOnly();
|
|
140
|
+
const expandedStateKey = isSearching ? "filteredExpandedKeys" : "expandedKeys";
|
|
141
|
+
const expandedKeys = new Set(this.getState(expandedStateKey));
|
|
142
|
+
let motionType = "show";
|
|
143
|
+
if (!expanded) expandedKeys.add(eventKey);
|
|
144
|
+
else if (expandedKeys.has(eventKey)) {
|
|
145
|
+
expandedKeys.delete(eventKey);
|
|
146
|
+
motionType = "hide";
|
|
147
|
+
}
|
|
148
|
+
this._adapter.setCachedFlattenNodes(motionType === "hide" && this.#isAnimated() ? this.getState("flattenNodes") : void 0);
|
|
149
|
+
if (!this.#isExpandControlled()) {
|
|
150
|
+
const flattenNodes = flattenTreeData(treeData, expandedKeys, keyMaps, isSearching && showFilteredOnly && filteredShownKeys);
|
|
151
|
+
let motionKeys = this.#isAnimated() ? getMotionKeys(eventKey, expandedKeys, keyEntities) : [];
|
|
152
|
+
if (isSearching && showFilteredOnly) motionKeys = motionKeys.filter((key) => filteredShownKeys.has(key));
|
|
153
|
+
const newState = {
|
|
154
|
+
[expandedStateKey]: expandedKeys,
|
|
155
|
+
flattenNodes,
|
|
156
|
+
motionKeys: new Set(motionKeys),
|
|
157
|
+
motionType
|
|
158
|
+
};
|
|
159
|
+
this._adapter.updateState(newState);
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
expandedKeys,
|
|
163
|
+
expanded: !expanded,
|
|
164
|
+
data
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
#dragProps(event, node) {
|
|
168
|
+
return {
|
|
169
|
+
event,
|
|
170
|
+
node: this.getDragEventNodeData(node)
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
#clearDragEnterTimers() {
|
|
174
|
+
this.#dragEnterTimers.forEach((timer) => clearTimeout(timer));
|
|
175
|
+
this.#dragEnterTimers.clear();
|
|
176
|
+
clearTimeout(this.#autoExpandTimer);
|
|
177
|
+
this.#autoExpandTimer = void 0;
|
|
178
|
+
}
|
|
179
|
+
#clearDragState() {
|
|
180
|
+
this.#clearDragEnterTimers();
|
|
181
|
+
this._adapter.updateState({
|
|
182
|
+
dragOverNodeKey: "",
|
|
183
|
+
dragging: false
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
getDragEventNodeData(node) {
|
|
187
|
+
return {
|
|
188
|
+
...node.data,
|
|
189
|
+
...pick$1(node, [
|
|
190
|
+
"expanded",
|
|
191
|
+
"pos",
|
|
192
|
+
"children"
|
|
193
|
+
])
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* The state that props imply, given the previous state (modeled on rc-tree's getDerivedStateFromProps,
|
|
198
|
+
* https://github.com/react-component/tree). `prevState.prevProps` holds the props of the last derivation.
|
|
199
|
+
* Returns null when nothing changed, so a host that writes the result back settles.
|
|
200
|
+
*/
|
|
201
|
+
static deriveState(props, prevState) {
|
|
202
|
+
const { prevProps } = prevState;
|
|
203
|
+
const { keyMaps } = props;
|
|
204
|
+
let treeData;
|
|
205
|
+
let keyEntities = prevState.keyEntities || {};
|
|
206
|
+
let valueEntities = prevState.cachedKeyValuePairs || {};
|
|
207
|
+
const isSearching = Boolean(props.filterTreeNode && prevState.inputValue && prevState.inputValue.length);
|
|
208
|
+
const newState = {};
|
|
209
|
+
const isExpandControlled = props.expandedKeys !== void 0;
|
|
210
|
+
const needUpdate = (name) => prevProps ? !isEqual(prevProps[name], props[name]) : props[name] !== void 0;
|
|
211
|
+
const needUpdateSimpleJson = needUpdate("treeDataSimpleJson");
|
|
212
|
+
const treeDataRefUpdated = prevProps ? prevProps.treeData !== props.treeData : props.treeData !== void 0;
|
|
213
|
+
const treeDataStructureUpdated = prevProps ? !isTreeDataStructureEqual(prevProps.treeData, props.treeData, keyMaps) : props.treeData !== void 0;
|
|
214
|
+
if (treeDataRefUpdated || needUpdateSimpleJson) {
|
|
215
|
+
treeData = treeDataRefUpdated ? props.treeData : convertJsonToData(props.treeDataSimpleJson);
|
|
216
|
+
newState.treeData = treeData;
|
|
217
|
+
const entitiesMap = convertDataToEntities(treeData, keyMaps);
|
|
218
|
+
newState.keyEntities = { ...entitiesMap.keyEntities };
|
|
219
|
+
keyEntities = newState.keyEntities;
|
|
220
|
+
newState.cachedKeyValuePairs = { ...entitiesMap.valueEntities };
|
|
221
|
+
valueEntities = newState.cachedKeyValuePairs;
|
|
222
|
+
}
|
|
223
|
+
const dataUpdated = needUpdateSimpleJson || treeDataStructureUpdated;
|
|
224
|
+
if (dataUpdated && props.motion && prevProps) {
|
|
225
|
+
newState.motionKeys = /* @__PURE__ */ new Set([]);
|
|
226
|
+
newState.motionType = null;
|
|
227
|
+
}
|
|
228
|
+
const expandAllWhenDataChange = dataUpdated && props.expandAll;
|
|
229
|
+
if (!isSearching) {
|
|
230
|
+
if (needUpdate("expandedKeys") || prevProps && needUpdate("autoExpandParent")) {
|
|
231
|
+
newState.expandedKeys = calcExpandedKeys(props.expandedKeys, keyEntities, props.autoExpandParent || !prevProps);
|
|
232
|
+
if (prevProps && props.motion && !treeData) {
|
|
233
|
+
const { motionKeys, motionType } = calcMotionKeys(prevState.expandedKeys, newState.expandedKeys, keyEntities);
|
|
234
|
+
newState.motionKeys = new Set(motionKeys);
|
|
235
|
+
newState.motionType = motionType;
|
|
236
|
+
if (motionType === "hide") newState.cachedFlattenNodes = prevState.flattenNodes;
|
|
237
|
+
}
|
|
238
|
+
} else if (!prevProps && (props.defaultExpandAll || props.expandAll) || expandAllWhenDataChange) newState.expandedKeys = new Set(Object.keys(keyEntities));
|
|
239
|
+
else if (!prevProps && props.defaultExpandedKeys) newState.expandedKeys = calcExpandedKeys(props.defaultExpandedKeys, keyEntities);
|
|
240
|
+
else if (!prevProps && props.defaultValue !== void 0) newState.expandedKeys = calcExpandedKeysForValues(props.defaultValue, keyEntities, props.multiple, valueEntities);
|
|
241
|
+
else if (!prevProps && props.value !== void 0) newState.expandedKeys = calcExpandedKeysForValues(props.value, keyEntities, props.multiple, valueEntities);
|
|
242
|
+
else if (!isExpandControlled && dataUpdated && props.value !== void 0) {
|
|
243
|
+
if (!(prevState.treeData && prevState.treeData?.length > 0 && props.loadData)) newState.expandedKeys = calcExpandedKeysForValues(props.value, keyEntities, props.multiple, valueEntities);
|
|
244
|
+
}
|
|
245
|
+
if (treeData || newState.expandedKeys) newState.flattenNodes = flattenTreeData(treeData || prevState.treeData, newState.expandedKeys || prevState.expandedKeys, keyMaps);
|
|
246
|
+
} else {
|
|
247
|
+
if (treeData) {
|
|
248
|
+
const filteredState = filterTreeData({
|
|
249
|
+
treeData,
|
|
250
|
+
inputValue: prevState.inputValue,
|
|
251
|
+
filterTreeNode: props.filterTreeNode,
|
|
252
|
+
filterProps: getFilterProp(props.treeNodeFilterProp, keyMaps),
|
|
253
|
+
showFilteredOnly: props.showFilteredOnly,
|
|
254
|
+
keyEntities: newState.keyEntities,
|
|
255
|
+
prevExpandedKeys: [...prevState.filteredExpandedKeys],
|
|
256
|
+
prevFilteredKeys: dataUpdated ? void 0 : prevState.filteredKeys,
|
|
257
|
+
keyMaps
|
|
258
|
+
});
|
|
259
|
+
newState.flattenNodes = filteredState.flattenNodes;
|
|
260
|
+
newState.motionKeys = /* @__PURE__ */ new Set([]);
|
|
261
|
+
newState.filteredKeys = filteredState.filteredKeys;
|
|
262
|
+
newState.filteredShownKeys = filteredState.filteredShownKeys;
|
|
263
|
+
newState.filteredExpandedKeys = filteredState.filteredExpandedKeys;
|
|
264
|
+
}
|
|
265
|
+
if (props.expandedKeys) {
|
|
266
|
+
const filteredExpandedKeys = calcExpandedKeys(props.expandedKeys, keyEntities, props.autoExpandParent || !prevProps);
|
|
267
|
+
if (!(prevProps && !treeData && prevProps.showFilteredOnly === props.showFilteredOnly && filteredExpandedKeys.size === prevState.filteredExpandedKeys.size && [...filteredExpandedKeys].every((key) => prevState.filteredExpandedKeys.has(key)))) {
|
|
268
|
+
newState.filteredExpandedKeys = filteredExpandedKeys;
|
|
269
|
+
if (prevProps && props.motion && !treeData) {
|
|
270
|
+
const motionResult = calcMotionKeys(prevState.filteredExpandedKeys, filteredExpandedKeys, keyEntities);
|
|
271
|
+
let { motionKeys } = motionResult;
|
|
272
|
+
const { motionType } = motionResult;
|
|
273
|
+
if (props.showFilteredOnly) motionKeys = motionKeys.filter((key) => prevState.filteredShownKeys.has(key));
|
|
274
|
+
if (motionType === "hide") newState.cachedFlattenNodes = prevState.flattenNodes;
|
|
275
|
+
newState.motionKeys = new Set(motionKeys);
|
|
276
|
+
newState.motionType = motionType;
|
|
277
|
+
}
|
|
278
|
+
newState.flattenNodes = flattenTreeData(treeData || prevState.treeData, filteredExpandedKeys, keyMaps, props.showFilteredOnly && (newState.filteredShownKeys ?? prevState.filteredShownKeys));
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
const withObject = props.onChangeWithObject;
|
|
283
|
+
const isMultiple = props.multiple;
|
|
284
|
+
if (!isMultiple) {
|
|
285
|
+
if (needUpdate("value")) newState.selectedKeys = findKeysForValues(normalizeValue(props.value, withObject, keyMaps), valueEntities, isMultiple);
|
|
286
|
+
else if (!prevProps && props.defaultValue !== void 0) newState.selectedKeys = findKeysForValues(normalizeValue(props.defaultValue, withObject, keyMaps), valueEntities, isMultiple);
|
|
287
|
+
else if (treeData && props.value !== void 0) newState.selectedKeys = findKeysForValues(normalizeValue(props.value, withObject, keyMaps), valueEntities, isMultiple);
|
|
288
|
+
} else {
|
|
289
|
+
let checkedKeyValues;
|
|
290
|
+
if (needUpdate("value")) checkedKeyValues = findKeysForValues(normalizeValue(props.value, withObject, keyMaps), valueEntities, isMultiple);
|
|
291
|
+
else if (!prevProps && props.defaultValue !== void 0) checkedKeyValues = findKeysForValues(normalizeValue(props.defaultValue, withObject, keyMaps), valueEntities, isMultiple);
|
|
292
|
+
else if (treeData) checkedKeyValues = props.value !== void 0 ? findKeysForValues(normalizeValue(props.value, withObject, keyMaps), valueEntities, isMultiple) : keepExistingKeys(props.checkRelation === "related" ? prevState.checkedKeys : prevState.realCheckedKeys, keyEntities);
|
|
293
|
+
if (checkedKeyValues) {
|
|
294
|
+
if (props.checkRelation === "unRelated") newState.realCheckedKeys = new Set(checkedKeyValues);
|
|
295
|
+
else if (props.checkRelation === "related") {
|
|
296
|
+
const { checkedKeys, halfCheckedKeys } = calcCheckedKeys(checkedKeyValues, keyEntities);
|
|
297
|
+
newState.checkedKeys = checkedKeys;
|
|
298
|
+
newState.halfCheckedKeys = halfCheckedKeys;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (needUpdate("loadedKeys")) newState.loadedKeys = new Set(props.loadedKeys);
|
|
303
|
+
if (treeData && props.disableStrictly && props.checkRelation === "related") newState.disabledKeys = calcDisabledKeys(keyEntities, keyMaps);
|
|
304
|
+
const comparedPropChanged = [
|
|
305
|
+
"expandedKeys",
|
|
306
|
+
"autoExpandParent",
|
|
307
|
+
"value",
|
|
308
|
+
"showFilteredOnly"
|
|
309
|
+
].some(needUpdate);
|
|
310
|
+
if (prevProps && Object.keys(newState).length === 0 && !comparedPropChanged) return null;
|
|
311
|
+
newState.prevProps = { ...props };
|
|
312
|
+
return newState;
|
|
313
|
+
}
|
|
314
|
+
/** The state of a new tree: the empty state with what the props imply */
|
|
315
|
+
static getInitialState(props) {
|
|
316
|
+
const state = {
|
|
317
|
+
inputValue: "",
|
|
318
|
+
keyEntities: {},
|
|
319
|
+
treeData: [],
|
|
320
|
+
flattenNodes: [],
|
|
321
|
+
selectedKeys: [],
|
|
322
|
+
checkedKeys: /* @__PURE__ */ new Set(),
|
|
323
|
+
halfCheckedKeys: /* @__PURE__ */ new Set(),
|
|
324
|
+
realCheckedKeys: /* @__PURE__ */ new Set(),
|
|
325
|
+
motionKeys: /* @__PURE__ */ new Set(),
|
|
326
|
+
motionType: "hide",
|
|
327
|
+
expandedKeys: new Set(props.expandedKeys),
|
|
328
|
+
filteredKeys: /* @__PURE__ */ new Set(),
|
|
329
|
+
filteredExpandedKeys: /* @__PURE__ */ new Set(),
|
|
330
|
+
filteredShownKeys: /* @__PURE__ */ new Set(),
|
|
331
|
+
prevProps: null,
|
|
332
|
+
loadedKeys: /* @__PURE__ */ new Set(),
|
|
333
|
+
loadingKeys: /* @__PURE__ */ new Set(),
|
|
334
|
+
cachedFlattenNodes: void 0,
|
|
335
|
+
cachedKeyValuePairs: {},
|
|
336
|
+
disabledKeys: /* @__PURE__ */ new Set(),
|
|
337
|
+
dragging: false,
|
|
338
|
+
dragNodesKeys: /* @__PURE__ */ new Set(),
|
|
339
|
+
dragOverNodeKey: null,
|
|
340
|
+
dropPosition: null
|
|
341
|
+
};
|
|
342
|
+
return {
|
|
343
|
+
...state,
|
|
344
|
+
...TreeFoundation.deriveState(props, state)
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
destroy() {
|
|
348
|
+
super.destroy();
|
|
349
|
+
if (this.#throttledDragOverUpdate) this.#throttledDragOverUpdate.cancel();
|
|
350
|
+
this.#clearDragEnterTimers();
|
|
351
|
+
}
|
|
352
|
+
/** Writes the state derived from new props back, so handlers read what was rendered */
|
|
353
|
+
syncDerivedState(derived) {
|
|
354
|
+
this._adapter.updateState(derived);
|
|
355
|
+
}
|
|
356
|
+
scrollTo({ key, align = "center" }) {
|
|
357
|
+
if (key && this.getState("flattenNodes")?.some((node) => node.key === key)) this._adapter.scrollToNode(key, align);
|
|
358
|
+
}
|
|
359
|
+
handleInputChange(sugInput) {
|
|
360
|
+
this._adapter.updateInputValue(sugInput);
|
|
361
|
+
const { selectedKeys, keyEntities, treeData } = this.getStates();
|
|
362
|
+
const expandedKeys = new Set(this.getState("expandedKeys"));
|
|
363
|
+
const { showFilteredOnly, filterTreeNode, treeNodeFilterProp, keyMaps } = this.getProps();
|
|
364
|
+
const realFilterProp = getFilterProp(treeNodeFilterProp, keyMaps);
|
|
365
|
+
let filteredOptsKeys = [];
|
|
366
|
+
let expandedOptsKeys = [];
|
|
367
|
+
let flattenNodes = [];
|
|
368
|
+
let filteredShownKeys = /* @__PURE__ */ new Set([]);
|
|
369
|
+
if (!sugInput) {
|
|
370
|
+
if (!this.#isExpandControlled()) {
|
|
371
|
+
expandedOptsKeys = findAncestorKeys(selectedKeys, keyEntities, false);
|
|
372
|
+
expandedOptsKeys.forEach((item) => expandedKeys.add(item));
|
|
373
|
+
}
|
|
374
|
+
flattenNodes = flattenTreeData(treeData, expandedKeys, keyMaps);
|
|
375
|
+
} else {
|
|
376
|
+
filteredOptsKeys = Object.values(keyEntities).filter((item) => matchTreeNode(sugInput, item.data, filterTreeNode, realFilterProp)).map((item) => item.key);
|
|
377
|
+
expandedOptsKeys = findAncestorKeys(filteredOptsKeys, keyEntities, false);
|
|
378
|
+
const shownChildKeys = findDescendantKeys(filteredOptsKeys, keyEntities, true);
|
|
379
|
+
filteredShownKeys = /* @__PURE__ */ new Set([...shownChildKeys, ...expandedOptsKeys]);
|
|
380
|
+
flattenNodes = flattenTreeData(treeData, new Set(expandedOptsKeys), keyMaps, showFilteredOnly && filteredShownKeys);
|
|
381
|
+
}
|
|
382
|
+
const newFilteredExpandedKeys = new Set(expandedOptsKeys);
|
|
383
|
+
this._adapter.notifySearch(sugInput, Array.from(newFilteredExpandedKeys));
|
|
384
|
+
this._adapter.updateState({
|
|
385
|
+
expandedKeys,
|
|
386
|
+
flattenNodes,
|
|
387
|
+
motionKeys: /* @__PURE__ */ new Set([]),
|
|
388
|
+
filteredKeys: new Set(filteredOptsKeys),
|
|
389
|
+
filteredExpandedKeys: newFilteredExpandedKeys,
|
|
390
|
+
filteredShownKeys
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
handleNodeSelect(e, treeNode) {
|
|
394
|
+
if (this.#isDisabled(treeNode)) return;
|
|
395
|
+
if (!this.#isMultiple()) this.#handleSingleSelect(e, treeNode);
|
|
396
|
+
else this.#handleMultipleSelect(e, treeNode);
|
|
397
|
+
}
|
|
398
|
+
handleNodeRightClick(e, treeNode) {
|
|
399
|
+
this._adapter.notifyRightClick(e, treeNode.data);
|
|
400
|
+
}
|
|
401
|
+
handleNodeDoubleClick(e, treeNode) {
|
|
402
|
+
this._adapter.notifyDoubleClick(e, treeNode.data);
|
|
403
|
+
}
|
|
404
|
+
handleNodeExpand(_e, treeNode) {
|
|
405
|
+
const { loadData } = this.getProps();
|
|
406
|
+
if (!loadData && (!treeNode.children || !treeNode.children.length)) return;
|
|
407
|
+
if (isTreeNodeLeaf(treeNode, loadData)) return;
|
|
408
|
+
const { expandedKeys, data, expanded } = this.#setExpandedStatus(treeNode);
|
|
409
|
+
this._adapter.notifyExpand(expandedKeys, {
|
|
410
|
+
expanded,
|
|
411
|
+
node: data
|
|
412
|
+
});
|
|
413
|
+
if (expanded && loadData) this.handleNodeLoad(treeNode.eventKey, data);
|
|
414
|
+
}
|
|
415
|
+
/** Loads a node's children once; `key` is the node's entity key, which keyMaps may take from another field */
|
|
416
|
+
handleNodeLoad(key, data) {
|
|
417
|
+
const { loadData } = this.getProps();
|
|
418
|
+
const { loadedKeys = /* @__PURE__ */ new Set(), loadingKeys = /* @__PURE__ */ new Set() } = this.getStates();
|
|
419
|
+
if (!loadData || loadedKeys.has(key) || loadingKeys.has(key)) return;
|
|
420
|
+
loadData(data).then(() => {
|
|
421
|
+
const prevLoadedKeys = new Set(this.getState("loadedKeys"));
|
|
422
|
+
const prevLoadingKeys = new Set(this.getState("loadingKeys"));
|
|
423
|
+
const newLoadedKeys = prevLoadedKeys.add(key);
|
|
424
|
+
const newLoadingKeys = new Set(prevLoadingKeys);
|
|
425
|
+
newLoadingKeys.delete(key);
|
|
426
|
+
this._adapter.notifyLoad(newLoadedKeys, data);
|
|
427
|
+
if (!this.#isLoadControlled()) this._adapter.updateState({ loadedKeys: newLoadedKeys });
|
|
428
|
+
this._adapter.updateState({ loadingKeys: newLoadingKeys });
|
|
429
|
+
}).finally(() => {
|
|
430
|
+
const currentLoadingKeys = this.getState("loadingKeys");
|
|
431
|
+
if (currentLoadingKeys.has(key)) {
|
|
432
|
+
const newLoadingKeys = new Set(currentLoadingKeys);
|
|
433
|
+
newLoadingKeys.delete(key);
|
|
434
|
+
this._adapter.updateState({ loadingKeys: newLoadingKeys });
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
this._adapter.updateState({ loadingKeys: new Set(loadingKeys).add(key) });
|
|
438
|
+
}
|
|
439
|
+
handleNodeDragStart(e, treeNode) {
|
|
440
|
+
const { keyEntities } = this.getStates();
|
|
441
|
+
const { hideDraggingNode, renderDraggingNode } = this.getProps();
|
|
442
|
+
const { eventKey, nodeInstance, data } = treeNode;
|
|
443
|
+
if (hideDraggingNode || renderDraggingNode) {
|
|
444
|
+
let dragImg;
|
|
445
|
+
if (typeof renderDraggingNode === "function") dragImg = renderDraggingNode(nodeInstance, data);
|
|
446
|
+
else if (hideDraggingNode) {
|
|
447
|
+
dragImg = nodeInstance.cloneNode(true);
|
|
448
|
+
dragImg.style.opacity = 0;
|
|
449
|
+
}
|
|
450
|
+
document.body.appendChild(dragImg);
|
|
451
|
+
e.dataTransfer.setDragImage(dragImg, 0, 0);
|
|
452
|
+
setTimeout(() => dragImg.remove());
|
|
453
|
+
}
|
|
454
|
+
this.#dragNode = treeNode;
|
|
455
|
+
this._adapter.updateState({
|
|
456
|
+
dragging: true,
|
|
457
|
+
dragNodesKeys: new Set(getDragNodesKeys(eventKey, keyEntities))
|
|
458
|
+
});
|
|
459
|
+
this._adapter.notifyDragStart(this.#dragProps(e, treeNode));
|
|
460
|
+
}
|
|
461
|
+
handleNodeDragEnter(e, treeNode) {
|
|
462
|
+
const { dragNodesKeys } = this.getStates();
|
|
463
|
+
const { autoExpandWhenDragEnter } = this.getProps();
|
|
464
|
+
const { eventKey, expanded } = treeNode;
|
|
465
|
+
const dragNode = this.#dragNode;
|
|
466
|
+
if (!dragNode || dragNodesKeys.has(eventKey)) return;
|
|
467
|
+
const dropPosition = calcDropRelativePosition(e, treeNode);
|
|
468
|
+
if (dragNode.eventKey === eventKey && dropPosition === 0) {
|
|
469
|
+
this._adapter.updateState({
|
|
470
|
+
dragOverNodeKey: "",
|
|
471
|
+
dropPosition: null
|
|
472
|
+
});
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
const timer = setTimeout(() => {
|
|
476
|
+
this.#dragEnterTimers.delete(timer);
|
|
477
|
+
this._adapter.updateState({
|
|
478
|
+
dragOverNodeKey: eventKey,
|
|
479
|
+
dropPosition
|
|
480
|
+
});
|
|
481
|
+
if (!autoExpandWhenDragEnter || expanded) {
|
|
482
|
+
this._adapter.notifyDragEnter(this.#dragProps(e, treeNode));
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
485
|
+
clearTimeout(this.#autoExpandTimer);
|
|
486
|
+
this.#autoExpandTimer = setTimeout(() => {
|
|
487
|
+
const { expandedKeys: newExpandedKeys } = this.#setExpandedStatus(treeNode);
|
|
488
|
+
this._adapter.notifyDragEnter({
|
|
489
|
+
...this.#dragProps(e, treeNode),
|
|
490
|
+
expandedKeys: [...newExpandedKeys]
|
|
491
|
+
});
|
|
492
|
+
}, 400);
|
|
493
|
+
}, 0);
|
|
494
|
+
this.#dragEnterTimers.add(timer);
|
|
495
|
+
}
|
|
496
|
+
handleNodeDragOver(e, treeNode) {
|
|
497
|
+
const { dropPosition, dragNodesKeys, dragOverNodeKey } = this.getStates();
|
|
498
|
+
const { eventKey } = treeNode;
|
|
499
|
+
if (dragNodesKeys.has(eventKey)) return;
|
|
500
|
+
if (this.#dragNode && eventKey === dragOverNodeKey) {
|
|
501
|
+
const newPos = calcDropRelativePosition(e, treeNode);
|
|
502
|
+
if (dropPosition === newPos) return;
|
|
503
|
+
this.#throttledDragOverUpdate(newPos);
|
|
504
|
+
}
|
|
505
|
+
this._adapter.notifyDragOver(this.#dragProps(e, treeNode));
|
|
506
|
+
}
|
|
507
|
+
handleNodeDragLeave(e, treeNode) {
|
|
508
|
+
this.#throttledDragOverUpdate.cancel();
|
|
509
|
+
clearTimeout(this.#autoExpandTimer);
|
|
510
|
+
this._adapter.updateState({ dragOverNodeKey: "" });
|
|
511
|
+
this._adapter.notifyDragLeave(this.#dragProps(e, treeNode));
|
|
512
|
+
}
|
|
513
|
+
handleNodeDragEnd(e, treeNode) {
|
|
514
|
+
this.#throttledDragOverUpdate.flush();
|
|
515
|
+
this.#clearDragState();
|
|
516
|
+
this._adapter.notifyDragEnd(this.#dragProps(e, treeNode));
|
|
517
|
+
this.#dragNode = null;
|
|
518
|
+
}
|
|
519
|
+
handleNodeDrop(e, treeNode) {
|
|
520
|
+
this.#throttledDragOverUpdate.flush();
|
|
521
|
+
const { dropPosition, dragNodesKeys } = this.getStates();
|
|
522
|
+
const { eventKey, pos } = treeNode;
|
|
523
|
+
const dragNode = this.#dragNode;
|
|
524
|
+
this.#clearDragState();
|
|
525
|
+
if (!dragNode || dragNodesKeys.has(eventKey)) return;
|
|
526
|
+
const dropRes = {
|
|
527
|
+
dragNode: this.getDragEventNodeData(dragNode),
|
|
528
|
+
dragNodesKeys: [...dragNodesKeys],
|
|
529
|
+
dropPosition: calcDropActualPosition(pos, dropPosition),
|
|
530
|
+
dropToGap: dropPosition !== 0
|
|
531
|
+
};
|
|
532
|
+
this._adapter.notifyDrop({
|
|
533
|
+
...this.#dragProps(e, treeNode),
|
|
534
|
+
...dropRes
|
|
535
|
+
});
|
|
536
|
+
this.#dragNode = null;
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
export { TreeFoundation as default, treeDerivedPropKeys };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use 'semi:theme' as *;
|
|
2
|
+
@use 'variables' as *;
|
|
3
|
+
@use 'animation' as *;
|
|
4
|
+
|
|
5
|
+
$module: #{$prefix}-tree;
|
|
6
|
+
|
|
7
|
+
.#{$module}:dir(rtl),
|
|
8
|
+
.#{$module}-wrapper:dir(rtl),
|
|
9
|
+
.#{$module}-option-list:dir(rtl),
|
|
10
|
+
.#{$module}-option-list-block:dir(rtl) {
|
|
11
|
+
direction: rtl;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.#{$module}-option-list:dir(rtl) .#{$module}-option-collapsed .#{$module}-option-expand-icon {
|
|
15
|
+
transform: rotate(90deg);
|
|
16
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { BasicFlattenNode, BasicTreeInnerData, BasicTreeNodeProps, BasicTreeProps, TreeMotionType } from "./foundation.js";
|
|
2
|
+
import { Typeahead } from "../utils/a11y.js";
|
|
3
|
+
type CheckState = Pick<BasicTreeInnerData, 'keyEntities' | 'checkedKeys' | 'halfCheckedKeys' | 'disabledKeys'>;
|
|
4
|
+
/** The props a tree node renders with */
|
|
5
|
+
export declare function getTreeNodeProps(key: string, { expandedKeys, selectedKeys, checkedKeys, halfCheckedKeys, realCheckedKeys, keyEntities, filteredKeys, inputValue, loadedKeys, loadingKeys, filteredExpandedKeys, filteredShownKeys, disabledKeys, treeData }: Partial<Omit<BasicTreeInnerData, 'prevProps'>>, props: Pick<BasicTreeProps, 'checkRelation' | 'disableStrictly' | 'showFilteredOnly'>): BasicTreeNodeProps | null;
|
|
6
|
+
/** Whether a node renders as a leaf, with no expand arrow; with loadData a node is a branch until it loads empty */
|
|
7
|
+
export declare function isTreeNodeLeaf({ isLeaf, children, loaded }: Pick<BasicTreeNodeProps, 'isLeaf' | 'children' | 'loaded'>, loadData: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The props a row renders with, also what the foundation's handlers read: the node's data, then the flattened fields
|
|
10
|
+
* (which follow keyMaps), then its state from the foundation, which wins over data fields of the same name
|
|
11
|
+
* (expanded, checked, level...). Null when the key is not in the tree.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildRowProps(node: BasicFlattenNode, state: Partial<Omit<BasicTreeInnerData, 'prevProps'>>, props: Pick<BasicTreeProps, 'checkRelation' | 'disableStrictly' | 'showFilteredOnly' | 'keyMaps'>): BasicTreeNodeProps | null;
|
|
14
|
+
/** Row ids are IDREFs for aria-activedescendant, so a key with spaces is encoded */
|
|
15
|
+
export declare function nodeId(baseId: string, key: string): string;
|
|
16
|
+
export interface TreeRowAria {
|
|
17
|
+
'aria-busy'?: true;
|
|
18
|
+
'aria-checked'?: boolean | 'mixed';
|
|
19
|
+
'aria-disabled': boolean;
|
|
20
|
+
'aria-expanded'?: boolean;
|
|
21
|
+
'aria-level': number;
|
|
22
|
+
'aria-posinset': number;
|
|
23
|
+
'aria-selected'?: boolean;
|
|
24
|
+
'aria-setsize': number;
|
|
25
|
+
}
|
|
26
|
+
/** The treeitem attributes of a row: a multiple tree states each row's check, a single one its selection */
|
|
27
|
+
export declare function getTreeRowAria(row: BasicTreeNodeProps, { disabled, isLeaf, multiple }: {
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
isLeaf: boolean;
|
|
30
|
+
multiple?: boolean;
|
|
31
|
+
}): TreeRowAria;
|
|
32
|
+
/** What a row's classes depend on besides its own state; `fullLabel` is whether a custom full label renders it */
|
|
33
|
+
export interface TreeRowFlags {
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
focused?: boolean;
|
|
36
|
+
draggable?: boolean;
|
|
37
|
+
labelEllipsis?: boolean;
|
|
38
|
+
fullLabel?: boolean;
|
|
39
|
+
dragOverNodeKey?: string | null;
|
|
40
|
+
dropPosition?: number | null;
|
|
41
|
+
}
|
|
42
|
+
/** The classes of a row element, also what a custom full label gets to put on its own */
|
|
43
|
+
export declare function getTreeRowClassMap(row: BasicTreeNodeProps, flags: TreeRowFlags): Record<string, boolean | undefined>;
|
|
44
|
+
/** The classes of the label of a row that the tree renders itself */
|
|
45
|
+
export declare function getTreeLabelClassMap(row: BasicTreeNodeProps, flags: TreeRowFlags): Record<string, boolean>;
|
|
46
|
+
export declare function sameKeys(a: {
|
|
47
|
+
key?: string;
|
|
48
|
+
}[], b: {
|
|
49
|
+
key?: string;
|
|
50
|
+
}[]): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The rows, with the ones that appear or disappear (motionKeys) in one array at the place of the first, for the
|
|
53
|
+
* animated group; the array is there even when empty
|
|
54
|
+
*/
|
|
55
|
+
export declare function getTransitionNodes<T extends {
|
|
56
|
+
key?: string;
|
|
57
|
+
}>(nodes: T[], motionKeys: Set<string>, motionType: TreeMotionType | null | undefined, flattenList?: T[]): (T | T[])[];
|
|
58
|
+
export type TreeKeyAction = {
|
|
59
|
+
type: 'move';
|
|
60
|
+
index: number;
|
|
61
|
+
} | {
|
|
62
|
+
type: 'expand';
|
|
63
|
+
} | {
|
|
64
|
+
type: 'collapse';
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* What a key does to the active row of a tree (APG tree view): Up and Down move between the visible rows, Home and
|
|
68
|
+
* End go to the first and the last; Right opens a closed branch or moves into an open one, Left closes an open
|
|
69
|
+
* branch or moves to the parent (Right and Left swap in RTL). Disabled rows stay reachable, because a disabled
|
|
70
|
+
* branch can still be expanded. Returns null for other keys and when there is nowhere to go.
|
|
71
|
+
*/
|
|
72
|
+
export declare function getTreeKeyAction<T extends BasicFlattenNode>(key: string, index: number, rows: T[], { isExpanded, isLeaf, rtl }: {
|
|
73
|
+
isExpanded: (row: T) => boolean;
|
|
74
|
+
isLeaf: (row: T) => boolean;
|
|
75
|
+
rtl: boolean;
|
|
76
|
+
}): TreeKeyAction | null;
|
|
77
|
+
export type TreeKeyboardAction = TreeKeyAction | {
|
|
78
|
+
type: 'select';
|
|
79
|
+
} | {
|
|
80
|
+
type: 'none';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* What a key event does in a tree, or null when the tree does not handle it. Besides the arrow keys of
|
|
84
|
+
* `getTreeKeyAction`: Enter and Space select the active row, and a printable character moves to the next row whose
|
|
85
|
+
* label starts with it. In a text field (a combobox's search input) only Up, Down and Enter act on the tree, the
|
|
86
|
+
* other keys edit the text. `isRow` tells whether a row has render props to act on.
|
|
87
|
+
*/
|
|
88
|
+
export declare function getTreeKeyboardAction<T extends BasicFlattenNode>(event: {
|
|
89
|
+
key: string;
|
|
90
|
+
ctrlKey: boolean;
|
|
91
|
+
metaKey: boolean;
|
|
92
|
+
altKey: boolean;
|
|
93
|
+
}, rows: T[], activeIndex: number, editing: boolean, { isRow, isExpanded, isLeaf, rtl }: {
|
|
94
|
+
isRow: (row: T) => boolean;
|
|
95
|
+
isExpanded: (row: T) => boolean;
|
|
96
|
+
isLeaf: (row: T) => boolean;
|
|
97
|
+
rtl: boolean;
|
|
98
|
+
}, typeahead: Typeahead): TreeKeyboardAction | null;
|
|
99
|
+
/**
|
|
100
|
+
* The node for a selected key missing from treeData: found in the object value (onChangeWithObject), else built from
|
|
101
|
+
* the key. The label goes under keyMaps.label, then TreeSelect's treeNodeLabelProp, then 'label'.
|
|
102
|
+
*/
|
|
103
|
+
export declare function getDataForKeyNotInKeyEntities(key: string, { onChangeWithObject, value, defaultValue, keyMaps, treeNodeLabelProp }: Pick<BasicTreeProps, 'onChangeWithObject' | 'value' | 'defaultValue' | 'keyMaps'> & {
|
|
104
|
+
treeNodeLabelProp?: string;
|
|
105
|
+
}): any;
|
|
106
|
+
/**
|
|
107
|
+
* Under disableStrictly, the status a click on an unchecked node leads to: unchecked when every non-disabled
|
|
108
|
+
* descendant is already checked, checked otherwise. Unchecking always unchecks.
|
|
109
|
+
*/
|
|
110
|
+
export declare function calcCheckedStatus(targetStatus: boolean, eventKey: string, { checkedKeys, keyEntities, disabledKeys }: Pick<CheckState, 'keyEntities' | 'checkedKeys' | 'disabledKeys'>): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* The checked and half-checked keys after checking or unchecking a node with checkRelation="related"; under
|
|
113
|
+
* disableStrictly, disabled descendants keep their status
|
|
114
|
+
*/
|
|
115
|
+
export declare function calcRelatedCheckedKeys(eventKey: string, targetStatus: boolean, disableStrictly: boolean, state: CheckState): {
|
|
116
|
+
checkedKeys: Set<string>;
|
|
117
|
+
halfCheckedKeys: Set<string>;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* A click on a node in multiple mode: the status it gets, the keys to report through onChange and the state to write
|
|
121
|
+
* when uncontrolled. Null when checkRelation is neither 'related' nor 'unRelated'.
|
|
122
|
+
*/
|
|
123
|
+
export declare function getMultipleSelectResult({ checked, eventKey }: BasicTreeNodeProps, { disableStrictly, checkRelation }: Pick<BasicTreeProps, 'disableStrictly' | 'checkRelation'>, state: CheckState & Pick<BasicTreeInnerData, 'realCheckedKeys'>): {
|
|
124
|
+
targetStatus: boolean;
|
|
125
|
+
keys: string[];
|
|
126
|
+
state: Partial<Pick<BasicTreeInnerData, 'checkedKeys' | 'halfCheckedKeys' | 'realCheckedKeys'>>;
|
|
127
|
+
} | null;
|
|
128
|
+
export {};
|