@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,167 @@
|
|
|
1
|
+
import BaseFoundation, { DefaultAdapter, DirectionContext } from "../base/foundation.js";
|
|
2
|
+
export interface Marks {
|
|
3
|
+
[key: number]: unknown;
|
|
4
|
+
}
|
|
5
|
+
export interface SliderProps {
|
|
6
|
+
defaultValue?: number | number[];
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
showMarkLabel?: boolean;
|
|
9
|
+
included?: boolean;
|
|
10
|
+
marks?: Marks;
|
|
11
|
+
max?: number;
|
|
12
|
+
min?: number;
|
|
13
|
+
/** Native form field name of the handle inputs; a range submits both values under it */
|
|
14
|
+
name?: string;
|
|
15
|
+
range?: boolean;
|
|
16
|
+
step?: number;
|
|
17
|
+
/** Called once per handle with that handle's value */
|
|
18
|
+
tipFormatter?: ((value: number) => any) | null;
|
|
19
|
+
value?: number | number[];
|
|
20
|
+
vertical?: boolean;
|
|
21
|
+
onAfterChange?: (value: SliderProps['value']) => void;
|
|
22
|
+
onChange?: (value: SliderProps['value']) => void;
|
|
23
|
+
onMouseUp?: (e: any) => void;
|
|
24
|
+
tooltipOnMark?: boolean;
|
|
25
|
+
tooltipVisible?: boolean;
|
|
26
|
+
style?: Record<string, any>;
|
|
27
|
+
showArrow?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
showBoundary?: boolean;
|
|
30
|
+
railStyle?: Record<string, any>;
|
|
31
|
+
verticalReverse?: boolean;
|
|
32
|
+
'aria-label'?: string;
|
|
33
|
+
'aria-labelledby'?: string;
|
|
34
|
+
'aria-valuetext'?: string;
|
|
35
|
+
getAriaValueText?: (value: number, index?: number) => string;
|
|
36
|
+
/** One dot for a single handle, one per handle for a range */
|
|
37
|
+
handleDot?: HandleDot | HandleDot[];
|
|
38
|
+
}
|
|
39
|
+
export interface HandleDot {
|
|
40
|
+
size?: string;
|
|
41
|
+
color?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface SliderState {
|
|
44
|
+
currentValue: number | number[];
|
|
45
|
+
/** The handle the pointer hovers or drags */
|
|
46
|
+
activeHandle: 'min' | 'max' | '';
|
|
47
|
+
/** The handle last pressed; it keeps its stacking after the drag */
|
|
48
|
+
chooseMovePos: 'min' | 'max' | '';
|
|
49
|
+
isDrag: boolean;
|
|
50
|
+
showBoundary: boolean;
|
|
51
|
+
isInRenderTree: boolean;
|
|
52
|
+
/** The handle whose input has keyboard focus (:focus-visible) */
|
|
53
|
+
focusVisibleHandle: 'min' | 'max' | '';
|
|
54
|
+
}
|
|
55
|
+
export interface SliderAdapter<P extends SliderProps = SliderProps, S extends SliderState = SliderState> extends DefaultAdapter<P, S, DirectionContext> {
|
|
56
|
+
getSliderNode: () => HTMLElement | null | undefined;
|
|
57
|
+
notifyChange: (value: number | number[]) => void;
|
|
58
|
+
notifyMouseUp: (e: any) => void;
|
|
59
|
+
notifyAfterChange: (value: number | number[]) => void;
|
|
60
|
+
}
|
|
61
|
+
type KeyModifiers = 'altKey' | 'ctrlKey' | 'metaKey';
|
|
62
|
+
export default class SliderFoundation<P extends SliderProps = SliderProps, S extends SliderState = SliderState> extends BaseFoundation<SliderAdapter<P, S>, P, S> {
|
|
63
|
+
#private;
|
|
64
|
+
protected valueFormatIsCorrect(value: SliderProps['value']): boolean;
|
|
65
|
+
protected handleMousePos(clientX: number, clientY: number): {
|
|
66
|
+
x: number;
|
|
67
|
+
y: number;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Clamps a pointer position to the slider's start and end
|
|
71
|
+
*/
|
|
72
|
+
protected checkMeetMinMax(position: number): number;
|
|
73
|
+
/** Position to value snapped to step; false when nothing changes or the slider has no layout */
|
|
74
|
+
protected transPosToValue(mousePos: number, isMin: boolean): any;
|
|
75
|
+
protected transValueToPos(value: SliderProps['value']): number | number[];
|
|
76
|
+
protected normalizeValue(inputValue: SliderProps['value']): number | number[];
|
|
77
|
+
protected calculateOutputValue(position: number, isMin: boolean): undefined | number | number[];
|
|
78
|
+
protected checkWhichHandle(pagePos: number): boolean;
|
|
79
|
+
static getInitialState(props: SliderProps): SliderState;
|
|
80
|
+
/**
|
|
81
|
+
* Percentages of the current value; they increase with value whatever the visual direction.
|
|
82
|
+
*/
|
|
83
|
+
static getMinAndMaxPercent({ range, min, max }: SliderProps, value: SliderState['currentValue']): {
|
|
84
|
+
min: number;
|
|
85
|
+
max: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Whether each handle shows its tooltip, and the tooltip contents
|
|
89
|
+
*/
|
|
90
|
+
static computeHandleVisibleVal({ tooltipVisible, tipFormatter: formatter, range, step, min }: SliderProps, { activeHandle, currentValue, isInRenderTree }: SliderState): {
|
|
91
|
+
tipVisible: {
|
|
92
|
+
min: boolean;
|
|
93
|
+
max: boolean;
|
|
94
|
+
};
|
|
95
|
+
tipChildren: {
|
|
96
|
+
min: any;
|
|
97
|
+
max: any;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Whether a mark is highlighted: 'active' inside the included track, false outside min and max
|
|
102
|
+
*/
|
|
103
|
+
static isMarkActive({ min, max, range, included }: SliderProps, currentValue: SliderState['currentValue'], mark: number): false | "unActive" | "active";
|
|
104
|
+
/**
|
|
105
|
+
* Rounds to the larger decimal count of step and min; crossed range ends collapse onto the active handle's end
|
|
106
|
+
*/
|
|
107
|
+
static normalizeValue(step: number, min: number, activeHandle: SliderState['activeHandle'], inputValue: SliderProps['value']): number | number[];
|
|
108
|
+
/**
|
|
109
|
+
* Range handles must not share one name and the wrapper has no role for a group label: aria-label gets the end
|
|
110
|
+
* appended; aria-labelledby is followed by the handle itself (APG multi-thumb self-reference). A disabled handle
|
|
111
|
+
* keeps the caller's name: the native disabled already tells the state, and a fallback aria-label would hide the
|
|
112
|
+
* name a <label for> gives.
|
|
113
|
+
*/
|
|
114
|
+
static getHandleA11y({ range, pos, id, ariaLabel, ariaLabelledby, generatedId, endName }: {
|
|
115
|
+
range?: boolean;
|
|
116
|
+
pos: 'min' | 'max';
|
|
117
|
+
id?: string;
|
|
118
|
+
ariaLabel?: string;
|
|
119
|
+
ariaLabelledby?: string;
|
|
120
|
+
generatedId: string;
|
|
121
|
+
endName: string;
|
|
122
|
+
}): {
|
|
123
|
+
id?: string;
|
|
124
|
+
ariaLabel?: string;
|
|
125
|
+
ariaLabelledby?: string;
|
|
126
|
+
};
|
|
127
|
+
init(): void;
|
|
128
|
+
destroy(): void;
|
|
129
|
+
/** An event handler, so the tooltips follow a container that was hidden */
|
|
130
|
+
syncIsInRenderTree: () => void;
|
|
131
|
+
/**
|
|
132
|
+
* Syncs a changed value prop, clamped to min and max
|
|
133
|
+
*/
|
|
134
|
+
handleValueChange(nextValue: SliderProps['value']): void;
|
|
135
|
+
/** A value prop back to undefined (a Form reset) returns to the default position */
|
|
136
|
+
resetValue(): void;
|
|
137
|
+
onHandleDown(e: Pick<PointerEvent, 'pointerId' | 'pointerType' | 'button' | 'clientX' | 'clientY'> & {
|
|
138
|
+
currentTarget: HTMLElement;
|
|
139
|
+
}, pos: 'min' | 'max'): boolean;
|
|
140
|
+
onHandleEnter(pos: SliderState['activeHandle']): void;
|
|
141
|
+
onHandleLeave(): void;
|
|
142
|
+
/**
|
|
143
|
+
* Both native inputs span min to max, so a range handle is stopped at the other one here
|
|
144
|
+
*/
|
|
145
|
+
handleInputChange(value: number, pos: 'min' | 'max'): void;
|
|
146
|
+
/**
|
|
147
|
+
* A value key stays with the slider unless the consumer's handler already prevented it. Page, Home and End keep
|
|
148
|
+
* the native range's change; arrows step here, since engines map them differently over a vertical or RTL range
|
|
149
|
+
* (Chrome follows the visual direction, Firefox not when vertical, Safari in neither case). The arrow pointing
|
|
150
|
+
* towards max increases; the cross-axis arrow follows Up and Right.
|
|
151
|
+
*/
|
|
152
|
+
handleKeyDown(event: Pick<KeyboardEvent, 'key' | 'defaultPrevented' | 'stopPropagation' | 'preventDefault' | KeyModifiers>, pos: 'min' | 'max'): void;
|
|
153
|
+
/**
|
|
154
|
+
* Releasing a value key ends the change, like releasing the mouse
|
|
155
|
+
*/
|
|
156
|
+
handleKeyUp(event: Pick<KeyboardEvent, 'key' | KeyModifiers>): void;
|
|
157
|
+
onFocus(e: {
|
|
158
|
+
target: Element;
|
|
159
|
+
}, pos: 'min' | 'max'): void;
|
|
160
|
+
onBlur(pos: 'min' | 'max'): void;
|
|
161
|
+
handleWrapClick: (e: any) => void;
|
|
162
|
+
/** A mark label is a wide target: it selects the mark's own value, not the value under the pointer */
|
|
163
|
+
handleMarkClick(markValue: number): void;
|
|
164
|
+
handleWrapperEnter(): void;
|
|
165
|
+
handleWrapperLeave(): void;
|
|
166
|
+
}
|
|
167
|
+
export {};
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import BaseFoundation from "../base/foundation.js";
|
|
2
|
+
import { handlePrevent } from "../utils/a11y.js";
|
|
3
|
+
import { isSecondaryPress } from "../utils/pointer.js";
|
|
4
|
+
import { clamp, isEqual } from "es-toolkit";
|
|
5
|
+
// src/slider/foundation.ts
|
|
6
|
+
const hasModifier = (event) => event.altKey || event.ctrlKey || event.metaKey;
|
|
7
|
+
const VALUE_KEYS = [
|
|
8
|
+
"ArrowLeft",
|
|
9
|
+
"ArrowDown",
|
|
10
|
+
"ArrowRight",
|
|
11
|
+
"ArrowUp",
|
|
12
|
+
"PageUp",
|
|
13
|
+
"PageDown",
|
|
14
|
+
"Home",
|
|
15
|
+
"End"
|
|
16
|
+
];
|
|
17
|
+
var SliderFoundation = class SliderFoundation extends BaseFoundation {
|
|
18
|
+
#dragOffset = 0;
|
|
19
|
+
#dragController = null;
|
|
20
|
+
#pointerId;
|
|
21
|
+
#clampToRange(value) {
|
|
22
|
+
const { min, max } = this.getProps();
|
|
23
|
+
return Array.isArray(value) ? [clamp(value[0], min, max), clamp(value[1], min, max)] : clamp(value, min, max);
|
|
24
|
+
}
|
|
25
|
+
#checkCurrentValue() {
|
|
26
|
+
const { currentValue } = this.getStates();
|
|
27
|
+
const checked = this.#clampToRange(currentValue);
|
|
28
|
+
if (!isEqual(checked, currentValue)) this.setState({ currentValue: checked });
|
|
29
|
+
}
|
|
30
|
+
#noTooltip() {
|
|
31
|
+
const { tipFormatter, tooltipVisible } = this.getProps();
|
|
32
|
+
return tipFormatter === null || tooltipVisible === false;
|
|
33
|
+
}
|
|
34
|
+
#getHandleCenterPosition(vertical, handle) {
|
|
35
|
+
const pos = handle.getBoundingClientRect();
|
|
36
|
+
const { x, y } = this.handleMousePos(pos.left + pos.width * .5, pos.top + pos.height * .5);
|
|
37
|
+
return vertical ? y : x;
|
|
38
|
+
}
|
|
39
|
+
#bindDragEvents(pointerId) {
|
|
40
|
+
this.#unbindDragEvents();
|
|
41
|
+
const controller = new AbortController();
|
|
42
|
+
this.#dragController = controller;
|
|
43
|
+
this.#pointerId = pointerId;
|
|
44
|
+
const { signal } = controller;
|
|
45
|
+
window.addEventListener("pointermove", this.#onHandleMove, { signal });
|
|
46
|
+
window.addEventListener("pointerup", this.#onHandleUp, { signal });
|
|
47
|
+
window.addEventListener("pointercancel", this.#onHandleUp, { signal });
|
|
48
|
+
}
|
|
49
|
+
#unbindDragEvents() {
|
|
50
|
+
this.#dragController?.abort();
|
|
51
|
+
this.#dragController = null;
|
|
52
|
+
}
|
|
53
|
+
/** A second finger neither moves nor ends the drag; keyboard events carry no pointer */
|
|
54
|
+
#isOtherPointer(e) {
|
|
55
|
+
return typeof e.pointerId === "number" && e.pointerId !== this.#pointerId;
|
|
56
|
+
}
|
|
57
|
+
#getParentRect() {
|
|
58
|
+
return this._adapter.getSliderNode()?.offsetParent?.getBoundingClientRect();
|
|
59
|
+
}
|
|
60
|
+
#getSliderLengths() {
|
|
61
|
+
const slider = this._adapter.getSliderNode();
|
|
62
|
+
if (!slider) return {
|
|
63
|
+
sliderX: 0,
|
|
64
|
+
sliderY: 0,
|
|
65
|
+
sliderWidth: 0,
|
|
66
|
+
sliderHeight: 0
|
|
67
|
+
};
|
|
68
|
+
const rect = slider.getBoundingClientRect();
|
|
69
|
+
const offsetParentRect = slider.offsetParent?.getBoundingClientRect();
|
|
70
|
+
return {
|
|
71
|
+
sliderX: offsetParentRect ? rect.left - offsetParentRect.left : slider.offsetLeft,
|
|
72
|
+
sliderY: offsetParentRect ? rect.top - offsetParentRect.top : slider.offsetTop,
|
|
73
|
+
sliderWidth: rect.width,
|
|
74
|
+
sliderHeight: rect.height
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
#notifyAfterChange() {
|
|
78
|
+
this._adapter.notifyAfterChange(this.normalizeValue(this.getState("currentValue")));
|
|
79
|
+
}
|
|
80
|
+
/** A controlled value only moves through the value prop */
|
|
81
|
+
#moveHandle(nextValue, callback) {
|
|
82
|
+
this.syncIsInRenderTree();
|
|
83
|
+
if (!this.getState("isInRenderTree")) return;
|
|
84
|
+
if (isEqual(this.normalizeValue(this.getState("currentValue")), nextValue)) return;
|
|
85
|
+
if (this._isControlledComponent()) return;
|
|
86
|
+
this.setState({ currentValue: nextValue }, callback);
|
|
87
|
+
}
|
|
88
|
+
#commitClick(nextValue) {
|
|
89
|
+
this._adapter.notifyChange(nextValue);
|
|
90
|
+
if (this._isControlledComponent()) return;
|
|
91
|
+
this.#moveHandle(nextValue, () => this.#notifyAfterChange());
|
|
92
|
+
}
|
|
93
|
+
#onHandleMove = (e) => {
|
|
94
|
+
if (this.#isOtherPointer(e)) return false;
|
|
95
|
+
handlePrevent(e);
|
|
96
|
+
const { chooseMovePos } = this.getStates();
|
|
97
|
+
const { vertical, disabled } = this.getProps();
|
|
98
|
+
if (disabled) return false;
|
|
99
|
+
this.onHandleEnter(chooseMovePos);
|
|
100
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
101
|
+
const pagePos = (vertical ? mousePos.y : mousePos.x) - this.#dragOffset;
|
|
102
|
+
if (this.getState("isDrag")) {
|
|
103
|
+
const nextValue = this.calculateOutputValue(pagePos, chooseMovePos === "min");
|
|
104
|
+
if (nextValue === void 0) return false;
|
|
105
|
+
this._adapter.notifyChange(nextValue);
|
|
106
|
+
this.#moveHandle(nextValue);
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
};
|
|
110
|
+
#onHandleUp = (e) => {
|
|
111
|
+
if (this.#isOtherPointer(e)) return false;
|
|
112
|
+
this._adapter.notifyMouseUp(e);
|
|
113
|
+
handlePrevent(e);
|
|
114
|
+
this.#unbindDragEvents();
|
|
115
|
+
const wasDragging = this.getState("isDrag");
|
|
116
|
+
this.setState({
|
|
117
|
+
isDrag: false,
|
|
118
|
+
activeHandle: ""
|
|
119
|
+
});
|
|
120
|
+
if (this.getProp("disabled") && !wasDragging) return false;
|
|
121
|
+
this.#notifyAfterChange();
|
|
122
|
+
return true;
|
|
123
|
+
};
|
|
124
|
+
valueFormatIsCorrect(value) {
|
|
125
|
+
if (Array.isArray(value)) return typeof value[0] === "number" && typeof value[1] === "number";
|
|
126
|
+
else return typeof value === "number";
|
|
127
|
+
}
|
|
128
|
+
handleMousePos(clientX, clientY) {
|
|
129
|
+
const parentRect = this.#getParentRect();
|
|
130
|
+
const parentX = parentRect ? parentRect.left : 0;
|
|
131
|
+
const parentY = parentRect ? parentRect.top : 0;
|
|
132
|
+
return {
|
|
133
|
+
x: clientX - parentX,
|
|
134
|
+
y: clientY - parentY
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Clamps a pointer position to the slider's start and end
|
|
139
|
+
*/
|
|
140
|
+
checkMeetMinMax(position) {
|
|
141
|
+
const { vertical, verticalReverse } = this._adapter.getProps();
|
|
142
|
+
const isRTL = this._adapter.getContext("direction") === "rtl" && !vertical;
|
|
143
|
+
const { sliderX, sliderY, sliderWidth, sliderHeight } = this.#getSliderLengths();
|
|
144
|
+
const len = vertical ? sliderHeight : sliderWidth;
|
|
145
|
+
let startPos;
|
|
146
|
+
if (vertical && verticalReverse) startPos = sliderY + len;
|
|
147
|
+
else if (isRTL) startPos = sliderX + len;
|
|
148
|
+
else startPos = vertical ? sliderY : sliderX;
|
|
149
|
+
let endPos;
|
|
150
|
+
if (vertical && verticalReverse) endPos = sliderY;
|
|
151
|
+
else if (isRTL) endPos = sliderX;
|
|
152
|
+
else endPos = vertical ? sliderY + sliderHeight : sliderX + sliderWidth;
|
|
153
|
+
if (vertical && verticalReverse || isRTL) {
|
|
154
|
+
if (position >= startPos) position = startPos;
|
|
155
|
+
else if (position <= endPos) position = endPos;
|
|
156
|
+
} else if (position <= startPos) position = startPos;
|
|
157
|
+
else if (position >= endPos) position = endPos;
|
|
158
|
+
return position;
|
|
159
|
+
}
|
|
160
|
+
/** Position to value snapped to step; false when nothing changes or the slider has no layout */
|
|
161
|
+
transPosToValue(mousePos, isMin) {
|
|
162
|
+
const pos = this.checkMeetMinMax(mousePos);
|
|
163
|
+
const { currentValue } = this._adapter.getStates();
|
|
164
|
+
const { range, vertical, step, verticalReverse, min, max } = this._adapter.getProps();
|
|
165
|
+
const isRTL = this._adapter.getContext("direction") === "rtl" && !vertical;
|
|
166
|
+
const { sliderX, sliderY, sliderWidth, sliderHeight } = this.#getSliderLengths();
|
|
167
|
+
const startPos = vertical ? sliderY : sliderX;
|
|
168
|
+
const len = vertical ? sliderHeight : sliderWidth;
|
|
169
|
+
if (!len) return false;
|
|
170
|
+
let stepValue;
|
|
171
|
+
if (vertical && verticalReverse || isRTL) stepValue = (startPos + len - pos) / len * (max - min) + min;
|
|
172
|
+
else stepValue = (pos - startPos) / len * (max - min) + min;
|
|
173
|
+
let compareValue;
|
|
174
|
+
if (range) compareValue = isMin ? currentValue[0] : currentValue[1];
|
|
175
|
+
else compareValue = currentValue;
|
|
176
|
+
const stepSize = step > 0 ? step : 1;
|
|
177
|
+
stepValue = this.normalizeValue(Math.round((stepValue - min) / stepSize) * stepSize + min);
|
|
178
|
+
if (stepValue > max) stepValue = this.normalizeValue(stepValue - stepSize);
|
|
179
|
+
if (range && stepValue !== compareValue) return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
180
|
+
else if (!range && stepValue !== compareValue) return stepValue;
|
|
181
|
+
else return false;
|
|
182
|
+
}
|
|
183
|
+
transValueToPos(value) {
|
|
184
|
+
const { vertical, range, verticalReverse, min, max } = this._adapter.getProps();
|
|
185
|
+
const isRTL = this._adapter.getContext("direction") === "rtl" && !vertical;
|
|
186
|
+
const { sliderX, sliderY, sliderWidth, sliderHeight } = this.#getSliderLengths();
|
|
187
|
+
const startPos = vertical ? sliderY : sliderX;
|
|
188
|
+
const len = vertical ? sliderHeight : sliderWidth;
|
|
189
|
+
const transSingle = (val) => {
|
|
190
|
+
const percent = (val - min) / (max - min);
|
|
191
|
+
if (vertical && verticalReverse || isRTL) return startPos + len - percent * len;
|
|
192
|
+
return startPos + percent * len;
|
|
193
|
+
};
|
|
194
|
+
if (range) return [transSingle(value[0]), transSingle(value[1])];
|
|
195
|
+
else return transSingle(value);
|
|
196
|
+
}
|
|
197
|
+
normalizeValue(inputValue) {
|
|
198
|
+
const { step, min } = this.getProps();
|
|
199
|
+
return SliderFoundation.normalizeValue(step, min, this.getState("activeHandle"), inputValue);
|
|
200
|
+
}
|
|
201
|
+
calculateOutputValue(position, isMin) {
|
|
202
|
+
const moveValue = this.transPosToValue(position, isMin);
|
|
203
|
+
if (moveValue === false) return;
|
|
204
|
+
return this.normalizeValue(moveValue);
|
|
205
|
+
}
|
|
206
|
+
checkWhichHandle(pagePos) {
|
|
207
|
+
const { currentValue } = this._adapter.getStates();
|
|
208
|
+
const currentPos = this.transValueToPos(currentValue);
|
|
209
|
+
if (!Array.isArray(currentPos)) return true;
|
|
210
|
+
return Math.abs(pagePos - currentPos[0]) <= Math.abs(pagePos - currentPos[1]);
|
|
211
|
+
}
|
|
212
|
+
static getInitialState(props) {
|
|
213
|
+
return {
|
|
214
|
+
currentValue: (props.value !== void 0 ? props.value : props.defaultValue) ?? (props.range ? [props.min, props.min] : props.min),
|
|
215
|
+
activeHandle: "",
|
|
216
|
+
chooseMovePos: "",
|
|
217
|
+
isDrag: false,
|
|
218
|
+
showBoundary: false,
|
|
219
|
+
isInRenderTree: true,
|
|
220
|
+
focusVisibleHandle: ""
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Percentages of the current value; they increase with value whatever the visual direction.
|
|
225
|
+
*/
|
|
226
|
+
static getMinAndMaxPercent({ range, min, max }, value) {
|
|
227
|
+
const minPercent = range ? (value[0] - min) / (max - min) : (value - min) / (max - min);
|
|
228
|
+
const maxPercent = range ? (value[1] - min) / (max - min) : 1;
|
|
229
|
+
return {
|
|
230
|
+
min: clamp(minPercent, 0, 1),
|
|
231
|
+
max: clamp(maxPercent, 0, 1)
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Whether each handle shows its tooltip, and the tooltip contents
|
|
236
|
+
*/
|
|
237
|
+
static computeHandleVisibleVal({ tooltipVisible, tipFormatter: formatter, range, step, min }, { activeHandle, currentValue, isInRenderTree }) {
|
|
238
|
+
const visible = tooltipVisible && isInRenderTree;
|
|
239
|
+
const output = (value) => SliderFoundation.normalizeValue(step, min, activeHandle, value);
|
|
240
|
+
const minValue = range ? output(currentValue[0]) : output(currentValue);
|
|
241
|
+
const maxValue = range ? output(currentValue[1]) : null;
|
|
242
|
+
const tipChildren = formatter ? {
|
|
243
|
+
min: formatter(minValue),
|
|
244
|
+
max: range ? formatter(maxValue) : null
|
|
245
|
+
} : {
|
|
246
|
+
min: minValue,
|
|
247
|
+
max: maxValue
|
|
248
|
+
};
|
|
249
|
+
const tipVisible = {
|
|
250
|
+
min: false,
|
|
251
|
+
max: false
|
|
252
|
+
};
|
|
253
|
+
if (visible) {
|
|
254
|
+
tipVisible.min = true;
|
|
255
|
+
tipVisible.max = true;
|
|
256
|
+
} else if (typeof visible === "undefined" && formatter) {
|
|
257
|
+
if (activeHandle === "min") tipVisible.min = true;
|
|
258
|
+
else if (activeHandle === "max") tipVisible.max = true;
|
|
259
|
+
}
|
|
260
|
+
return {
|
|
261
|
+
tipVisible,
|
|
262
|
+
tipChildren
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Whether a mark is highlighted: 'active' inside the included track, false outside min and max
|
|
267
|
+
*/
|
|
268
|
+
static isMarkActive({ min, max, range, included }, currentValue, mark) {
|
|
269
|
+
if (mark >= min && mark <= max) {
|
|
270
|
+
if (range) return (mark > currentValue[1] || mark < currentValue[0]) && included ? "unActive" : "active";
|
|
271
|
+
return mark <= currentValue && included ? "active" : "unActive";
|
|
272
|
+
}
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Rounds to the larger decimal count of step and min; crossed range ends collapse onto the active handle's end
|
|
277
|
+
*/
|
|
278
|
+
static normalizeValue(step, min, activeHandle, inputValue) {
|
|
279
|
+
const countDecimals = (num) => {
|
|
280
|
+
const [mantissa, exponent = "0"] = String(num).split("e");
|
|
281
|
+
return Math.max(0, (mantissa.split(".")[1]?.length ?? 0) - Number(exponent));
|
|
282
|
+
};
|
|
283
|
+
const multipler = Math.pow(10, Math.max(countDecimals(step), countDecimals(min)));
|
|
284
|
+
const transWay = (value) => Math.round(value * multipler) / multipler;
|
|
285
|
+
if (Array.isArray(inputValue)) {
|
|
286
|
+
const min = transWay(inputValue[0]);
|
|
287
|
+
const max = transWay(inputValue[1]);
|
|
288
|
+
if (min > max) return activeHandle === "min" ? [max, max] : [min, min];
|
|
289
|
+
return [min, max];
|
|
290
|
+
}
|
|
291
|
+
return transWay(inputValue);
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Range handles must not share one name and the wrapper has no role for a group label: aria-label gets the end
|
|
295
|
+
* appended; aria-labelledby is followed by the handle itself (APG multi-thumb self-reference). A disabled handle
|
|
296
|
+
* keeps the caller's name: the native disabled already tells the state, and a fallback aria-label would hide the
|
|
297
|
+
* name a <label for> gives.
|
|
298
|
+
*/
|
|
299
|
+
static getHandleA11y({ range, pos, id, ariaLabel, ariaLabelledby, generatedId, endName }) {
|
|
300
|
+
const ownId = pos === "min" ? id : void 0;
|
|
301
|
+
const selfId = range && ariaLabelledby ? ownId ?? `${generatedId}-${pos}` : ownId;
|
|
302
|
+
return {
|
|
303
|
+
id: selfId,
|
|
304
|
+
ariaLabel: !range ? ariaLabel : ariaLabelledby || !ariaLabel ? endName : `${ariaLabel} ${endName}`,
|
|
305
|
+
ariaLabelledby: range && ariaLabelledby ? `${ariaLabelledby} ${selfId}` : ariaLabelledby
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
init() {
|
|
309
|
+
this.#checkCurrentValue();
|
|
310
|
+
this.#dragOffset = 0;
|
|
311
|
+
}
|
|
312
|
+
destroy() {
|
|
313
|
+
this.#unbindDragEvents();
|
|
314
|
+
}
|
|
315
|
+
/** An event handler, so the tooltips follow a container that was hidden */
|
|
316
|
+
syncIsInRenderTree = () => {
|
|
317
|
+
const slider = this._adapter.getSliderNode();
|
|
318
|
+
const isInRenderTree = Boolean(slider && (slider.offsetWidth || slider.offsetHeight || slider.getClientRects().length));
|
|
319
|
+
if (isInRenderTree !== this.getState("isInRenderTree")) this.setState({ isInRenderTree });
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Syncs a changed value prop, clamped to min and max
|
|
323
|
+
*/
|
|
324
|
+
handleValueChange(nextValue) {
|
|
325
|
+
if (!this.valueFormatIsCorrect(nextValue)) return;
|
|
326
|
+
this.setState({ currentValue: this.#clampToRange(nextValue) });
|
|
327
|
+
}
|
|
328
|
+
/** A value prop back to undefined (a Form reset) returns to the default position */
|
|
329
|
+
resetValue() {
|
|
330
|
+
const { defaultValue, range, min } = this.getProps();
|
|
331
|
+
const fallback = range ? [min, min] : min;
|
|
332
|
+
this.setState({ currentValue: this.valueFormatIsCorrect(defaultValue) ? defaultValue : fallback });
|
|
333
|
+
this.#checkCurrentValue();
|
|
334
|
+
}
|
|
335
|
+
onHandleDown(e, pos) {
|
|
336
|
+
if (isSecondaryPress(e)) return false;
|
|
337
|
+
this.#bindDragEvents(e.pointerId);
|
|
338
|
+
try {
|
|
339
|
+
e.currentTarget?.setPointerCapture?.(e.pointerId);
|
|
340
|
+
} catch {}
|
|
341
|
+
const { vertical, disabled } = this.getProps();
|
|
342
|
+
if (disabled) return false;
|
|
343
|
+
this.setState({
|
|
344
|
+
isDrag: true,
|
|
345
|
+
chooseMovePos: pos
|
|
346
|
+
});
|
|
347
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
348
|
+
const pointerPos = vertical ? mousePos.y : mousePos.x;
|
|
349
|
+
this.#dragOffset = pointerPos - this.#getHandleCenterPosition(vertical, e.currentTarget);
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
352
|
+
onHandleEnter(pos) {
|
|
353
|
+
const { activeHandle } = this.getStates();
|
|
354
|
+
if (!this.getProp("disabled") && !activeHandle && pos !== activeHandle) this.setState({ activeHandle: pos });
|
|
355
|
+
}
|
|
356
|
+
onHandleLeave() {
|
|
357
|
+
if (!this.getState("isDrag")) this.setState({ activeHandle: "" });
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Both native inputs span min to max, so a range handle is stopped at the other one here
|
|
361
|
+
*/
|
|
362
|
+
handleInputChange(value, pos) {
|
|
363
|
+
if (this.getProp("disabled")) return;
|
|
364
|
+
const { currentValue } = this.getStates();
|
|
365
|
+
let outputValue = value;
|
|
366
|
+
if (Array.isArray(currentValue)) outputValue = pos === "min" ? [Math.min(value, currentValue[1]), currentValue[1]] : [currentValue[0], Math.max(value, currentValue[0])];
|
|
367
|
+
if (!isEqual(currentValue, outputValue)) {
|
|
368
|
+
if (!this._isControlledComponent()) this.setState({ currentValue: outputValue });
|
|
369
|
+
this._adapter.notifyChange(outputValue);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* A value key stays with the slider unless the consumer's handler already prevented it. Page, Home and End keep
|
|
374
|
+
* the native range's change; arrows step here, since engines map them differently over a vertical or RTL range
|
|
375
|
+
* (Chrome follows the visual direction, Firefox not when vertical, Safari in neither case). The arrow pointing
|
|
376
|
+
* towards max increases; the cross-axis arrow follows Up and Right.
|
|
377
|
+
*/
|
|
378
|
+
handleKeyDown(event, pos) {
|
|
379
|
+
if (event.defaultPrevented || !VALUE_KEYS.includes(event.key) || hasModifier(event)) return;
|
|
380
|
+
event.stopPropagation();
|
|
381
|
+
const { vertical, verticalReverse, step, min, max } = this.getProps();
|
|
382
|
+
const increase = [vertical ? verticalReverse ? "ArrowUp" : "ArrowDown" : this._adapter.getContext("direction") === "rtl" ? "ArrowLeft" : "ArrowRight", vertical ? "ArrowRight" : "ArrowUp"];
|
|
383
|
+
const opposite = {
|
|
384
|
+
ArrowUp: "ArrowDown",
|
|
385
|
+
ArrowDown: "ArrowUp",
|
|
386
|
+
ArrowLeft: "ArrowRight",
|
|
387
|
+
ArrowRight: "ArrowLeft"
|
|
388
|
+
};
|
|
389
|
+
const delta = increase.includes(event.key) ? 1 : increase.map((key) => opposite[key]).includes(event.key) ? -1 : 0;
|
|
390
|
+
if (!delta) return;
|
|
391
|
+
event.preventDefault();
|
|
392
|
+
const { currentValue } = this.getStates();
|
|
393
|
+
const value = Array.isArray(currentValue) ? currentValue[pos === "min" ? 0 : 1] : currentValue;
|
|
394
|
+
const next = this.normalizeValue(value + delta * (step > 0 ? step : 1));
|
|
395
|
+
if (next >= min && next <= max) this.handleInputChange(next, pos);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Releasing a value key ends the change, like releasing the mouse
|
|
399
|
+
*/
|
|
400
|
+
handleKeyUp(event) {
|
|
401
|
+
if (VALUE_KEYS.includes(event.key) && !hasModifier(event)) this.#onHandleUp(event);
|
|
402
|
+
}
|
|
403
|
+
onFocus(e, pos) {
|
|
404
|
+
if (this.#noTooltip()) return;
|
|
405
|
+
if (e.target.matches(":focus-visible")) this.setState({ focusVisibleHandle: pos });
|
|
406
|
+
}
|
|
407
|
+
onBlur(pos) {
|
|
408
|
+
if (!this.#noTooltip() && this.getState("focusVisibleHandle") === pos) this.setState({ focusVisibleHandle: "" });
|
|
409
|
+
}
|
|
410
|
+
handleWrapClick = (e) => {
|
|
411
|
+
if (this.getState("isDrag") || this.getProp("disabled")) return;
|
|
412
|
+
const { vertical } = this.getProps();
|
|
413
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
414
|
+
const position = vertical ? mousePos.y : mousePos.x;
|
|
415
|
+
const isMin = this.checkWhichHandle(position);
|
|
416
|
+
const nextValue = this.calculateOutputValue(position, isMin);
|
|
417
|
+
if (nextValue === void 0) return;
|
|
418
|
+
this.#commitClick(nextValue);
|
|
419
|
+
};
|
|
420
|
+
/** A mark label is a wide target: it selects the mark's own value, not the value under the pointer */
|
|
421
|
+
handleMarkClick(markValue) {
|
|
422
|
+
if (this.getState("isDrag") || this.getProp("disabled")) return;
|
|
423
|
+
const { range } = this.getProps();
|
|
424
|
+
const currentValue = this.getState("currentValue");
|
|
425
|
+
let nextValue = this.normalizeValue(markValue);
|
|
426
|
+
if (range) {
|
|
427
|
+
const [markPos] = this.transValueToPos([markValue, markValue]);
|
|
428
|
+
const isMin = this.checkWhichHandle(markPos);
|
|
429
|
+
nextValue = this.normalizeValue(isMin ? [markValue, currentValue[1]] : [currentValue[0], markValue]);
|
|
430
|
+
}
|
|
431
|
+
if (isEqual(this.normalizeValue(currentValue), nextValue)) return;
|
|
432
|
+
this.#commitClick(nextValue);
|
|
433
|
+
}
|
|
434
|
+
handleWrapperEnter() {
|
|
435
|
+
this.setState({ showBoundary: true });
|
|
436
|
+
}
|
|
437
|
+
handleWrapperLeave() {
|
|
438
|
+
this.setState({ showBoundary: false });
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
export { SliderFoundation as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use 'semi:theme' as *;
|
|
2
|
+
@use 'variables' as *;
|
|
3
|
+
@use 'animation' as *;
|
|
4
|
+
|
|
5
|
+
$module: #{$prefix}-slider;
|
|
6
|
+
|
|
7
|
+
// the vertical slider is positioned by top and does not mirror
|
|
8
|
+
.#{$module}:dir(rtl) {
|
|
9
|
+
direction: rtl;
|
|
10
|
+
|
|
11
|
+
// handles and marks are positioned from the right, so the centering translate flips
|
|
12
|
+
.#{$module}-handle {
|
|
13
|
+
transform: $transform_scale-slider_handle translateX(50%) translateY($spacing-slider_handle-translateY);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.#{$module}-mark {
|
|
17
|
+
transform: translate(50%, 0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.#{$module}-mark-reverse {
|
|
21
|
+
transform: translate(50%, 0) rotate(-180deg);
|
|
22
|
+
}
|
|
23
|
+
}
|