@fibrae/semi-foundation 0.0.0-stage → 0.1.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 +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,557 @@
|
|
|
1
|
+
import BaseFoundation from "../base/foundation.js";
|
|
2
|
+
import { isComposing } from "../utils/key-code.js";
|
|
3
|
+
import { isSecondaryPress } from "../utils/pointer.js";
|
|
4
|
+
import FocusTrapHandle from "../utils/focus-handle.js";
|
|
5
|
+
import { recordCaretTail, restoreCaretTail } from "./caret.js";
|
|
6
|
+
import { numbers } from "./constants.js";
|
|
7
|
+
import { toString } from "es-toolkit/compat";
|
|
8
|
+
// src/input-number/foundation.ts
|
|
9
|
+
/** Whether a step toward `bound` is refused; a value given out of range is shown as is, so it can be past the bound */
|
|
10
|
+
function reachesBound(number, bound, direction) {
|
|
11
|
+
return number != null && bound != null && (direction > 0 ? number >= bound : number <= bound);
|
|
12
|
+
}
|
|
13
|
+
const SCIENTIFIC_NOTATION = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)[eE][+-]?\d+$/;
|
|
14
|
+
var InputNumberFoundation = class InputNumberFoundation extends BaseFoundation {
|
|
15
|
+
#intervalHasRegistered;
|
|
16
|
+
#interval;
|
|
17
|
+
#timerHasRegistered;
|
|
18
|
+
#timer;
|
|
19
|
+
#currencyParts;
|
|
20
|
+
#lastChangeWasStep = false;
|
|
21
|
+
#caretTail;
|
|
22
|
+
#recordCaret() {
|
|
23
|
+
this.#caretTail = recordCaretTail(this._adapter.getInput());
|
|
24
|
+
}
|
|
25
|
+
/** Puts the caret back in front of the text that followed it before the last change */
|
|
26
|
+
#restoreCaret() {
|
|
27
|
+
restoreCaretTail(this._adapter.getInput(), this.#caretTail);
|
|
28
|
+
}
|
|
29
|
+
#focusInput() {
|
|
30
|
+
const input = this._adapter.getInput();
|
|
31
|
+
if (input && FocusTrapHandle.getActiveElement(input) !== input) input.focus({ preventScroll: this.getProp("preventScroll") });
|
|
32
|
+
}
|
|
33
|
+
#getFinalCurrency() {
|
|
34
|
+
const { currency } = this.getProps();
|
|
35
|
+
return typeof currency === "string" ? currency : this.getProp("defaultCurrency");
|
|
36
|
+
}
|
|
37
|
+
/** Commits the formatted text a step produced */
|
|
38
|
+
#commitStep(v = "", event = null, updateCb = null) {
|
|
39
|
+
const parsed = this.doParse(v, false);
|
|
40
|
+
const isValidNumber = !isNaN(parsed);
|
|
41
|
+
if (!(isValidNumber && parsed === this.getState("number"))) this.#notifyChange(isValidNumber ? parsed : v, event);
|
|
42
|
+
if (!this.isControlled()) {
|
|
43
|
+
if (isValidNumber) this._adapter.setNumber(parsed);
|
|
44
|
+
this._adapter.setValue(v, updateCb);
|
|
45
|
+
}
|
|
46
|
+
if (this.getProp("keepFocus")) this._adapter.setFocusing(true, () => {
|
|
47
|
+
if (this.#lastChangeWasStep && this.getState("focusing")) this.#focusInput();
|
|
48
|
+
this.#lastChangeWasStep = true;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
#registerInterval(cb) {
|
|
52
|
+
const pressInterval = this.getProp("pressInterval") || numbers.DEFAULT_PRESS_INTERVAL;
|
|
53
|
+
this.#unregisterInterval();
|
|
54
|
+
this.#intervalHasRegistered = true;
|
|
55
|
+
this.#interval = setInterval(() => {
|
|
56
|
+
if (typeof cb === "function" && this.#intervalHasRegistered) cb();
|
|
57
|
+
}, pressInterval);
|
|
58
|
+
}
|
|
59
|
+
#unregisterInterval() {
|
|
60
|
+
if (this.#interval) {
|
|
61
|
+
this.#intervalHasRegistered = false;
|
|
62
|
+
clearInterval(this.#interval);
|
|
63
|
+
this.#interval = null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
#registerTimer(cb) {
|
|
67
|
+
const pressTimeout = this.getProp("pressTimeout") ?? numbers.DEFAULT_PRESS_TIMEOUT;
|
|
68
|
+
this.#unregisterTimer();
|
|
69
|
+
this.#timerHasRegistered = true;
|
|
70
|
+
this.#timer = setTimeout(() => {
|
|
71
|
+
if (this.#timerHasRegistered && typeof cb === "function") cb();
|
|
72
|
+
}, pressTimeout);
|
|
73
|
+
}
|
|
74
|
+
#unregisterTimer() {
|
|
75
|
+
if (this.#timer) {
|
|
76
|
+
this.#timerHasRegistered = false;
|
|
77
|
+
clearTimeout(this.#timer);
|
|
78
|
+
this.#timer = null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
#getCurrencyParts() {
|
|
82
|
+
const { localeCode, currencyDisplay } = this.getProps();
|
|
83
|
+
const currency = this.#getFinalCurrency();
|
|
84
|
+
const key = `${localeCode}|${currency}|${currencyDisplay}`;
|
|
85
|
+
if (this.#currencyParts?.key !== key) {
|
|
86
|
+
const parts = new Intl.NumberFormat(localeCode, {
|
|
87
|
+
style: "currency",
|
|
88
|
+
currency,
|
|
89
|
+
currencyDisplay,
|
|
90
|
+
minimumFractionDigits: 1
|
|
91
|
+
}).formatToParts(1234.5);
|
|
92
|
+
this.#currencyParts = {
|
|
93
|
+
key,
|
|
94
|
+
decimalPoint: parts.find((part) => part.type === "decimal")?.value,
|
|
95
|
+
currencySymbol: parts.find((part) => part.type === "currency")?.value ?? ""
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return this.#currencyParts;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The text a step shows: a focused input is being edited, so it shows the plain number, not the currency format.
|
|
102
|
+
*/
|
|
103
|
+
#formatStep(num) {
|
|
104
|
+
return this.doFormat(num, true, this.isCurrency() && !this.getState("focusing"));
|
|
105
|
+
}
|
|
106
|
+
#getInitialPropValue() {
|
|
107
|
+
const { defaultValue, value } = this.getProps();
|
|
108
|
+
return this.isControlled() ? value : defaultValue;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The text and number of the first render. An out-of-range value is shown as given: min and max correct it, and
|
|
112
|
+
* report it, only when the user interacts (typing, blur, step, clear), as in antd, Arco and TDesign.
|
|
113
|
+
*/
|
|
114
|
+
#getFirstRenderValue() {
|
|
115
|
+
const propsValue = this.#getInitialPropValue();
|
|
116
|
+
if (propsValue == null || propsValue === "") return {
|
|
117
|
+
value: "",
|
|
118
|
+
number: null
|
|
119
|
+
};
|
|
120
|
+
const valueStr = this.isCurrency() ? propsValue : typeof propsValue === "number" ? this.doFormat(propsValue) : toString(propsValue);
|
|
121
|
+
const parsedNum = this.doParse(valueStr, false, true);
|
|
122
|
+
if (Number.isNaN(parsedNum)) return {
|
|
123
|
+
value: "",
|
|
124
|
+
number: null
|
|
125
|
+
};
|
|
126
|
+
return {
|
|
127
|
+
value: this.doFormat(parsedNum, true, true),
|
|
128
|
+
number: parsedNum
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
#getPrecLen(num) {
|
|
132
|
+
if (typeof num !== "string") {
|
|
133
|
+
const n = Number(num || "");
|
|
134
|
+
if (!isFinite(n) || n === 0) return 0;
|
|
135
|
+
const s = Math.abs(n).toString();
|
|
136
|
+
if (/e/i.test(s)) {
|
|
137
|
+
const [mantissa, exp] = s.split(/e/i);
|
|
138
|
+
const mantissaDecimals = (mantissa.split(".")[1] || "").length;
|
|
139
|
+
return Math.max(0, mantissaDecimals - parseInt(exp, 10));
|
|
140
|
+
}
|
|
141
|
+
num = s;
|
|
142
|
+
}
|
|
143
|
+
const idx = num.indexOf(".") + 1;
|
|
144
|
+
return idx ? num.length - idx : 0;
|
|
145
|
+
}
|
|
146
|
+
#adjustPrec(num) {
|
|
147
|
+
const precision = this.getProp("precision");
|
|
148
|
+
if (typeof precision === "number" && num !== "" && num !== null && !Number.isNaN(Number(num))) num = Number(num).toFixed(precision);
|
|
149
|
+
return toString(num);
|
|
150
|
+
}
|
|
151
|
+
#isScientificNotation() {
|
|
152
|
+
const { scientificNotation } = this.getProps();
|
|
153
|
+
return scientificNotation === true || typeof scientificNotation === "object" && scientificNotation !== null;
|
|
154
|
+
}
|
|
155
|
+
#getScientificNotationThreshold() {
|
|
156
|
+
const { scientificNotation } = this.getProps();
|
|
157
|
+
if (typeof scientificNotation === "object" && scientificNotation !== null) {
|
|
158
|
+
const t = scientificNotation.threshold;
|
|
159
|
+
return typeof t === "number" && Number.isFinite(t) && t >= 1 ? t : 15;
|
|
160
|
+
}
|
|
161
|
+
return 15;
|
|
162
|
+
}
|
|
163
|
+
#toScientificNotation(num) {
|
|
164
|
+
const threshold = this.#getScientificNotationThreshold();
|
|
165
|
+
const absNum = Math.abs(num);
|
|
166
|
+
const numStr = String(absNum);
|
|
167
|
+
const hasExp = /e/i.test(numStr);
|
|
168
|
+
const significantDigits = numStr.replace(/[.\-+eE]/g, "").replace(/^0+/, "");
|
|
169
|
+
if ((hasExp || significantDigits.length >= threshold) && absNum !== 0) {
|
|
170
|
+
const fractionDigits = Math.max(0, Math.min(100, Math.floor(threshold) - 1));
|
|
171
|
+
return num.toExponential(fractionDigits).replace(/(\.\d*?)0+e/, "$1e").replace(/\.e/, "e");
|
|
172
|
+
}
|
|
173
|
+
return String(num);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The exponent form keeps only `threshold` digits, so the number is reported with all its digits.
|
|
177
|
+
*/
|
|
178
|
+
#reportedText(shown, number) {
|
|
179
|
+
if (this.#isScientificNotation() && !this.isCurrency() && typeof number === "number" && !isNaN(number)) return this.doFormat(number, true, false);
|
|
180
|
+
return shown;
|
|
181
|
+
}
|
|
182
|
+
#step(direction, event) {
|
|
183
|
+
const value = direction > 0 ? this.add(null, event) : this.minus(null, event);
|
|
184
|
+
this.#commitStep(value, event);
|
|
185
|
+
if (direction > 0) this._adapter.notifyUpClick(value, event);
|
|
186
|
+
else this._adapter.notifyDownClick(value, event);
|
|
187
|
+
}
|
|
188
|
+
#canStep(direction) {
|
|
189
|
+
const { readonly, disabled, min, max } = this.getProps();
|
|
190
|
+
return !readonly && !disabled && !reachesBound(this.getState("number"), direction > 0 ? max : min, direction);
|
|
191
|
+
}
|
|
192
|
+
#press(direction, event) {
|
|
193
|
+
if (isSecondaryPress(event) || !this.#canStep(direction)) return;
|
|
194
|
+
this.#lastChangeWasStep = true;
|
|
195
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
196
|
+
event.stopPropagation();
|
|
197
|
+
this.#step(direction, event);
|
|
198
|
+
this.#registerTimer(() => {
|
|
199
|
+
this.#registerInterval(() => {
|
|
200
|
+
if (!this.#canStep(direction)) {
|
|
201
|
+
this.handlePressEnd();
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
this.#step(direction, event);
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
#notifyChange(value, e) {
|
|
209
|
+
if (value == null || value === "") this._adapter.notifyChange("", e);
|
|
210
|
+
else {
|
|
211
|
+
const parsedNum = this.toNumber(value, true);
|
|
212
|
+
if (typeof parsedNum === "number" && !isNaN(parsedNum)) {
|
|
213
|
+
this._adapter.notifyChange(parsedNum, e);
|
|
214
|
+
this.#notifyNumberChange(parsedNum, e);
|
|
215
|
+
} else this._adapter.notifyChange(this.afterParser(value), e);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
#notifyNumberChange(value, e) {
|
|
219
|
+
const { number } = this.getStates();
|
|
220
|
+
if (this.isValidNumber(value) && value !== number) this._adapter.notifyNumberChange(value, e);
|
|
221
|
+
}
|
|
222
|
+
isControlled() {
|
|
223
|
+
return this._isControlledComponent("value");
|
|
224
|
+
}
|
|
225
|
+
isCurrency() {
|
|
226
|
+
const { currency } = this.getProps();
|
|
227
|
+
return currency === true || typeof currency === "string" && currency.trim() !== "";
|
|
228
|
+
}
|
|
229
|
+
add(step, event) {
|
|
230
|
+
const propStep = event && event.shiftKey ? this.getProp("shiftStep") : this.getProp("step");
|
|
231
|
+
step = step == null ? propStep : Number(step);
|
|
232
|
+
const curVal = this.getState("number");
|
|
233
|
+
let curNum = this.toNumber(curVal) || 0;
|
|
234
|
+
const min = this.getProp("min");
|
|
235
|
+
const max = this.getProp("max");
|
|
236
|
+
const minPrecLen = this.#getPrecLen(min);
|
|
237
|
+
const maxPrecLen = this.#getPrecLen(max);
|
|
238
|
+
const curPrecLen = this.#getPrecLen(curNum);
|
|
239
|
+
const stepPrecLen = this.#getPrecLen(step);
|
|
240
|
+
const scale = Math.pow(10, Math.max(minPrecLen, maxPrecLen, curPrecLen, stepPrecLen));
|
|
241
|
+
curNum = Math.round(curNum * scale + step * scale) / scale;
|
|
242
|
+
if (typeof min === "number" && min > curNum) curNum = min;
|
|
243
|
+
if (typeof max === "number" && max < curNum) curNum = max;
|
|
244
|
+
return this.#formatStep(curNum);
|
|
245
|
+
}
|
|
246
|
+
minus(step, event) {
|
|
247
|
+
const propStep = event && event.shiftKey ? this.getProp("shiftStep") : this.getProp("step");
|
|
248
|
+
step = step == null ? propStep : Number(step);
|
|
249
|
+
return this.add(-step, event);
|
|
250
|
+
}
|
|
251
|
+
formatCurrency(value) {
|
|
252
|
+
const { localeCode, minimumFractionDigits, precision, maximumFractionDigits, currencyDisplay, showCurrencySymbol } = this.getProps();
|
|
253
|
+
let formattedValue = value;
|
|
254
|
+
if (typeof value === "string" && Number.isNaN(Number(value))) formattedValue = this.parseInternationalCurrency(value);
|
|
255
|
+
const formatted = new Intl.NumberFormat(localeCode, {
|
|
256
|
+
style: "currency",
|
|
257
|
+
currency: this.#getFinalCurrency(),
|
|
258
|
+
currencyDisplay,
|
|
259
|
+
minimumFractionDigits: minimumFractionDigits ?? precision,
|
|
260
|
+
maximumFractionDigits: maximumFractionDigits ?? precision
|
|
261
|
+
}).format(Number(formattedValue));
|
|
262
|
+
return showCurrencySymbol ? formatted : formatted.replace(this.#getCurrencyParts().currencySymbol, "").trim();
|
|
263
|
+
}
|
|
264
|
+
/** `forDisplay` formats for the unfocused input: currency format and scientific notation apply only then */
|
|
265
|
+
doFormat(value = 0, needAdjustPrec = true, forDisplay = false) {
|
|
266
|
+
const { formatter } = this.getProps();
|
|
267
|
+
let str;
|
|
268
|
+
if (this.isCurrency() && forDisplay) str = this.formatCurrency(value);
|
|
269
|
+
else if (needAdjustPrec) str = this.#adjustPrec(value);
|
|
270
|
+
else str = toString(value);
|
|
271
|
+
if (this.#isScientificNotation() && forDisplay && !this.isCurrency()) {
|
|
272
|
+
const numValue = typeof value === "number" ? value : parseFloat(str);
|
|
273
|
+
if (!isNaN(numValue) && isFinite(numValue)) str = this.#toScientificNotation(numValue);
|
|
274
|
+
}
|
|
275
|
+
if (typeof formatter === "function") str = formatter(str);
|
|
276
|
+
return str;
|
|
277
|
+
}
|
|
278
|
+
clamp(current) {
|
|
279
|
+
const { min, max } = this.getProps();
|
|
280
|
+
if (current < min) return min;
|
|
281
|
+
else if (current > max) return max;
|
|
282
|
+
return current;
|
|
283
|
+
}
|
|
284
|
+
parseInternationalCurrency(currencyString) {
|
|
285
|
+
const { decimalPoint, currencySymbol } = this.#getCurrencyParts();
|
|
286
|
+
let cleaned = currencyString.replace(currencySymbol, "").replace(new RegExp(`[^\\d${decimalPoint ?? ""}\\-]`, "g"), "");
|
|
287
|
+
if (decimalPoint && decimalPoint !== ".") cleaned = cleaned.replace(decimalPoint, ".");
|
|
288
|
+
return parseFloat(cleaned);
|
|
289
|
+
}
|
|
290
|
+
doParse(value, needCheckPrec = true, needAdjustPrec = false, needAdjustMaxMin = false) {
|
|
291
|
+
if (this.isCurrency() && typeof value === "string") value = this.parseInternationalCurrency(value);
|
|
292
|
+
if (typeof value === "number") {
|
|
293
|
+
if (needAdjustMaxMin) value = this.clamp(value);
|
|
294
|
+
if (needAdjustPrec) value = this.#adjustPrec(value);
|
|
295
|
+
return Number(value);
|
|
296
|
+
}
|
|
297
|
+
const parser = this.getProp("parser");
|
|
298
|
+
if (typeof parser === "function") {
|
|
299
|
+
const parsedValue = parser(value);
|
|
300
|
+
value = typeof parsedValue === "number" ? toString(parsedValue) : parsedValue;
|
|
301
|
+
}
|
|
302
|
+
if (typeof value === "string" && SCIENTIFIC_NOTATION.test(value.trim())) {
|
|
303
|
+
const scientificNum = parseFloat(value.trim());
|
|
304
|
+
if (!isNaN(scientificNum)) {
|
|
305
|
+
if (needAdjustMaxMin) return this.clamp(scientificNum);
|
|
306
|
+
if (needAdjustPrec) return Number(this.#adjustPrec(scientificNum));
|
|
307
|
+
return scientificNum;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (needCheckPrec && typeof value === "string") {
|
|
311
|
+
const zeroIsValid = !value.includes(".") || value === "0" || value.lastIndexOf("0") < value.length - 1;
|
|
312
|
+
const dotIsValid = value.lastIndexOf(".") < value.length - 1 && value.split(".").length < 3;
|
|
313
|
+
if (!zeroIsValid || !dotIsValid) return NaN;
|
|
314
|
+
}
|
|
315
|
+
if (needAdjustPrec) value = this.#adjustPrec(value);
|
|
316
|
+
if (typeof value === "string" && value.length) return needAdjustMaxMin ? this.clamp(Number(value)) : Number(value);
|
|
317
|
+
return NaN;
|
|
318
|
+
}
|
|
319
|
+
afterParser(value) {
|
|
320
|
+
const parser = this.getProp("parser");
|
|
321
|
+
if (typeof value === "string" && typeof parser === "function") return toString(parser(value));
|
|
322
|
+
return toString(value);
|
|
323
|
+
}
|
|
324
|
+
toNumber(value, needAdjustPrec = true) {
|
|
325
|
+
if (typeof value === "number") return value;
|
|
326
|
+
if (typeof value === "string") {
|
|
327
|
+
const { parser } = this.getProps();
|
|
328
|
+
if (this.isCurrency()) value = this.parseInternationalCurrency(value);
|
|
329
|
+
if (typeof parser === "function") {
|
|
330
|
+
const parsedValue = parser(toString(value));
|
|
331
|
+
value = typeof parsedValue === "number" ? toString(parsedValue) : parsedValue;
|
|
332
|
+
}
|
|
333
|
+
if (needAdjustPrec) value = this.#adjustPrec(value);
|
|
334
|
+
}
|
|
335
|
+
return Number(value);
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* True for a number within [min, max] whose decimal length is at most `precision` (when `needCheckPrec`).
|
|
339
|
+
*/
|
|
340
|
+
isValidNumber(num, needCheckPrec = true) {
|
|
341
|
+
if (typeof num === "number" && !isNaN(num)) {
|
|
342
|
+
const { min, max, precision } = this.getProps();
|
|
343
|
+
const numPrec = this.#getPrecLen(num);
|
|
344
|
+
if (num >= min && num <= max && (needCheckPrec ? typeof precision === "number" && numPrec <= precision || typeof precision !== "number" : true)) return true;
|
|
345
|
+
}
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
/** ARIA takes a plain decimal, so 1.2e-7 is written out in full; an empty or infinite number has none */
|
|
349
|
+
static getAriaValueNow(number) {
|
|
350
|
+
return number != null && Number.isFinite(number) ? number.toLocaleString("en-US", {
|
|
351
|
+
maximumFractionDigits: 100,
|
|
352
|
+
useGrouping: false
|
|
353
|
+
}) : void 0;
|
|
354
|
+
}
|
|
355
|
+
/** The first render's state, so the formatted value shows without a second render (#2548); there is no init() */
|
|
356
|
+
static getInitialState(props) {
|
|
357
|
+
return {
|
|
358
|
+
...new InputNumberFoundation({
|
|
359
|
+
getProp: (key) => props[key],
|
|
360
|
+
getProps: () => props
|
|
361
|
+
}).#getFirstRenderValue(),
|
|
362
|
+
focusing: Boolean(props.autofocus),
|
|
363
|
+
hovering: false
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
destroy() {
|
|
367
|
+
this.#unregisterInterval();
|
|
368
|
+
this.#unregisterTimer();
|
|
369
|
+
}
|
|
370
|
+
handleInputFocus(e) {
|
|
371
|
+
const value = this.getState("value");
|
|
372
|
+
if (value !== "") {
|
|
373
|
+
if (this.#isScientificNotation() && !this.isCurrency()) {
|
|
374
|
+
const strVal = toString(value);
|
|
375
|
+
if (SCIENTIFIC_NOTATION.test(strVal.trim())) {
|
|
376
|
+
const number = this.getState("number");
|
|
377
|
+
const parsedNum = typeof number === "number" ? number : this.doParse(strVal, false, false, false);
|
|
378
|
+
if (!Number.isNaN(parsedNum)) {
|
|
379
|
+
const fullNumberStr = this.doFormat(parsedNum, true, false);
|
|
380
|
+
this._adapter.setValue(fullNumberStr);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
this.#recordCaret();
|
|
386
|
+
this._adapter.setFocusing(true);
|
|
387
|
+
this.#lastChangeWasStep = false;
|
|
388
|
+
this._adapter.notifyFocus(e);
|
|
389
|
+
}
|
|
390
|
+
handleInputChange(value, event) {
|
|
391
|
+
this.#lastChangeWasStep = false;
|
|
392
|
+
const parsedNum = this.doParse(value, true, true, true);
|
|
393
|
+
const toNum = this.doParse(value, false, false, false);
|
|
394
|
+
const valueAfterParser = this.afterParser(value);
|
|
395
|
+
this.#recordCaret();
|
|
396
|
+
let notifyVal;
|
|
397
|
+
let num = toNum;
|
|
398
|
+
let formattedNum = value;
|
|
399
|
+
if (value === "") {
|
|
400
|
+
if (!this.isControlled()) num = null;
|
|
401
|
+
} else if (this.isValidNumber(toNum) && this.isValidNumber(parsedNum)) {
|
|
402
|
+
notifyVal = toNum;
|
|
403
|
+
formattedNum = this.doFormat(toNum, false);
|
|
404
|
+
} else {
|
|
405
|
+
if (typeof toNum === "number" && !isNaN(toNum)) {
|
|
406
|
+
formattedNum = this.doFormat(toNum, false);
|
|
407
|
+
const dotIndex = valueAfterParser.lastIndexOf(".");
|
|
408
|
+
const lengthAfterDot = valueAfterParser.length - 1 - dotIndex;
|
|
409
|
+
const precLength = this.#getPrecLen(toNum);
|
|
410
|
+
if (!precLength) {
|
|
411
|
+
const dotBeginStr = dotIndex > -1 ? valueAfterParser.slice(dotIndex) : "";
|
|
412
|
+
formattedNum += dotBeginStr;
|
|
413
|
+
} else if (precLength < lengthAfterDot) for (let i = 0; i < lengthAfterDot - precLength; i++) formattedNum += "0";
|
|
414
|
+
num = toNum;
|
|
415
|
+
} else formattedNum = this.doFormat(valueAfterParser, false);
|
|
416
|
+
notifyVal = this.isControlled() ? formattedNum : valueAfterParser;
|
|
417
|
+
}
|
|
418
|
+
this.#notifyChange(notifyVal, event);
|
|
419
|
+
if (!this.isControlled() && (num === null || typeof num === "number" && !isNaN(num))) this._adapter.setNumber(num);
|
|
420
|
+
this._adapter.setValue(this.isControlled() && !this.isCurrency() ? formattedNum : this.doFormat(valueAfterParser, false), () => {
|
|
421
|
+
this.#restoreCaret();
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
handleInputKeyDown(event) {
|
|
425
|
+
if (this.getProp("readonly")) {
|
|
426
|
+
this._adapter.notifyKeyDown(event);
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
const key = isComposing(event) || event.altKey || event.ctrlKey || event.metaKey ? "" : event.key;
|
|
430
|
+
const bound = event.shiftKey ? null : key === "Home" ? this.getProp("min") : key === "End" ? this.getProp("max") : null;
|
|
431
|
+
const jumpsToBound = typeof bound === "number" && Number.isFinite(bound);
|
|
432
|
+
if ((key === "ArrowUp" || key === "ArrowDown") && !this.#canStep(key === "ArrowUp" ? 1 : -1)) event.preventDefault();
|
|
433
|
+
else if (key === "ArrowUp" || key === "ArrowDown" || jumpsToBound) {
|
|
434
|
+
this.#lastChangeWasStep = true;
|
|
435
|
+
this.#recordCaret();
|
|
436
|
+
const formattedVal = jumpsToBound ? this.#formatStep(bound) : key === "ArrowUp" ? this.add(null, event) : this.minus(null, event);
|
|
437
|
+
this.#commitStep(formattedVal, event, () => {
|
|
438
|
+
this.#restoreCaret();
|
|
439
|
+
});
|
|
440
|
+
event.preventDefault();
|
|
441
|
+
}
|
|
442
|
+
this._adapter.notifyKeyDown(event);
|
|
443
|
+
}
|
|
444
|
+
handleInputBlur(e) {
|
|
445
|
+
const currentValue = toString(this.getState("value"));
|
|
446
|
+
let currentNumber = this.getState("number");
|
|
447
|
+
if (currentNumber != null || currentValue != null && currentValue !== "") {
|
|
448
|
+
const parsedNum = this.doParse(currentValue, false, true, true);
|
|
449
|
+
let numHasChanged = false;
|
|
450
|
+
let strHasChanged = false;
|
|
451
|
+
let willSetNum, willSetVal;
|
|
452
|
+
if (this.isValidNumber(parsedNum) && currentNumber !== parsedNum) {
|
|
453
|
+
willSetNum = parsedNum;
|
|
454
|
+
if (!this.isControlled()) currentNumber = willSetNum;
|
|
455
|
+
numHasChanged = true;
|
|
456
|
+
}
|
|
457
|
+
if (!this.isValidNumber(parsedNum)) {
|
|
458
|
+
const extractedNum = parseFloat(currentValue);
|
|
459
|
+
if (!isNaN(extractedNum)) {
|
|
460
|
+
const limitedNum = this.clamp(extractedNum);
|
|
461
|
+
if (limitedNum !== currentNumber) {
|
|
462
|
+
willSetNum = limitedNum;
|
|
463
|
+
if (!this.isControlled()) currentNumber = willSetNum;
|
|
464
|
+
numHasChanged = true;
|
|
465
|
+
}
|
|
466
|
+
} else if (typeof currentNumber === "number" && !isNaN(currentNumber)) {
|
|
467
|
+
const limitedNum = this.clamp(currentNumber);
|
|
468
|
+
if (limitedNum !== currentNumber) {
|
|
469
|
+
willSetNum = limitedNum;
|
|
470
|
+
if (!this.isControlled()) currentNumber = willSetNum;
|
|
471
|
+
numHasChanged = true;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
const currentFormattedNum = this.doFormat(currentNumber, true, true);
|
|
476
|
+
if (currentFormattedNum !== currentValue) {
|
|
477
|
+
willSetVal = currentFormattedNum;
|
|
478
|
+
strHasChanged = true;
|
|
479
|
+
}
|
|
480
|
+
if (strHasChanged || numHasChanged) {
|
|
481
|
+
const reported = willSetVal != null ? this.#reportedText(willSetVal, currentNumber) : willSetNum;
|
|
482
|
+
if (numHasChanged || reported !== currentValue) this.#notifyChange(reported, e);
|
|
483
|
+
if (willSetVal != null) this._adapter.setValue(willSetVal);
|
|
484
|
+
if (willSetNum != null && !this.isControlled()) this._adapter.setNumber(willSetNum);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
this._adapter.setFocusing(false);
|
|
488
|
+
this._adapter.notifyBlur(e);
|
|
489
|
+
}
|
|
490
|
+
handleInputMouseEnter() {
|
|
491
|
+
this._adapter.setHovering(true);
|
|
492
|
+
}
|
|
493
|
+
handleInputMouseLeave() {
|
|
494
|
+
this._adapter.setHovering(false);
|
|
495
|
+
}
|
|
496
|
+
handleInputMouseMove() {
|
|
497
|
+
if (!this.getState("hovering")) this._adapter.setHovering(true);
|
|
498
|
+
}
|
|
499
|
+
/** Ends the repeat of a held button; follows pointerup and pointercancel */
|
|
500
|
+
handlePressEnd() {
|
|
501
|
+
this.#unregisterInterval();
|
|
502
|
+
this.#unregisterTimer();
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Under keepFocus or innerButtons a press on a step button never blurs the input, even when it steps nothing. This
|
|
506
|
+
* belongs on mousedown: cancelling pointerdown would also suppress the mousedown that outside-click listeners of
|
|
507
|
+
* other open popups wait for.
|
|
508
|
+
*/
|
|
509
|
+
handleStepMouseDown(event) {
|
|
510
|
+
if (this.getProp("keepFocus") || this.getProp("innerButtons")) event.preventDefault();
|
|
511
|
+
}
|
|
512
|
+
handleUpPress(event) {
|
|
513
|
+
this.#press(1, event);
|
|
514
|
+
}
|
|
515
|
+
handleDownPress(event) {
|
|
516
|
+
this.#press(-1, event);
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* A changed controlled `value`, after the commit that received it. It never notifies: the parent already holds
|
|
520
|
+
* this value, and an out-of-range one is shown as given until the user interacts.
|
|
521
|
+
*
|
|
522
|
+
* While focused the typed text stays: a number only updates `number`, kept within min and max like the text will
|
|
523
|
+
* be on blur (and the text right after a step), an unparsable value replaces the text. Otherwise the value is
|
|
524
|
+
* formatted like on blur, except that it is not clamped, and an unparsable one empties it.
|
|
525
|
+
*/
|
|
526
|
+
handleValueChange(value) {
|
|
527
|
+
let states;
|
|
528
|
+
let callback;
|
|
529
|
+
if (value == null || value === "") states = {
|
|
530
|
+
value: "",
|
|
531
|
+
number: null
|
|
532
|
+
};
|
|
533
|
+
else {
|
|
534
|
+
const valueStr = typeof value === "number" ? this.doFormat(value) : value;
|
|
535
|
+
const parsedNum = this.doParse(valueStr, false, true);
|
|
536
|
+
const toNum = typeof value === "number" ? value : this.doParse(valueStr, false, false, false);
|
|
537
|
+
if (this.getState("focusing")) {
|
|
538
|
+
const limitedNum = this.clamp(parsedNum);
|
|
539
|
+
if (!Number.isNaN(limitedNum) && limitedNum !== this.getState("number")) {
|
|
540
|
+
states = { number: limitedNum };
|
|
541
|
+
if (this.#lastChangeWasStep) states.value = this.doFormat(limitedNum, true);
|
|
542
|
+
callback = () => this.#restoreCaret();
|
|
543
|
+
} else if (!Number.isNaN(toNum)) states = { value: this.doFormat(toNum, false) };
|
|
544
|
+
else states = { value: valueStr };
|
|
545
|
+
} else if (!Number.isNaN(parsedNum)) states = {
|
|
546
|
+
number: parsedNum,
|
|
547
|
+
value: this.doFormat(parsedNum, true, true)
|
|
548
|
+
};
|
|
549
|
+
else states = {
|
|
550
|
+
number: null,
|
|
551
|
+
value: ""
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
this.setState(states, callback);
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
export { InputNumberFoundation as default, reachesBound };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@layer semi{.semi-input-number {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
transform: scale(var(--semi-transform_scale-none));
|
|
6
|
+
transition: background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none), border var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);
|
|
7
|
+
}
|
|
8
|
+
.semi-input-number-suffix-btns {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
margin-inline-start: 4px;
|
|
13
|
+
background-color: var(--semi-color-bg-2);
|
|
14
|
+
border: 1px solid var(--semi-color-border);
|
|
15
|
+
border-radius: var(--semi-border-radius-small);
|
|
16
|
+
}
|
|
17
|
+
.semi-input-number-suffix-btns > .semi-input-number-button {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
width: 14px;
|
|
22
|
+
height: 50%;
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
color: var(--semi-color-text-2);
|
|
26
|
+
touch-action: none;
|
|
27
|
+
user-select: none;
|
|
28
|
+
border-radius: 0;
|
|
29
|
+
}
|
|
30
|
+
.semi-input-number-suffix-btns > .semi-input-number-button-up:not(.semi-input-number-button-up-not-allowed):hover, .semi-input-number-suffix-btns > .semi-input-number-button-down:not(.semi-input-number-button-down-not-allowed):hover {
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
background-color: var(--semi-color-fill-0);
|
|
33
|
+
}
|
|
34
|
+
.semi-input-number-suffix-btns > .semi-input-number-button-up:not(.semi-input-number-button-up-not-allowed):active, .semi-input-number-suffix-btns > .semi-input-number-button-down:not(.semi-input-number-button-down-not-allowed):active {
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
background-color: var(--semi-color-fill-1);
|
|
37
|
+
}
|
|
38
|
+
.semi-input-number-suffix-btns > .semi-input-number-button-up.semi-input-number-button-up-disabled, .semi-input-number-suffix-btns > .semi-input-number-button-down.semi-input-number-button-down-disabled {
|
|
39
|
+
color: var(--semi-color-disabled-text);
|
|
40
|
+
background-color: var(--semi-color-disabled-fill);
|
|
41
|
+
}
|
|
42
|
+
.semi-input-number-suffix-btns > .semi-input-number-button-up.semi-input-number-button-up-not-allowed, .semi-input-number-suffix-btns > .semi-input-number-button-down.semi-input-number-button-down-not-allowed {
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
.semi-input-number-suffix-btns-inner-hover {
|
|
46
|
+
border-color: var(--semi-color-fill-2);
|
|
47
|
+
}
|
|
48
|
+
.semi-input-number-suffix-btns-inner {
|
|
49
|
+
margin-inline-start: 8px;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
border-radius: var(--semi-border-radius-small);
|
|
52
|
+
}
|
|
53
|
+
.semi-input-number .semi-input-clearbtn + .semi-input-suffix {
|
|
54
|
+
margin-inline-start: -4px;
|
|
55
|
+
}
|
|
56
|
+
.semi-input-number .semi-input-clearbtn + .semi-input-suffix .semi-input-number-suffix-btns-inner {
|
|
57
|
+
margin-inline-start: 0;
|
|
58
|
+
}
|
|
59
|
+
.semi-input-number-size-default .semi-input-number-suffix-btns {
|
|
60
|
+
height: 32px;
|
|
61
|
+
}
|
|
62
|
+
.semi-input-number-size-default .semi-input-number-suffix-btns-inner {
|
|
63
|
+
height: 30px;
|
|
64
|
+
}
|
|
65
|
+
.semi-input-number-size-large .semi-input-number-suffix-btns {
|
|
66
|
+
height: 40px;
|
|
67
|
+
}
|
|
68
|
+
.semi-input-number-size-large .semi-input-number-suffix-btns-inner {
|
|
69
|
+
height: 38px;
|
|
70
|
+
}
|
|
71
|
+
.semi-input-number-size-small .semi-input-number-suffix-btns {
|
|
72
|
+
height: 24px;
|
|
73
|
+
}
|
|
74
|
+
.semi-input-number-size-small .semi-input-number-suffix-btns-inner {
|
|
75
|
+
height: 22px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.semi-input-number:not(:focus-within):not(:hover) .semi-input-borderless + .semi-input-number-suffix-btns {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.semi-input-number:dir(rtl) {
|
|
83
|
+
direction: rtl;
|
|
84
|
+
}}
|