@v-miniapp/ui-react 1.0.59 → 1.0.71
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/dist/_virtual/_cloneBuffer.js +4 -0
- package/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/_nodeUtil.js +4 -0
- package/dist/_virtual/cloneDeepWith.js +7 -0
- package/dist/_virtual/isBuffer.js +4 -0
- package/dist/_virtual/isObject.js +7 -0
- package/dist/_virtual/isSameOrAfter.js +7 -0
- package/dist/_virtual/isSameOrAfter2.js +4 -0
- package/dist/_virtual/isSameOrBefore.js +7 -0
- package/dist/_virtual/isSameOrBefore2.js +4 -0
- package/dist/_virtual/merge.js +7 -0
- package/dist/_virtual/omit.js +7 -0
- package/dist/_virtual/pick.js +7 -0
- package/dist/_virtual/throttle.js +7 -0
- package/dist/assets/icons/loader.svg.js +5 -0
- package/dist/assets/icons/placeholder.svg.js +5 -0
- package/dist/assets/images/broken-image.svg.js +5 -0
- package/dist/assets/images/default-error.png.js +4 -0
- package/dist/assets/images/image.svg.js +5 -0
- package/dist/components/ai-app/ai-app.d.ts +7 -0
- package/dist/components/ai-app/ai-app.js +20 -0
- package/dist/components/ai-app/index.d.ts +1 -0
- package/dist/components/alert/alert.js +76 -0
- package/dist/components/app/app.d.ts +1 -6
- package/dist/components/app/app.js +78 -0
- package/dist/components/app/app.store.d.ts +6 -0
- package/dist/components/app/app.store.js +8 -0
- package/dist/components/app/bottom-tab-bar-layout/hook.js +36 -0
- package/dist/components/app/bottom-tab-bar-layout/index.js +38 -0
- package/dist/components/app/bottom-tab-bar-layout/store.js +54 -0
- package/dist/components/app/data-theme.js +29 -0
- package/dist/components/app/navigation-bar-layout/hook.js +39 -0
- package/dist/components/app/navigation-bar-layout/index.js +46 -0
- package/dist/components/app/navigation-bar-layout/store.js +60 -0
- package/dist/components/app/page-layout/hook.js +62 -0
- package/dist/components/app/page-layout/index.js +21 -0
- package/dist/components/app/page-layout/store.js +52 -0
- package/dist/components/avatar/avatar.js +79 -0
- package/dist/components/badge/badge.js +40 -0
- package/dist/components/bottom-tab-bar/bottom-tab-bar.js +90 -0
- package/dist/components/button/button.const.js +7 -0
- package/dist/components/button/button.js +62 -0
- package/dist/components/calendar/calendar-range-sheet.js +66 -0
- package/dist/components/calendar/calendar-single-sheet.js +64 -0
- package/dist/components/calendar/calendar.js +16 -0
- package/dist/components/calendar/default-render.js +16 -0
- package/dist/components/calendar/range-picker.js +301 -0
- package/dist/components/calendar/single-picker.js +186 -0
- package/dist/components/calendar/utils.js +25 -0
- package/dist/components/carousel/carousel.js +47 -0
- package/dist/components/carousel/use-carousel.js +54 -0
- package/dist/components/checkbox/check-icon.js +23 -0
- package/dist/components/checkbox/checkbox.js +131 -0
- package/dist/components/checkbox/indeterminate-icon.js +20 -0
- package/dist/components/chip/chip.js +80 -0
- package/dist/components/date-field/date-field-range.js +153 -0
- package/dist/components/date-field/date-field.js +100 -0
- package/dist/components/date-field/input.js +53 -0
- package/dist/components/date-picker/date-picker-base.js +214 -0
- package/dist/components/date-picker/date-picker-item.js +69 -0
- package/dist/components/date-picker/date-picker-sheet.js +54 -0
- package/dist/components/date-picker/date-picker.constant.js +11 -0
- package/dist/components/date-picker/date-picker.js +76 -0
- package/dist/components/date-picker/date-picker.utils.js +58 -0
- package/dist/components/dialog/dialog.js +115 -0
- package/dist/components/dropdown/dropdown-base.js +22 -0
- package/dist/components/dropdown/dropdown.js +148 -0
- package/dist/components/error/error-boundary.js +28 -0
- package/dist/components/error/error.js +25 -0
- package/dist/components/icon/icon-mapping.js +260 -0
- package/dist/components/icon/icon.js +54 -0
- package/dist/components/image/image.js +70 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/input-wrapper/input-wrapper.js +153 -0
- package/dist/components/label/label.js +58 -0
- package/dist/components/layout/page-loading.js +39 -0
- package/dist/components/layout/page.js +103 -0
- package/dist/components/list-item/list-item.js +36 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts +1 -4
- package/dist/components/navigation-bar/navigation-bar.js +106 -0
- package/dist/components/number-field/number-field.js +162 -0
- package/dist/components/option-item/option-item.js +56 -0
- package/dist/components/pagination/pagination.js +20 -0
- package/dist/components/pull-to-refresh/pull-to-refresh.js +120 -0
- package/dist/components/radio/radio.js +72 -0
- package/dist/components/rating/rating.js +62 -0
- package/dist/components/rating/star.js +22 -0
- package/dist/components/search-field/search-field.js +40 -0
- package/dist/components/section/section-content.js +10 -0
- package/dist/components/section/section-title.js +32 -0
- package/dist/components/section/section.js +21 -0
- package/dist/components/seo/seo.js +18 -0
- package/dist/components/sheet/sheet-body.js +25 -0
- package/dist/components/sheet/sheet-footer.js +11 -0
- package/dist/components/sheet/sheet-header.js +52 -0
- package/dist/components/sheet/sheet.js +72 -0
- package/dist/components/skeleton/skeleton.js +50 -0
- package/dist/components/switch/switch.js +68 -0
- package/dist/components/tab-bar/tab-bar.js +130 -0
- package/dist/components/tab-bar/tab.js +55 -0
- package/dist/components/text-area/text-area.js +75 -0
- package/dist/components/text-field/text-field.js +63 -0
- package/dist/components/toast/toast-provider.js +45 -0
- package/dist/components/toast/toast.js +66 -0
- package/dist/components/toast/toast.store.js +35 -0
- package/dist/components/tooltip/tooltip.js +43 -0
- package/dist/components/typography/typography.js +28 -0
- package/dist/components/uploader/helper.js +21 -0
- package/dist/components/uploader/uploader.js +93 -0
- package/dist/components/visibility-sensor/visibility-sensor.js +17 -0
- package/dist/docs/ui-react/icon-list-grid.d.ts +1 -0
- package/dist/external/index.js +13357 -13497
- package/dist/external/styles.css +1 -1
- package/dist/hooks/use-custom-icon-event.js +16 -0
- package/dist/hooks/use-settings-changed.js +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +139 -7488
- package/dist/locales/en.json.js +30 -0
- package/dist/locales/index.d.ts +2 -0
- package/dist/locales/index.js +10 -0
- package/dist/locales/vi.json.js +30 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js +18 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrBefore.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_DataView.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Hash.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_ListCache.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Map.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_MapCache.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Promise.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Set.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Stack.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Symbol.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Uint8Array.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_WeakMap.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_apply.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayEach.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayFilter.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayLikeKeys.js +26 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayMap.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayPush.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignMergeValue.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignValue.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assocIndexOf.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssign.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignIn.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignValue.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseClone.js +70 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseCreate.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseFlatten.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseFor.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGet.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGetAllKeys.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGetTag.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseHasIn.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsArguments.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsMap.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsNative.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsSet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsTypedArray.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseKeys.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseKeysIn.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseMerge.js +27 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseMergeDeep.js +38 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePick.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePickBy.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseRest.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSet.js +31 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSetToString.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSlice.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseTimes.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseToString.js +24 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseTrim.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseUnary.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseUnset.js +34 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_castPath.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneArrayBuffer.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneBuffer.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneDataView.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneRegExp.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneSymbol.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneTypedArray.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_copyArray.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_copyObject.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_copySymbols.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_copySymbolsIn.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_coreJsData.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_createAssigner.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_createBaseFor.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_customOmitClone.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_defineProperty.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_flatRest.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_freeGlobal.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getAllKeys.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getAllKeysIn.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getMapData.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getNative.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getPrototype.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getRawTag.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getSymbols.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getSymbolsIn.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getTag.js +33 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getValue.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hasPath.js +26 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashClear.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashDelete.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashGet.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashHas.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashSet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_initCloneArray.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_initCloneByTag.js +48 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_initCloneObject.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isFlattenable.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isIndex.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isIterateeCall.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isKey.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isKeyable.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isMasked.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isPrototype.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheClear.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheDelete.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheGet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheHas.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheSet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheClear.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheDelete.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheGet.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheHas.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheSet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_memoizeCapped.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nativeCreate.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nativeKeys.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nativeKeysIn.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nodeUtil.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_objectToString.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overArg.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overRest.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_parent.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_root.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_safeGet.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToString.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_shortOut.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackClear.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackDelete.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackGet.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackHas.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackSet.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stringToPath.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_toKey.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_toSource.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_trimmedEndIndex.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/cloneDeepWith.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/constant.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/debounce.js +60 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/eq.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/flatten.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/hasIn.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/identity.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArguments.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArray.js +10 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArrayLike.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArrayLikeObject.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isBuffer.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isFunction.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isLength.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isMap.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObject.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObjectLike.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isPlainObject.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isSet.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isSymbol.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isTypedArray.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/keys.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/keysIn.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/last.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/memoize.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/merge.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/now.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/omit.js +29 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/pick.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/stubArray.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/stubFalse.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/throttle.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toNumber.js +28 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toPlainObject.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toString.js +14 -0
- package/dist/styles.css +1 -1
- package/dist/utils/bound.js +7 -0
- package/dist/utils/can-use-dom.js +4 -0
- package/dist/utils/classname.js +6 -0
- package/dist/utils/colors.gen.js +371 -0
- package/dist/utils/colors.js +8 -0
- package/dist/utils/convert-px.js +14 -0
- package/dist/utils/date.d.ts +2 -1
- package/dist/utils/date.js +9 -0
- package/dist/utils/deep-clone.js +10 -0
- package/dist/utils/dev-log.js +7 -0
- package/dist/utils/get-scroll-parent.js +20 -0
- package/dist/utils/is-dev.js +4 -0
- package/dist/utils/rubberband.js +11 -0
- package/dist/utils/sleep.js +4 -0
- package/dist/utils/supports-passive.js +15 -0
- package/dist/utils/to-css-length.js +6 -0
- package/dist/vsf/choose-image.js +14 -0
- package/dist-storybook/assets/AIApp-C4keJkW8.js +37 -0
- package/dist-storybook/assets/{App-Dp1UG-xp.js → App-BkiRuUOF.js} +1 -1
- package/dist-storybook/assets/Color-6BZIO3FS-EdXZe4iv.js +1 -0
- package/dist-storybook/assets/{DEEPLINK-cjgFMuRJ.js → DEEPLINK-CvpIbZVm.js} +1 -1
- package/dist-storybook/assets/DocsRenderer-LL677BLK-Ch7ovClC.js +2 -0
- package/dist-storybook/assets/{EVENTS-BY66PjI7.js → EVENTS-Bnl2ehlm.js} +1 -1
- package/dist-storybook/assets/{GETTING_STARTED-BiQMvjvo.js → GETTING_STARTED-BYcN9hg3.js} +1 -1
- package/dist-storybook/assets/{GETTING_STARTED-580o-9Mx.js → GETTING_STARTED-BmHWFQQE.js} +1 -1
- package/dist-storybook/assets/GETTING_STARTED-C1AOB25Z.js +45 -0
- package/dist-storybook/assets/{GETTING_STARTED-CIVMqKZW.js → GETTING_STARTED-CBY9dL2_.js} +1 -1
- package/dist-storybook/assets/ICON-BaZgXbtw.js +6 -0
- package/dist-storybook/assets/ICON-CT1pTB1A.js +6 -0
- package/dist-storybook/assets/{INFINITE_SCROLL-BbeR5HeP.js → INFINITE_SCROLL-BJeWhgO7.js} +1 -1
- package/dist-storybook/assets/{LocalesProvider-CMlmwAyY.js → LocalesProvider-CQEwtoq3.js} +1 -1
- package/dist-storybook/assets/{MIGRATE_DARKMODE_TO_THEME-CBDyZyg2.js → MIGRATE_DARKMODE_TO_THEME-DCxXgvQC.js} +1 -1
- package/dist-storybook/assets/{MIGRATION_GUIDE-FZyRWI-B.js → MIGRATION_GUIDE-BN_V-xNj.js} +1 -1
- package/dist-storybook/assets/OVERVIEW-AI-CLWBzviY.js +35 -0
- package/dist-storybook/assets/{OVERVIEW-C9_6gX5Q.js → OVERVIEW-Byly3lQV.js} +1 -1
- package/dist-storybook/assets/{Router-B5U8bubH.js → Router-CO6rjSXr.js} +1 -1
- package/dist-storybook/assets/{TAILWIND_INTEGRATION-BJdy5DAv.js → TAILWIND_INTEGRATION-CpN4_fSu.js} +1 -1
- package/dist-storybook/assets/{THEME-CRbvH7KT.js → THEME-B9Y39f9D.js} +1 -1
- package/dist-storybook/assets/WithTooltip-65CFNBJE-D6J_7FjK.js +9 -0
- package/dist-storybook/assets/{alert.stories-D0X5wUHk.js → alert.stories-CUItfPLn.js} +12 -12
- package/dist-storybook/assets/app.store-BJVKVv1J.js +1 -0
- package/dist-storybook/assets/avatar.stories-8_vV7Bb0.js +136 -0
- package/dist-storybook/assets/{axe-BHGdSCoA.js → axe-4EaTvypG.js} +13 -13
- package/dist-storybook/assets/badge-Gh2kTOE3.js +1 -0
- package/dist-storybook/assets/{badge.stories-BEFNaUA1.js → badge.stories-BXGAtgaV.js} +3 -3
- package/dist-storybook/assets/blocks-CB7UwFa4.js +758 -0
- package/dist-storybook/assets/bottom-tab-bar.stories-OrY-k1sb.js +280 -0
- package/dist-storybook/assets/button-BLW8SOpg.js +1 -0
- package/dist-storybook/assets/{button.stories-DgYDJ6x7.js → button.stories--0kpp_af.js} +3 -3
- package/dist-storybook/assets/calendar-ySr-9cXG.js +1 -0
- package/dist-storybook/assets/{calendar.stories-IVvRAjWN.js → calendar.stories-4MQj1nsX.js} +1 -1
- package/dist-storybook/assets/carousel.stories-CMtljvBR.js +253 -0
- package/dist-storybook/assets/checkbox.stories-xYjsVg2X.js +201 -0
- package/dist-storybook/assets/{chip.stories-D7E6fdiV.js → chip.stories-DYEfUGq3.js} +12 -12
- package/dist-storybook/assets/classname-Bl5epEs-.js +1 -0
- package/dist-storybook/assets/client-CN8vOzuD.js +9 -0
- package/dist-storybook/assets/{date-B3PFMb6s.js → date-DWIyMGld.js} +1 -1
- package/dist-storybook/assets/date-field.stories-5Tlzdpvr.js +129 -0
- package/dist-storybook/assets/date-picker-DeB43YU4.js +1 -0
- package/dist-storybook/assets/{date-picker.stories-CIFgk4q_.js → date-picker.stories-Shn-MmVG.js} +1 -1
- package/dist-storybook/assets/dialog.stories-DeNKN0oJ.js +212 -0
- package/dist-storybook/assets/dropdown.stories-Bqmu2_KM.js +449 -0
- package/dist-storybook/assets/{embla-carousel-react.esm-5D5fs7OQ.js → embla-carousel-react.esm-DOEAp-w3.js} +1 -1
- package/dist-storybook/assets/{en-Cs9O0XWn.js → en-IjeCvZ5U.js} +1 -1
- package/dist-storybook/assets/formatter-EIJCOSYU-DZLV30KU.js +1 -0
- package/dist-storybook/assets/icon-Cc9W858e.js +1 -0
- package/dist-storybook/assets/icon-list-grid-CSnpdoAW.js +1 -0
- package/dist-storybook/assets/{icon.stories-DWwbUUY-.js → icon.stories-DE484rTd.js} +3 -3
- package/dist-storybook/assets/iframe-BBKyXin_.css +1 -0
- package/dist-storybook/assets/iframe-Crg_lbde.js +1119 -0
- package/dist-storybook/assets/image-CB4oeTy-.js +9 -0
- package/dist-storybook/assets/{image.stories-BhZU057W.js → image.stories-BlYIb_Qu.js} +1 -1
- package/dist-storybook/assets/index-B24pfkXD.js +1 -0
- package/dist-storybook/assets/{index-cMNObl2z.js → index-CdnALcTP.js} +1 -1
- package/dist-storybook/assets/{index-EGt7xBnA.js → index-hDlmuyu2.js} +1 -1
- package/dist-storybook/assets/input-wrapper-Gd3QJKqj.js +1 -0
- package/dist-storybook/assets/label-zfqCJTGJ.js +22 -0
- package/dist-storybook/assets/{label.stories-CXJjdYf_.js → label.stories-C-MVt-cu.js} +3 -3
- package/dist-storybook/assets/matchers-5TDFFDYO-HJu_DfWo.js +14 -0
- package/dist-storybook/assets/navigation-bar.stories-CZ-y3eDE.js +136 -0
- package/dist-storybook/assets/number-field.stories-BA0FySSU.js +167 -0
- package/dist-storybook/assets/omit-CRXr8Lio.js +1 -0
- package/dist-storybook/assets/option-item-DFWc14Up.js +1 -0
- package/dist-storybook/assets/{option-item.stories-BvXoc8WX.js → option-item.stories-DqA-ydWX.js} +3 -3
- package/dist-storybook/assets/pagination-CjgiVNvu.js +1 -0
- package/dist-storybook/assets/{pagination.stories-_5qj2nTS.js → pagination.stories-BsKHvdF4.js} +4 -4
- package/dist-storybook/assets/{radio.stories-BNR-wwuw.js → radio.stories-CBmxZRxo.js} +10 -10
- package/dist-storybook/assets/{rating.stories-CI0LG0Qq.js → rating.stories-CcdFtcNH.js} +9 -9
- package/dist-storybook/assets/react-18-D2tl8ksm.js +1 -0
- package/dist-storybook/assets/{react-I9jCW2VV.js → react-DO0-owxu.js} +1 -1
- package/dist-storybook/assets/search-field-zl4ROLfn.js +1 -0
- package/dist-storybook/assets/{search-field.stories-CKXC6-Za.js → search-field.stories-DoclnxtC.js} +1 -1
- package/dist-storybook/assets/{section.stories-9vd48AgB.js → section.stories-Bqz_QgYp.js} +8 -8
- package/dist-storybook/assets/sheet-body-2dWL2AE5.js +1 -0
- package/dist-storybook/assets/sheet-footer-DuPhbVOb.js +1 -0
- package/dist-storybook/assets/{sheet.stories-C3gLIQsn.js → sheet.stories-CoXnt4LG.js} +4 -4
- package/dist-storybook/assets/skeleton-BVLpHxKT.js +1 -0
- package/dist-storybook/assets/{skeleton.stories-C0y1o1Y_.js → skeleton.stories-B-OfMZId.js} +3 -3
- package/dist-storybook/assets/{store-Ce3Ikv5g.js → store-BwIebEt6.js} +5 -5
- package/dist-storybook/assets/{switch.stories-BdWFln-M.js → switch.stories-D4PQjgbo.js} +9 -9
- package/dist-storybook/assets/syntaxhighlighter-ED5Y7EFY-BxRQp_WE.js +6 -0
- package/dist-storybook/assets/tab-bar.stories-BrcQMypS.js +164 -0
- package/dist-storybook/assets/{text-area.stories-DCt3RB3A.js → text-area.stories-Bpaw2_4A.js} +10 -10
- package/dist-storybook/assets/text-field-CqJG0bIl.js +1 -0
- package/dist-storybook/assets/{text-field.stories-Bqv7f948.js → text-field.stories-PQoP3DbL.js} +1 -1
- package/dist-storybook/assets/toast.stories-DmPy9T3m.js +209 -0
- package/dist-storybook/assets/{tooltip.stories-DDdsuU3U.js → tooltip.stories-Be_kIaDc.js} +8 -8
- package/dist-storybook/assets/typography-CMIMyivt.js +1 -0
- package/dist-storybook/assets/{typography.stories-BzCxaZQU.js → typography.stories-DSt5W_AG.js} +3 -3
- package/dist-storybook/assets/uploader.stories-C5CmeXEk.js +65 -0
- package/dist-storybook/assets/{use-app-pause-ClsUnndr.js → use-app-pause-_ycnhKwZ.js} +3 -3
- package/dist-storybook/assets/{use-app-resume-D_EcIvMd.js → use-app-resume-CWb2s-wo.js} +1 -1
- package/dist-storybook/assets/{use-bottom-tab-bar-BC1cz2uE.js → use-bottom-tab-bar--DRl-8c4.js} +1 -1
- package/dist-storybook/assets/{use-custom-icon-event-cUk4Md0Y.js → use-custom-icon-event-BXcRPkLg.js} +1 -1
- package/dist-storybook/assets/{use-did-hide-BmABiaUE.js → use-did-hide-LBcrwoUo.js} +1 -1
- package/dist-storybook/assets/{use-did-show-CQuySkkT.js → use-did-show-BXLstTgt.js} +1 -1
- package/dist-storybook/assets/{use-histories-CBm09Lno.js → use-histories-Cz7ncXaj.js} +1 -1
- package/dist-storybook/assets/{use-history-7yguNz6O.js → use-history-B_w6SPwr.js} +1 -1
- package/dist-storybook/assets/{use-language-DPyWMce2.js → use-language-D84C9QNT.js} +1 -1
- package/dist-storybook/assets/{use-load-more-KlDJZhj2.js → use-load-more-Bb9YFkAE.js} +1 -1
- package/dist-storybook/assets/{use-location-C7kE1yla.js → use-location-DnxJ5FvJ.js} +1 -1
- package/dist-storybook/assets/{use-navigate-BpIyvtwc.js → use-navigate-OLqoL3vR.js} +3 -3
- package/dist-storybook/assets/{use-navigation-bar-guzwhM_u.js → use-navigation-bar-D5BX6S-r.js} +15 -15
- package/dist-storybook/assets/{use-navigation-type-DOndDqQH.js → use-navigation-type-Cq7T35ur.js} +1 -1
- package/dist-storybook/assets/{use-page-layout-dO6ylI1b.js → use-page-layout-BrFRWwC6.js} +1 -1
- package/dist-storybook/assets/{use-page-scroll-CCG2d2Gb.js → use-page-scroll-BZ8XiPza.js} +1 -1
- package/dist-storybook/assets/{use-pull-to-refresh-lhumDu1H.js → use-pull-to-refresh-BEjtxiFn.js} +1 -1
- package/dist-storybook/assets/{use-settings-changed-Bt58DJ-c.js → use-settings-changed-UaQRSWAg.js} +1 -1
- package/dist-storybook/assets/{use-translate-Jhz6jTXo.js → use-translate-BO8E9Sde.js} +1 -1
- package/dist-storybook/iframe.html +58 -40
- package/dist-storybook/index.html +8 -16
- package/dist-storybook/index.json +1 -1
- package/dist-storybook/project.json +1 -1
- package/dist-storybook/sb-addons/a11y-2/manager-bundle.js +55 -3
- package/dist-storybook/sb-addons/docs-1/manager-bundle.js +1 -149
- package/dist-storybook/sb-addons/storybook-build-3/manager-bundle.js +19 -1
- package/dist-storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +93 -436
- package/dist-storybook/sb-manager/globals-runtime.js +73307 -65142
- package/dist-storybook/sb-manager/globals.js +6 -16
- package/dist-storybook/sb-manager/manager-stores.js +23 -0
- package/dist-storybook/sb-manager/runtime.js +17679 -10455
- package/dist-storybook/stories-data.json +91 -27
- package/dist-storybook/vite-inject-mocker-entry.js +2 -2
- package/package.json +5 -5
- package/dist-storybook/assets/Color-AVL7NMMY-XA8cFKdV.js +0 -1
- package/dist-storybook/assets/DocsRenderer-PQXLIZUC-D10-0Yfb.js +0 -2
- package/dist-storybook/assets/_baseClone-DQVxEhny.js +0 -1
- package/dist-storybook/assets/alert-CKwsuaPI.js +0 -1
- package/dist-storybook/assets/app-CTv8lFU3.js +0 -1
- package/dist-storybook/assets/avatar-rWcYGe6j.js +0 -1
- package/dist-storybook/assets/avatar.stories-8lrbhMma.js +0 -136
- package/dist-storybook/assets/badge-VcjGVEum.js +0 -1
- package/dist-storybook/assets/blocks-DKR3P4qW.js +0 -1243
- package/dist-storybook/assets/bottom-tab-bar-B6IAoRwz.js +0 -115
- package/dist-storybook/assets/bottom-tab-bar.stories-DXzLlO5o.js +0 -186
- package/dist-storybook/assets/button-DJH3RlJl.js +0 -1
- package/dist-storybook/assets/calendar-C4Xe_TW2.js +0 -1
- package/dist-storybook/assets/carousel-DJlgMyS5.js +0 -37
- package/dist-storybook/assets/carousel.stories-3rA3nxdL.js +0 -217
- package/dist-storybook/assets/checkbox-JOxcmyCZ.js +0 -1
- package/dist-storybook/assets/checkbox.stories-ge3pgfBb.js +0 -201
- package/dist-storybook/assets/chip-Crt60rph.js +0 -1
- package/dist-storybook/assets/date-field-range-B-sv9nbW.js +0 -1
- package/dist-storybook/assets/date-field.stories-B9G2heHt.js +0 -129
- package/dist-storybook/assets/date-picker-BPzKPdhO.js +0 -1
- package/dist-storybook/assets/dialog-BAfGQzk5.js +0 -1
- package/dist-storybook/assets/dialog.stories-vDMKz9Tw.js +0 -212
- package/dist-storybook/assets/dropdown-Dtomaqpw.js +0 -247
- package/dist-storybook/assets/dropdown.stories-Cj0HM0VI.js +0 -200
- package/dist-storybook/assets/icon-CdiFzFyf.js +0 -1
- package/dist-storybook/assets/iframe-BHaCv4dM.css +0 -1
- package/dist-storybook/assets/iframe-DfPay7Zl.js +0 -1071
- package/dist-storybook/assets/image-CMKb-R3x.js +0 -9
- package/dist-storybook/assets/index-BWpuenI4.js +0 -1
- package/dist-storybook/assets/index-DqZh6B0b.js +0 -1
- package/dist-storybook/assets/input-wrapper-CgaUwbbE.js +0 -1
- package/dist-storybook/assets/label-D44azUgi.js +0 -27
- package/dist-storybook/assets/matchers-7Z3WT2CE-Dw4MQV_s.js +0 -14
- package/dist-storybook/assets/navigation-bar-DK3TxcTu.js +0 -79
- package/dist-storybook/assets/navigation-bar.stories-CB3Kg-sH.js +0 -73
- package/dist-storybook/assets/number-field-Bz7su9S1.js +0 -1
- package/dist-storybook/assets/number-field.stories-DSxPSzLv.js +0 -167
- package/dist-storybook/assets/omit-BWHsnDSR.js +0 -1
- package/dist-storybook/assets/option-item-CpeNcb5w.js +0 -1
- package/dist-storybook/assets/pagination-Cp-DHO4Q.js +0 -1
- package/dist-storybook/assets/proxy-B4G9nIBd.js +0 -1
- package/dist-storybook/assets/radio-D0aV0RIg.js +0 -1
- package/dist-storybook/assets/rating-D2e8RTGl.js +0 -1
- package/dist-storybook/assets/react-18-C7pDmBBf.js +0 -9
- package/dist-storybook/assets/search-field-DINESW8Y.js +0 -1
- package/dist-storybook/assets/section-content-D49PabBW.js +0 -1
- package/dist-storybook/assets/sheet-footer-nEdxsYan.js +0 -1
- package/dist-storybook/assets/skeleton-B12XbNAJ.js +0 -1
- package/dist-storybook/assets/switch-D0Z9tWin.js +0 -1
- package/dist-storybook/assets/tab-bar-kExoGg5P.js +0 -31
- package/dist-storybook/assets/tab-bar.stories-BgDXX0of.js +0 -136
- package/dist-storybook/assets/text-area-GKy5HL12.js +0 -1
- package/dist-storybook/assets/text-field-CGWNqitB.js +0 -1
- package/dist-storybook/assets/toast-provider-DKSrfhJD.js +0 -9
- package/dist-storybook/assets/toast.stories-CcFzS6QI.js +0 -201
- package/dist-storybook/assets/tooltip-B9rDI6z9.js +0 -1
- package/dist-storybook/assets/typography-CB8hPDyK.js +0 -1
- package/dist-storybook/assets/uploader.stories-izVumFqZ.js +0 -65
- package/dist-storybook/assets/visibility-sensor-Jf-Nmil6.js +0 -1
- package/dist-storybook/sb-manager/globals-module-info.js +0 -799
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import{r,j as n}from"./iframe-Crg_lbde.js";import{T as B,S as F,a as M,P as K,b as J}from"./blocks-CB7UwFa4.js";import{c as Q,g as U}from"./classname-Bl5epEs-.js";import{u as X}from"./index-hDlmuyu2.js";import{O as Y}from"./option-item-DFWc14Up.js";import{S as Z}from"./search-field-zl4ROLfn.js";import{g as ee,I as ne}from"./input-wrapper-Gd3QJKqj.js";import{S as oe,a as te,b as ae}from"./sheet-body-2dWL2AE5.js";import{I as re}from"./icon-Cc9W858e.js";import{T as D}from"./typography-CMIMyivt.js";import{S as V}from"./skeleton-BVLpHxKT.js";import{t as e}from"./store-BwIebEt6.js";import"./preload-helper-PPVm8Dsz.js";import"./index-CdnALcTP.js";import"./index-B-Ksafg0.js";import"./text-field-CqJG0bIl.js";import"./omit-CRXr8Lio.js";import"./label-zfqCJTGJ.js";import"./app.store-BJVKVv1J.js";import"./react-DO0-owxu.js";import"./button-BLW8SOpg.js";import"./colors-_6nFGM3e.js";const c=U("dropdown"),t=r.forwardRef((a,l)=>{const{wrapper:m,props:p}=ee(a),[u,d]=r.useState(!1),[s,O]=X(p,{trigger:"onChange",valuePropName:"value"}),[N,x]=r.useState(""),{options:q,searchFilter:T=se,emptyText:E="Không tìm thấy",searchProps:$,allowSearch:L,placeholder:z,sheetTitle:H=m.label?.text||m.label?.children,renderLabel:P=o=>o.label,renderItem:_=(o,i)=>n.jsx(Y,{theme:"neutral",divider:i.index<i.options.length-1,selected:o.value===i.value,children:P(o,s)}),children:v}=p,k=q.find(o=>o.value===s),S=r.useMemo(()=>q.filter(o=>T(o,N)),[q,N,T]),j=typeof s>"u"||s===null,A=()=>k?p.renderValue?p.renderValue(k):P(k,s):s;r.useEffect(()=>{u||x("")},[u]),r.useImperativeHandle(l,()=>({open:()=>d(!0),close:()=>d(!1)}));const R=()=>{m.disabled||p.loading||d(!0)},G=()=>{if(v){if(r.isValidElement(v)){const o=v,i=o.props.onClick;return r.cloneElement(o,{onClick:(C,...W)=>{i?.(C,...W),R()}})}return n.jsx("div",{onClick:R,children:v})}return n.jsxs(ne,{trailingIcon:{name:"chevron-down",color:"alias-object-secondary",size:20},...m,className:Q(c,m.className),isFocus:u,onClick:R,loadingNode:p.loading&&n.jsxs("div",{className:`${c}__loading`,children:[n.jsx(V,{width:128,height:13,shape:"pill"}),n.jsx(V,{width:24,height:24,shape:"pill"})]}),children:[j&&n.jsx(D,{size:"base",weight:400,color:"alias-object-placeholder",children:z||" "}),!j&&n.jsx(D,{size:"base",weight:400,color:"alias-object-primary",children:A()})]})};return n.jsxs(n.Fragment,{children:[G(),n.jsxs(oe,{open:u,onBackdropClick:()=>d(!1),className:`${c}__sheet`,children:[n.jsx(te,{closeIcon:!0,title:H,onCloseClick:()=>d(!1)}),L&&n.jsx("div",{className:`${c}__sheet__search`,children:n.jsx(Z,{placeholder:"Tìm kiếm",...$,value:N,onChange:x})}),n.jsxs(ae,{horizontalSpace:!1,children:[S.map((o,i,C)=>n.jsx("div",{onClick:()=>{O(o.value),d(!1)},children:_(o,{options:C,value:s,index:i})},o.value)),!S.length&&n.jsxs("div",{className:`${c}__sheet__empty`,children:[n.jsx(re,{name:"newspaper",size:40,color:"alias-object-placeholder"}),n.jsx(D,{size:"small",color:"alias-object-placeholder",children:E})]})]})]})]})}),se=(a,l)=>l?typeof a.label=="string"||typeof a.label=="number"?a.label.toString().toLowerCase().includes(l.toLowerCase()):!1:!0;t.__docgenInfo={description:"",methods:[{name:"open",docblock:null,modifiers:[],params:[],returns:null},{name:"close",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Dropdown",props:{shape:{required:!1,tsType:{name:"union",raw:"'rounded' | 'pill'",elements:[{name:"literal",value:"'rounded'"},{name:"literal",value:"'pill'"}]},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},success:{required:!1,tsType:{name:"boolean"},description:""},successMessage:{required:!1,tsType:{name:"ReactNode"},description:""},error:{required:!1,tsType:{name:"boolean"},description:""},errorMessage:{required:!1,tsType:{name:"ReactNode"},description:""},label:{required:!1,tsType:{name:"intersection",raw:`ComponentPropsWithRef<'label'> & {
|
|
2
|
+
disabled?: boolean
|
|
3
|
+
required?: boolean
|
|
4
|
+
icon?: IIconProps | ReactNode
|
|
5
|
+
text?: ReactNode
|
|
6
|
+
helperText?: ReactNode
|
|
7
|
+
loading?: boolean
|
|
8
|
+
}`,elements:[{name:"ComponentPropsWithRef",elements:[{name:"literal",value:"'label'"}],raw:"ComponentPropsWithRef<'label'>"},{name:"signature",type:"object",raw:`{
|
|
9
|
+
disabled?: boolean
|
|
10
|
+
required?: boolean
|
|
11
|
+
icon?: IIconProps | ReactNode
|
|
12
|
+
text?: ReactNode
|
|
13
|
+
helperText?: ReactNode
|
|
14
|
+
loading?: boolean
|
|
15
|
+
}`,signature:{properties:[{key:"disabled",value:{name:"boolean",required:!1}},{key:"required",value:{name:"boolean",required:!1}},{key:"icon",value:{name:"union",raw:"IIconProps | ReactNode",elements:[{name:"IOverride",elements:[{name:"Omit",elements:[{name:"intersection",raw:`React.ComponentProps<'svg'> & {
|
|
16
|
+
title?: string
|
|
17
|
+
titleId?: string
|
|
18
|
+
desc?: string
|
|
19
|
+
descId?: string
|
|
20
|
+
}`,elements:[{name:"ReactComponentProps",raw:"React.ComponentProps<'svg'>",elements:[{name:"literal",value:"'svg'"}]},{name:"signature",type:"object",raw:`{
|
|
21
|
+
title?: string
|
|
22
|
+
titleId?: string
|
|
23
|
+
desc?: string
|
|
24
|
+
descId?: string
|
|
25
|
+
}`,signature:{properties:[{key:"title",value:{name:"string",required:!1}},{key:"titleId",value:{name:"string",required:!1}},{key:"desc",value:{name:"string",required:!1}},{key:"descId",value:{name:"string",required:!1}}]}}]},{name:"union",raw:"'name' | 'type' | 'children'",elements:[{name:"literal",value:"'name'"},{name:"literal",value:"'type'"},{name:"literal",value:"'children'"}]}],raw:"Omit<ISVGComponentProps, 'name' | 'type' | 'children'>"},{name:"intersection",raw:`{
|
|
26
|
+
size?: number | string
|
|
27
|
+
color?: IColor
|
|
28
|
+
animation?: IIconAnimation
|
|
29
|
+
} & ({ name: IIconName; type?: 'outline' | 'fill' } | { children: ReactNode })`,elements:[{name:"signature",type:"object",raw:`{
|
|
30
|
+
size?: number | string
|
|
31
|
+
color?: IColor
|
|
32
|
+
animation?: IIconAnimation
|
|
33
|
+
}`,signature:{properties:[{key:"size",value:{name:"union",raw:"number | string",elements:[{name:"number"},{name:"string"}],required:!1}},{key:"color",value:{name:"IColor",required:!1}},{key:"animation",value:{name:"union",raw:"'spin' | 'ping' | 'pulse' | 'bounce'",elements:[{name:"literal",value:"'spin'"},{name:"literal",value:"'ping'"},{name:"literal",value:"'pulse'"},{name:"literal",value:"'bounce'"}],required:!1}}]}},{name:"unknown"}]}],raw:`IOverride<
|
|
34
|
+
Omit<ISVGComponentProps, 'name' | 'type' | 'children'>,
|
|
35
|
+
IBaseIconProps
|
|
36
|
+
>`},{name:"ReactNode"}],required:!1}},{key:"text",value:{name:"ReactNode",required:!1}},{key:"helperText",value:{name:"ReactNode",required:!1}},{key:"loading",value:{name:"boolean",required:!1}}]}}]},description:""},leadingIcon:{required:!1,tsType:{name:"union",raw:"IIconProps | ReactNode",elements:[{name:"IOverride",elements:[{name:"Omit",elements:[{name:"intersection",raw:`React.ComponentProps<'svg'> & {
|
|
37
|
+
title?: string
|
|
38
|
+
titleId?: string
|
|
39
|
+
desc?: string
|
|
40
|
+
descId?: string
|
|
41
|
+
}`,elements:[{name:"ReactComponentProps",raw:"React.ComponentProps<'svg'>",elements:[{name:"literal",value:"'svg'"}]},{name:"signature",type:"object",raw:`{
|
|
42
|
+
title?: string
|
|
43
|
+
titleId?: string
|
|
44
|
+
desc?: string
|
|
45
|
+
descId?: string
|
|
46
|
+
}`,signature:{properties:[{key:"title",value:{name:"string",required:!1}},{key:"titleId",value:{name:"string",required:!1}},{key:"desc",value:{name:"string",required:!1}},{key:"descId",value:{name:"string",required:!1}}]}}]},{name:"union",raw:"'name' | 'type' | 'children'",elements:[{name:"literal",value:"'name'"},{name:"literal",value:"'type'"},{name:"literal",value:"'children'"}]}],raw:"Omit<ISVGComponentProps, 'name' | 'type' | 'children'>"},{name:"intersection",raw:`{
|
|
47
|
+
size?: number | string
|
|
48
|
+
color?: IColor
|
|
49
|
+
animation?: IIconAnimation
|
|
50
|
+
} & ({ name: IIconName; type?: 'outline' | 'fill' } | { children: ReactNode })`,elements:[{name:"signature",type:"object",raw:`{
|
|
51
|
+
size?: number | string
|
|
52
|
+
color?: IColor
|
|
53
|
+
animation?: IIconAnimation
|
|
54
|
+
}`,signature:{properties:[{key:"size",value:{name:"union",raw:"number | string",elements:[{name:"number"},{name:"string"}],required:!1}},{key:"color",value:{name:"IColor",required:!1}},{key:"animation",value:{name:"union",raw:"'spin' | 'ping' | 'pulse' | 'bounce'",elements:[{name:"literal",value:"'spin'"},{name:"literal",value:"'ping'"},{name:"literal",value:"'pulse'"},{name:"literal",value:"'bounce'"}],required:!1}}]}},{name:"unknown"}]}],raw:`IOverride<
|
|
55
|
+
Omit<ISVGComponentProps, 'name' | 'type' | 'children'>,
|
|
56
|
+
IBaseIconProps
|
|
57
|
+
>`},{name:"ReactNode"}]},description:""},onLeadingIconClick:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
58
|
+
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
59
|
+
) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"}],return:{name:"void"}}},description:""},trailingIcon:{required:!1,tsType:{name:"union",raw:"IIconProps | ReactNode",elements:[{name:"IOverride",elements:[{name:"Omit",elements:[{name:"intersection",raw:`React.ComponentProps<'svg'> & {
|
|
60
|
+
title?: string
|
|
61
|
+
titleId?: string
|
|
62
|
+
desc?: string
|
|
63
|
+
descId?: string
|
|
64
|
+
}`,elements:[{name:"ReactComponentProps",raw:"React.ComponentProps<'svg'>",elements:[{name:"literal",value:"'svg'"}]},{name:"signature",type:"object",raw:`{
|
|
65
|
+
title?: string
|
|
66
|
+
titleId?: string
|
|
67
|
+
desc?: string
|
|
68
|
+
descId?: string
|
|
69
|
+
}`,signature:{properties:[{key:"title",value:{name:"string",required:!1}},{key:"titleId",value:{name:"string",required:!1}},{key:"desc",value:{name:"string",required:!1}},{key:"descId",value:{name:"string",required:!1}}]}}]},{name:"union",raw:"'name' | 'type' | 'children'",elements:[{name:"literal",value:"'name'"},{name:"literal",value:"'type'"},{name:"literal",value:"'children'"}]}],raw:"Omit<ISVGComponentProps, 'name' | 'type' | 'children'>"},{name:"intersection",raw:`{
|
|
70
|
+
size?: number | string
|
|
71
|
+
color?: IColor
|
|
72
|
+
animation?: IIconAnimation
|
|
73
|
+
} & ({ name: IIconName; type?: 'outline' | 'fill' } | { children: ReactNode })`,elements:[{name:"signature",type:"object",raw:`{
|
|
74
|
+
size?: number | string
|
|
75
|
+
color?: IColor
|
|
76
|
+
animation?: IIconAnimation
|
|
77
|
+
}`,signature:{properties:[{key:"size",value:{name:"union",raw:"number | string",elements:[{name:"number"},{name:"string"}],required:!1}},{key:"color",value:{name:"IColor",required:!1}},{key:"animation",value:{name:"union",raw:"'spin' | 'ping' | 'pulse' | 'bounce'",elements:[{name:"literal",value:"'spin'"},{name:"literal",value:"'ping'"},{name:"literal",value:"'pulse'"},{name:"literal",value:"'bounce'"}],required:!1}}]}},{name:"unknown"}]}],raw:`IOverride<
|
|
78
|
+
Omit<ISVGComponentProps, 'name' | 'type' | 'children'>,
|
|
79
|
+
IBaseIconProps
|
|
80
|
+
>`},{name:"ReactNode"}]},description:""},onTrailingIconClick:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
81
|
+
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
82
|
+
) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"}],return:{name:"void"}}},description:""},prefix:{required:!1,tsType:{name:"ReactNode"},description:""},suffix:{required:!1,tsType:{name:"ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""},placeholder:{required:!1,tsType:{name:"string"},description:""},options:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{
|
|
83
|
+
value: Value
|
|
84
|
+
label: ReactNode
|
|
85
|
+
data?: Data
|
|
86
|
+
}`,signature:{properties:[{key:"value",value:{name:"Value",required:!0}},{key:"label",value:{name:"ReactNode",required:!0}},{key:"data",value:{name:"Data",required:!1}}]}}],raw:"IDropdownOption<Value, Data>[]"},description:""},value:{required:!1,tsType:{name:"Value"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: Value) => void",signature:{arguments:[{type:{name:"Value"},name:"value"}],return:{name:"void"}}},description:""},renderLabel:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
87
|
+
option: IDropdownOption<Value, Data>,
|
|
88
|
+
value: Value,
|
|
89
|
+
) => ReactNode`,signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
|
|
90
|
+
value: Value
|
|
91
|
+
label: ReactNode
|
|
92
|
+
data?: Data
|
|
93
|
+
}`,signature:{properties:[{key:"value",value:{name:"Value",required:!0}},{key:"label",value:{name:"ReactNode",required:!0}},{key:"data",value:{name:"Data",required:!1}}]}},name:"option"},{type:{name:"Value"},name:"value"}],return:{name:"ReactNode"}}},description:""},renderItem:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
94
|
+
option: IDropdownOption<Value, Data>,
|
|
95
|
+
context: {
|
|
96
|
+
options: IDropdownOption<Value, Data>[]
|
|
97
|
+
value: Value
|
|
98
|
+
index: number
|
|
99
|
+
},
|
|
100
|
+
) => ReactNode`,signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
|
|
101
|
+
value: Value
|
|
102
|
+
label: ReactNode
|
|
103
|
+
data?: Data
|
|
104
|
+
}`,signature:{properties:[{key:"value",value:{name:"Value",required:!0}},{key:"label",value:{name:"ReactNode",required:!0}},{key:"data",value:{name:"Data",required:!1}}]}},name:"option"},{type:{name:"signature",type:"object",raw:`{
|
|
105
|
+
options: IDropdownOption<Value, Data>[]
|
|
106
|
+
value: Value
|
|
107
|
+
index: number
|
|
108
|
+
}`,signature:{properties:[{key:"options",value:{name:"Array",elements:[{name:"signature",type:"object",raw:`{
|
|
109
|
+
value: Value
|
|
110
|
+
label: ReactNode
|
|
111
|
+
data?: Data
|
|
112
|
+
}`,signature:{properties:[{key:"value",value:{name:"Value",required:!0}},{key:"label",value:{name:"ReactNode",required:!0}},{key:"data",value:{name:"Data",required:!1}}]}}],raw:"IDropdownOption<Value, Data>[]",required:!0}},{key:"value",value:{name:"Value",required:!0}},{key:"index",value:{name:"number",required:!0}}]}},name:"context"}],return:{name:"ReactNode"}}},description:""},renderValue:{required:!1,tsType:{name:"signature",type:"function",raw:"(option: IDropdownOption<Value, Data>) => ReactNode",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
|
|
113
|
+
value: Value
|
|
114
|
+
label: ReactNode
|
|
115
|
+
data?: Data
|
|
116
|
+
}`,signature:{properties:[{key:"value",value:{name:"Value",required:!0}},{key:"label",value:{name:"ReactNode",required:!0}},{key:"data",value:{name:"Data",required:!1}}]}},name:"option"}],return:{name:"ReactNode"}}},description:""},sheetTitle:{required:!1,tsType:{name:"ReactNode"},description:""},allowSearch:{required:!1,tsType:{name:"boolean"},description:""},searchFilter:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
117
|
+
option: IDropdownOption<Value, Data>,
|
|
118
|
+
search: string,
|
|
119
|
+
) => boolean`,signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
|
|
120
|
+
value: Value
|
|
121
|
+
label: ReactNode
|
|
122
|
+
data?: Data
|
|
123
|
+
}`,signature:{properties:[{key:"value",value:{name:"Value",required:!0}},{key:"label",value:{name:"ReactNode",required:!0}},{key:"data",value:{name:"Data",required:!1}}]}},name:"option"},{type:{name:"string"},name:"search"}],return:{name:"boolean"}}},description:""},searchProps:{required:!1,tsType:{name:"Omit",elements:[{name:"IOverride",elements:[{name:"ComponentProps",elements:[{name:"literal",value:"'input'"}],raw:"ComponentProps<'input'>"},{name:"intersection",raw:`IBasicInputProps & {
|
|
124
|
+
loading?: boolean
|
|
125
|
+
inputClassName?: string
|
|
126
|
+
onChange?: (value: string) => void
|
|
127
|
+
loadingType?: 'search' | 'input'
|
|
128
|
+
}`,elements:[{name:"signature",type:"object",raw:`{
|
|
129
|
+
// Props
|
|
130
|
+
shape?: IInputShape
|
|
131
|
+
disabled?: boolean
|
|
132
|
+
success?: boolean
|
|
133
|
+
successMessage?: ReactNode
|
|
134
|
+
error?: boolean
|
|
135
|
+
errorMessage?: ReactNode
|
|
136
|
+
|
|
137
|
+
// Label
|
|
138
|
+
label?: ILabelProps
|
|
139
|
+
|
|
140
|
+
// Add on
|
|
141
|
+
leadingIcon?: IIconProps | ReactNode
|
|
142
|
+
onLeadingIconClick?: (
|
|
143
|
+
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
144
|
+
) => void
|
|
145
|
+
trailingIcon?: IIconProps | ReactNode
|
|
146
|
+
onTrailingIconClick?: (
|
|
147
|
+
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
148
|
+
) => void
|
|
149
|
+
prefix?: ReactNode
|
|
150
|
+
suffix?: ReactNode
|
|
151
|
+
|
|
152
|
+
className?: string
|
|
153
|
+
}`,signature:{properties:[{key:"shape",value:{name:"union",raw:"'rounded' | 'pill'",elements:[{name:"literal",value:"'rounded'"},{name:"literal",value:"'pill'"}],required:!1}},{key:"disabled",value:{name:"boolean",required:!1}},{key:"success",value:{name:"boolean",required:!1}},{key:"successMessage",value:{name:"ReactNode",required:!1}},{key:"error",value:{name:"boolean",required:!1}},{key:"errorMessage",value:{name:"ReactNode",required:!1}},{key:"label",value:{name:"intersection",raw:`ComponentPropsWithRef<'label'> & {
|
|
154
|
+
disabled?: boolean
|
|
155
|
+
required?: boolean
|
|
156
|
+
icon?: IIconProps | ReactNode
|
|
157
|
+
text?: ReactNode
|
|
158
|
+
helperText?: ReactNode
|
|
159
|
+
loading?: boolean
|
|
160
|
+
}`,elements:[{name:"ComponentPropsWithRef",elements:[{name:"literal",value:"'label'"}],raw:"ComponentPropsWithRef<'label'>"},{name:"signature",type:"object",raw:`{
|
|
161
|
+
disabled?: boolean
|
|
162
|
+
required?: boolean
|
|
163
|
+
icon?: IIconProps | ReactNode
|
|
164
|
+
text?: ReactNode
|
|
165
|
+
helperText?: ReactNode
|
|
166
|
+
loading?: boolean
|
|
167
|
+
}`,signature:{properties:[{key:"disabled",value:{name:"boolean",required:!1}},{key:"required",value:{name:"boolean",required:!1}},{key:"icon",value:{name:"union",raw:"IIconProps | ReactNode",elements:[{name:"IOverride",elements:[{name:"Omit",elements:[{name:"intersection",raw:`React.ComponentProps<'svg'> & {
|
|
168
|
+
title?: string
|
|
169
|
+
titleId?: string
|
|
170
|
+
desc?: string
|
|
171
|
+
descId?: string
|
|
172
|
+
}`,elements:[{name:"ReactComponentProps",raw:"React.ComponentProps<'svg'>",elements:[{name:"literal",value:"'svg'"}]},{name:"signature",type:"object",raw:`{
|
|
173
|
+
title?: string
|
|
174
|
+
titleId?: string
|
|
175
|
+
desc?: string
|
|
176
|
+
descId?: string
|
|
177
|
+
}`,signature:{properties:[{key:"title",value:{name:"string",required:!1}},{key:"titleId",value:{name:"string",required:!1}},{key:"desc",value:{name:"string",required:!1}},{key:"descId",value:{name:"string",required:!1}}]}}]},{name:"union",raw:"'name' | 'type' | 'children'",elements:[{name:"literal",value:"'name'"},{name:"literal",value:"'type'"},{name:"literal",value:"'children'"}]}],raw:"Omit<ISVGComponentProps, 'name' | 'type' | 'children'>"},{name:"intersection",raw:`{
|
|
178
|
+
size?: number | string
|
|
179
|
+
color?: IColor
|
|
180
|
+
animation?: IIconAnimation
|
|
181
|
+
} & ({ name: IIconName; type?: 'outline' | 'fill' } | { children: ReactNode })`,elements:[{name:"signature",type:"object",raw:`{
|
|
182
|
+
size?: number | string
|
|
183
|
+
color?: IColor
|
|
184
|
+
animation?: IIconAnimation
|
|
185
|
+
}`,signature:{properties:[{key:"size",value:{name:"union",raw:"number | string",elements:[{name:"number"},{name:"string"}],required:!1}},{key:"color",value:{name:"IColor",required:!1}},{key:"animation",value:{name:"union",raw:"'spin' | 'ping' | 'pulse' | 'bounce'",elements:[{name:"literal",value:"'spin'"},{name:"literal",value:"'ping'"},{name:"literal",value:"'pulse'"},{name:"literal",value:"'bounce'"}],required:!1}}]}},{name:"unknown"}]}],raw:`IOverride<
|
|
186
|
+
Omit<ISVGComponentProps, 'name' | 'type' | 'children'>,
|
|
187
|
+
IBaseIconProps
|
|
188
|
+
>`},{name:"ReactNode"}],required:!1}},{key:"text",value:{name:"ReactNode",required:!1}},{key:"helperText",value:{name:"ReactNode",required:!1}},{key:"loading",value:{name:"boolean",required:!1}}]}}],required:!1}},{key:"leadingIcon",value:{name:"union",raw:"IIconProps | ReactNode",elements:[{name:"IOverride",elements:[{name:"Omit",elements:[{name:"intersection",raw:`React.ComponentProps<'svg'> & {
|
|
189
|
+
title?: string
|
|
190
|
+
titleId?: string
|
|
191
|
+
desc?: string
|
|
192
|
+
descId?: string
|
|
193
|
+
}`,elements:[{name:"ReactComponentProps",raw:"React.ComponentProps<'svg'>",elements:[{name:"literal",value:"'svg'"}]},{name:"signature",type:"object",raw:`{
|
|
194
|
+
title?: string
|
|
195
|
+
titleId?: string
|
|
196
|
+
desc?: string
|
|
197
|
+
descId?: string
|
|
198
|
+
}`,signature:{properties:[{key:"title",value:{name:"string",required:!1}},{key:"titleId",value:{name:"string",required:!1}},{key:"desc",value:{name:"string",required:!1}},{key:"descId",value:{name:"string",required:!1}}]}}]},{name:"union",raw:"'name' | 'type' | 'children'",elements:[{name:"literal",value:"'name'"},{name:"literal",value:"'type'"},{name:"literal",value:"'children'"}]}],raw:"Omit<ISVGComponentProps, 'name' | 'type' | 'children'>"},{name:"intersection",raw:`{
|
|
199
|
+
size?: number | string
|
|
200
|
+
color?: IColor
|
|
201
|
+
animation?: IIconAnimation
|
|
202
|
+
} & ({ name: IIconName; type?: 'outline' | 'fill' } | { children: ReactNode })`,elements:[{name:"signature",type:"object",raw:`{
|
|
203
|
+
size?: number | string
|
|
204
|
+
color?: IColor
|
|
205
|
+
animation?: IIconAnimation
|
|
206
|
+
}`,signature:{properties:[{key:"size",value:{name:"union",raw:"number | string",elements:[{name:"number"},{name:"string"}],required:!1}},{key:"color",value:{name:"IColor",required:!1}},{key:"animation",value:{name:"union",raw:"'spin' | 'ping' | 'pulse' | 'bounce'",elements:[{name:"literal",value:"'spin'"},{name:"literal",value:"'ping'"},{name:"literal",value:"'pulse'"},{name:"literal",value:"'bounce'"}],required:!1}}]}},{name:"unknown"}]}],raw:`IOverride<
|
|
207
|
+
Omit<ISVGComponentProps, 'name' | 'type' | 'children'>,
|
|
208
|
+
IBaseIconProps
|
|
209
|
+
>`},{name:"ReactNode"}],required:!1}},{key:"onLeadingIconClick",value:{name:"signature",type:"function",raw:`(
|
|
210
|
+
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
211
|
+
) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"}],return:{name:"void"}},required:!1}},{key:"trailingIcon",value:{name:"union",raw:"IIconProps | ReactNode",elements:[{name:"IOverride",elements:[{name:"Omit",elements:[{name:"intersection",raw:`React.ComponentProps<'svg'> & {
|
|
212
|
+
title?: string
|
|
213
|
+
titleId?: string
|
|
214
|
+
desc?: string
|
|
215
|
+
descId?: string
|
|
216
|
+
}`,elements:[{name:"ReactComponentProps",raw:"React.ComponentProps<'svg'>",elements:[{name:"literal",value:"'svg'"}]},{name:"signature",type:"object",raw:`{
|
|
217
|
+
title?: string
|
|
218
|
+
titleId?: string
|
|
219
|
+
desc?: string
|
|
220
|
+
descId?: string
|
|
221
|
+
}`,signature:{properties:[{key:"title",value:{name:"string",required:!1}},{key:"titleId",value:{name:"string",required:!1}},{key:"desc",value:{name:"string",required:!1}},{key:"descId",value:{name:"string",required:!1}}]}}]},{name:"union",raw:"'name' | 'type' | 'children'",elements:[{name:"literal",value:"'name'"},{name:"literal",value:"'type'"},{name:"literal",value:"'children'"}]}],raw:"Omit<ISVGComponentProps, 'name' | 'type' | 'children'>"},{name:"intersection",raw:`{
|
|
222
|
+
size?: number | string
|
|
223
|
+
color?: IColor
|
|
224
|
+
animation?: IIconAnimation
|
|
225
|
+
} & ({ name: IIconName; type?: 'outline' | 'fill' } | { children: ReactNode })`,elements:[{name:"signature",type:"object",raw:`{
|
|
226
|
+
size?: number | string
|
|
227
|
+
color?: IColor
|
|
228
|
+
animation?: IIconAnimation
|
|
229
|
+
}`,signature:{properties:[{key:"size",value:{name:"union",raw:"number | string",elements:[{name:"number"},{name:"string"}],required:!1}},{key:"color",value:{name:"IColor",required:!1}},{key:"animation",value:{name:"union",raw:"'spin' | 'ping' | 'pulse' | 'bounce'",elements:[{name:"literal",value:"'spin'"},{name:"literal",value:"'ping'"},{name:"literal",value:"'pulse'"},{name:"literal",value:"'bounce'"}],required:!1}}]}},{name:"unknown"}]}],raw:`IOverride<
|
|
230
|
+
Omit<ISVGComponentProps, 'name' | 'type' | 'children'>,
|
|
231
|
+
IBaseIconProps
|
|
232
|
+
>`},{name:"ReactNode"}],required:!1}},{key:"onTrailingIconClick",value:{name:"signature",type:"function",raw:`(
|
|
233
|
+
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
234
|
+
) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"}],return:{name:"void"}},required:!1}},{key:"prefix",value:{name:"ReactNode",required:!1}},{key:"suffix",value:{name:"ReactNode",required:!1}},{key:"className",value:{name:"string",required:!1}}]}},{name:"signature",type:"object",raw:`{
|
|
235
|
+
loading?: boolean
|
|
236
|
+
inputClassName?: string
|
|
237
|
+
onChange?: (value: string) => void
|
|
238
|
+
loadingType?: 'search' | 'input'
|
|
239
|
+
}`,signature:{properties:[{key:"loading",value:{name:"boolean",required:!1}},{key:"inputClassName",value:{name:"string",required:!1}},{key:"onChange",value:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}},required:!1}},{key:"loadingType",value:{name:"union",raw:"'search' | 'input'",elements:[{name:"literal",value:"'search'"},{name:"literal",value:"'input'"}],required:!1}}]}}]}],raw:`IOverride<
|
|
240
|
+
ComponentProps<'input'>,
|
|
241
|
+
IBasicInputProps & {
|
|
242
|
+
loading?: boolean
|
|
243
|
+
inputClassName?: string
|
|
244
|
+
onChange?: (value: string) => void
|
|
245
|
+
loadingType?: 'search' | 'input'
|
|
246
|
+
}
|
|
247
|
+
>`},{name:"union",raw:"'trailingIcon' | 'onTrailingIconClick'",elements:[{name:"literal",value:"'trailingIcon'"},{name:"literal",value:"'onTrailingIconClick'"}]}],raw:`Omit<
|
|
248
|
+
ITextFieldProps,
|
|
249
|
+
'trailingIcon' | 'onTrailingIconClick'
|
|
250
|
+
>`},description:""},emptyText:{required:!1,tsType:{name:"ReactNode"},description:""},children:{required:!1,tsType:{name:"ReactNode"},description:""},loading:{required:!1,tsType:{name:"boolean"},description:""}}};const ie=()=>{const a=`
|
|
251
|
+
## ${e("common.table.title")}
|
|
252
|
+
|
|
253
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
254
|
+
| :--- | :--- | :--- | :--- |
|
|
255
|
+
| \`options\` | \`IDropdownOption[]\` | ${e("common.table.yes")} | ${e("components.dropdown.optionsDescription")} |
|
|
256
|
+
| \`value\` | \`Value\` | ${e("common.table.no")} | ${e("components.dropdown.valueDescription")} |
|
|
257
|
+
| \`onChange\` | \`(value: Value) => void\` | ${e("common.table.no")} | ${e("components.dropdown.onChangeDescription")} |
|
|
258
|
+
| \`placeholder\` | \`string\` | ${e("common.table.no")} | ${e("components.dropdown.placeholderDescription")} |
|
|
259
|
+
| \`shape\` | \`'rounded' | 'pill'\` | ${e("common.table.no")} | ${e("components.dropdown.shapeDescription")} |
|
|
260
|
+
| \`disabled\` | \`boolean\` | ${e("common.table.no")} | ${e("components.dropdown.disabledDescription")} |
|
|
261
|
+
| \`error\` | \`boolean\` | ${e("common.table.no")} | ${e("components.dropdown.errorDescription")} |
|
|
262
|
+
| \`errorMessage\` | \`ReactNode\` | ${e("common.table.no")} | ${e("components.dropdown.errorMessageDescription")} |
|
|
263
|
+
| \`success\` | \`boolean\` | ${e("common.table.no")} | ${e("components.dropdown.successDescription")} |
|
|
264
|
+
| \`successMessage\` | \`ReactNode\` | ${e("common.table.no")} | ${e("components.dropdown.successMessageDescription")} |
|
|
265
|
+
| \`allowSearch\` | \`boolean\` | ${e("common.table.no")} | ${e("components.dropdown.allowSearchDescription")} |
|
|
266
|
+
| \`loading\` | \`boolean\` | ${e("common.table.no")} | ${e("components.dropdown.loadingDescription")} |
|
|
267
|
+
| \`leadingIcon\` | \`IIconProps | ReactNode\` | ${e("common.table.no")} | ${e("components.dropdown.leadingIconDescription")} |
|
|
268
|
+
| \`onLeadingIconClick\` | \`(event: React.MouseEvent) => void\` | ${e("common.table.no")} | ${e("components.dropdown.onLeadingIconClickDescription")} |
|
|
269
|
+
| \`trailingIcon\` | \`IIconProps | ReactNode\` | ${e("common.table.no")} | ${e("components.dropdown.trailingIconDescription")} |
|
|
270
|
+
| \`onTrailingIconClick\` | \`(event: React.MouseEvent) => void\` | ${e("common.table.no")} | ${e("components.dropdown.onTrailingIconClickDescription")} |
|
|
271
|
+
| \`prefix\` | \`ReactNode\` | ${e("common.table.no")} | ${e("components.dropdown.prefixDescription")} |
|
|
272
|
+
| \`suffix\` | \`ReactNode\` | ${e("common.table.no")} | ${e("components.dropdown.suffixDescription")} |
|
|
273
|
+
| \`className\` | \`string\` | ${e("common.table.no")} | ${e("components.dropdown.classNameDescription")} |
|
|
274
|
+
| \`...props\` | \`ComponentPropsWithRef<'div'>\` | ${e("common.table.no")} | ${e("components.dropdown.propsDescription")} |
|
|
275
|
+
`;return n.jsxs(n.Fragment,{children:[n.jsx(B,{}),n.jsx(F,{}),n.jsx(M,{children:e("components.dropdown.description")}),n.jsx(K,{}),n.jsx(M,{children:a}),n.jsx(J,{})]})},Pe={title:"Components/Dropdown",component:t,parameters:{layout:"padded",docs:{page:ie}},tags:["autodocs"],argTypes:{options:{control:!1,description:e("components.dropdown.argTypes.optionsDescription"),table:{type:{summary:"IDropdownOption[]"}}},value:{control:"text",description:e("components.dropdown.argTypes.valueDescription"),table:{type:{summary:"Value"}}},onChange:{action:"changed",description:e("components.dropdown.argTypes.onChangeDescription"),table:{type:{summary:"(value: Value) => void"}}},placeholder:{control:"text",description:e("components.dropdown.argTypes.placeholderDescription"),table:{type:{summary:"string"}}},shape:{control:"select",options:["rounded","pill"],description:e("components.dropdown.argTypes.shapeDescription"),table:{type:{summary:'"rounded" | "pill"'},defaultValue:{summary:"rounded"}}},disabled:{control:"boolean",description:e("components.dropdown.argTypes.disabledDescription"),table:{type:{summary:"boolean"}}},allowSearch:{control:"boolean",description:e("components.dropdown.argTypes.allowSearchDescription"),table:{type:{summary:"boolean"}}},loading:{control:"boolean",description:e("components.dropdown.argTypes.loadingDescription"),table:{type:{summary:"boolean"}}},className:{control:"text",description:e("components.dropdown.argTypes.classNameDescription"),table:{type:{summary:"string"}}}}},g={storyName:e("components.dropdown.stories.default.storyName"),args:{options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")},{value:"option3",label:e("components.dropdown.stories.options.option3")},{value:"option4",label:e("components.dropdown.stories.options.option4")},{value:"option5",label:e("components.dropdown.stories.options.option5")}],placeholder:e("components.dropdown.stories.default.placeholder")}},w={storyName:e("components.dropdown.stories.controlled.storyName"),render:()=>{const[a,l]=r.useState(null);return n.jsx(t,{options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")},{value:"option3",label:e("components.dropdown.stories.options.option3")},{value:"option4",label:e("components.dropdown.stories.options.option4")},{value:"option5",label:e("components.dropdown.stories.options.option5")}],value:a,onChange:l,placeholder:e("components.dropdown.stories.default.placeholder")})}},b={storyName:e("components.dropdown.stories.withLabel.storyName"),args:{options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")},{value:"option3",label:e("components.dropdown.stories.options.option3")},{value:"option4",label:e("components.dropdown.stories.options.option4")},{value:"option5",label:e("components.dropdown.stories.options.option5")}],label:{text:e("components.dropdown.stories.withLabel.label")},placeholder:e("components.dropdown.stories.default.placeholder")}},y={storyName:e("components.dropdown.stories.shapes.storyName"),render:()=>n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[n.jsx(t,{shape:"rounded",options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")}],placeholder:e("components.dropdown.stories.shapes.rounded")}),n.jsx(t,{shape:"pill",options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")}],placeholder:e("components.dropdown.stories.shapes.pill")})]})},h={storyName:e("components.dropdown.stories.states.storyName"),render:()=>n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[n.jsx(t,{options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")}],placeholder:e("components.dropdown.stories.default.placeholder")}),n.jsx(t,{options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")}],value:"option1",placeholder:e("components.dropdown.stories.default.placeholder")}),n.jsx(t,{disabled:!0,options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")}],placeholder:e("components.dropdown.stories.states.disabled")}),n.jsx(t,{error:!0,errorMessage:e("components.dropdown.stories.states.errorMessage"),options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")}],placeholder:e("components.dropdown.stories.default.placeholder")}),n.jsx(t,{loading:!0,options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")}],placeholder:e("components.dropdown.stories.states.loading")})]})},f={storyName:e("components.dropdown.stories.withSearch.storyName"),args:{options:[{value:"apple",label:e("components.dropdown.stories.withSearch.apple")},{value:"banana",label:e("components.dropdown.stories.withSearch.banana")},{value:"cherry",label:e("components.dropdown.stories.withSearch.cherry")},{value:"date",label:e("components.dropdown.stories.withSearch.date")},{value:"elderberry",label:e("components.dropdown.stories.withSearch.elderberry")}],allowSearch:!0,placeholder:e("components.dropdown.stories.withSearch.placeholder")}},I={storyName:e("components.dropdown.stories.interactive.storyName"),args:{options:[{value:"option1",label:e("components.dropdown.stories.options.option1")},{value:"option2",label:e("components.dropdown.stories.options.option2")},{value:"option3",label:e("components.dropdown.stories.options.option3")},{value:"option4",label:e("components.dropdown.stories.options.option4")},{value:"option5",label:e("components.dropdown.stories.options.option5")}],placeholder:e("components.dropdown.stories.default.placeholder")}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
276
|
+
storyName: t('components.dropdown.stories.default.storyName'),
|
|
277
|
+
args: {
|
|
278
|
+
options: [{
|
|
279
|
+
value: 'option1',
|
|
280
|
+
label: t('components.dropdown.stories.options.option1')
|
|
281
|
+
}, {
|
|
282
|
+
value: 'option2',
|
|
283
|
+
label: t('components.dropdown.stories.options.option2')
|
|
284
|
+
}, {
|
|
285
|
+
value: 'option3',
|
|
286
|
+
label: t('components.dropdown.stories.options.option3')
|
|
287
|
+
}, {
|
|
288
|
+
value: 'option4',
|
|
289
|
+
label: t('components.dropdown.stories.options.option4')
|
|
290
|
+
}, {
|
|
291
|
+
value: 'option5',
|
|
292
|
+
label: t('components.dropdown.stories.options.option5')
|
|
293
|
+
}],
|
|
294
|
+
placeholder: t('components.dropdown.stories.default.placeholder')
|
|
295
|
+
}
|
|
296
|
+
}`,...g.parameters?.docs?.source}}};w.parameters={...w.parameters,docs:{...w.parameters?.docs,source:{originalSource:`{
|
|
297
|
+
storyName: t('components.dropdown.stories.controlled.storyName'),
|
|
298
|
+
render: () => {
|
|
299
|
+
const [value, setValue] = useState<string | null>(null);
|
|
300
|
+
return <Dropdown options={[{
|
|
301
|
+
value: 'option1',
|
|
302
|
+
label: t('components.dropdown.stories.options.option1')
|
|
303
|
+
}, {
|
|
304
|
+
value: 'option2',
|
|
305
|
+
label: t('components.dropdown.stories.options.option2')
|
|
306
|
+
}, {
|
|
307
|
+
value: 'option3',
|
|
308
|
+
label: t('components.dropdown.stories.options.option3')
|
|
309
|
+
}, {
|
|
310
|
+
value: 'option4',
|
|
311
|
+
label: t('components.dropdown.stories.options.option4')
|
|
312
|
+
}, {
|
|
313
|
+
value: 'option5',
|
|
314
|
+
label: t('components.dropdown.stories.options.option5')
|
|
315
|
+
}]} value={value} onChange={setValue} placeholder={t('components.dropdown.stories.default.placeholder')} />;
|
|
316
|
+
}
|
|
317
|
+
}`,...w.parameters?.docs?.source}}};b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`{
|
|
318
|
+
storyName: t('components.dropdown.stories.withLabel.storyName'),
|
|
319
|
+
args: {
|
|
320
|
+
options: [{
|
|
321
|
+
value: 'option1',
|
|
322
|
+
label: t('components.dropdown.stories.options.option1')
|
|
323
|
+
}, {
|
|
324
|
+
value: 'option2',
|
|
325
|
+
label: t('components.dropdown.stories.options.option2')
|
|
326
|
+
}, {
|
|
327
|
+
value: 'option3',
|
|
328
|
+
label: t('components.dropdown.stories.options.option3')
|
|
329
|
+
}, {
|
|
330
|
+
value: 'option4',
|
|
331
|
+
label: t('components.dropdown.stories.options.option4')
|
|
332
|
+
}, {
|
|
333
|
+
value: 'option5',
|
|
334
|
+
label: t('components.dropdown.stories.options.option5')
|
|
335
|
+
}],
|
|
336
|
+
label: {
|
|
337
|
+
text: t('components.dropdown.stories.withLabel.label')
|
|
338
|
+
},
|
|
339
|
+
placeholder: t('components.dropdown.stories.default.placeholder')
|
|
340
|
+
}
|
|
341
|
+
}`,...b.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
|
|
342
|
+
storyName: t('components.dropdown.stories.shapes.storyName'),
|
|
343
|
+
render: () => <div style={{
|
|
344
|
+
display: 'flex',
|
|
345
|
+
flexDirection: 'column',
|
|
346
|
+
gap: '16px'
|
|
347
|
+
}}>
|
|
348
|
+
<Dropdown shape="rounded" options={[{
|
|
349
|
+
value: 'option1',
|
|
350
|
+
label: t('components.dropdown.stories.options.option1')
|
|
351
|
+
}, {
|
|
352
|
+
value: 'option2',
|
|
353
|
+
label: t('components.dropdown.stories.options.option2')
|
|
354
|
+
}]} placeholder={t('components.dropdown.stories.shapes.rounded')} />
|
|
355
|
+
<Dropdown shape="pill" options={[{
|
|
356
|
+
value: 'option1',
|
|
357
|
+
label: t('components.dropdown.stories.options.option1')
|
|
358
|
+
}, {
|
|
359
|
+
value: 'option2',
|
|
360
|
+
label: t('components.dropdown.stories.options.option2')
|
|
361
|
+
}]} placeholder={t('components.dropdown.stories.shapes.pill')} />
|
|
362
|
+
</div>
|
|
363
|
+
}`,...y.parameters?.docs?.source}}};h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
|
|
364
|
+
storyName: t('components.dropdown.stories.states.storyName'),
|
|
365
|
+
render: () => <div style={{
|
|
366
|
+
display: 'flex',
|
|
367
|
+
flexDirection: 'column',
|
|
368
|
+
gap: '16px'
|
|
369
|
+
}}>
|
|
370
|
+
<Dropdown options={[{
|
|
371
|
+
value: 'option1',
|
|
372
|
+
label: t('components.dropdown.stories.options.option1')
|
|
373
|
+
}, {
|
|
374
|
+
value: 'option2',
|
|
375
|
+
label: t('components.dropdown.stories.options.option2')
|
|
376
|
+
}]} placeholder={t('components.dropdown.stories.default.placeholder')} />
|
|
377
|
+
<Dropdown options={[{
|
|
378
|
+
value: 'option1',
|
|
379
|
+
label: t('components.dropdown.stories.options.option1')
|
|
380
|
+
}, {
|
|
381
|
+
value: 'option2',
|
|
382
|
+
label: t('components.dropdown.stories.options.option2')
|
|
383
|
+
}]} value="option1" placeholder={t('components.dropdown.stories.default.placeholder')} />
|
|
384
|
+
<Dropdown disabled options={[{
|
|
385
|
+
value: 'option1',
|
|
386
|
+
label: t('components.dropdown.stories.options.option1')
|
|
387
|
+
}, {
|
|
388
|
+
value: 'option2',
|
|
389
|
+
label: t('components.dropdown.stories.options.option2')
|
|
390
|
+
}]} placeholder={t('components.dropdown.stories.states.disabled')} />
|
|
391
|
+
<Dropdown error errorMessage={t('components.dropdown.stories.states.errorMessage')} options={[{
|
|
392
|
+
value: 'option1',
|
|
393
|
+
label: t('components.dropdown.stories.options.option1')
|
|
394
|
+
}, {
|
|
395
|
+
value: 'option2',
|
|
396
|
+
label: t('components.dropdown.stories.options.option2')
|
|
397
|
+
}]} placeholder={t('components.dropdown.stories.default.placeholder')} />
|
|
398
|
+
<Dropdown loading options={[{
|
|
399
|
+
value: 'option1',
|
|
400
|
+
label: t('components.dropdown.stories.options.option1')
|
|
401
|
+
}, {
|
|
402
|
+
value: 'option2',
|
|
403
|
+
label: t('components.dropdown.stories.options.option2')
|
|
404
|
+
}]} placeholder={t('components.dropdown.stories.states.loading')} />
|
|
405
|
+
</div>
|
|
406
|
+
}`,...h.parameters?.docs?.source}}};f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
|
|
407
|
+
storyName: t('components.dropdown.stories.withSearch.storyName'),
|
|
408
|
+
args: {
|
|
409
|
+
options: [{
|
|
410
|
+
value: 'apple',
|
|
411
|
+
label: t('components.dropdown.stories.withSearch.apple')
|
|
412
|
+
}, {
|
|
413
|
+
value: 'banana',
|
|
414
|
+
label: t('components.dropdown.stories.withSearch.banana')
|
|
415
|
+
}, {
|
|
416
|
+
value: 'cherry',
|
|
417
|
+
label: t('components.dropdown.stories.withSearch.cherry')
|
|
418
|
+
}, {
|
|
419
|
+
value: 'date',
|
|
420
|
+
label: t('components.dropdown.stories.withSearch.date')
|
|
421
|
+
}, {
|
|
422
|
+
value: 'elderberry',
|
|
423
|
+
label: t('components.dropdown.stories.withSearch.elderberry')
|
|
424
|
+
}],
|
|
425
|
+
allowSearch: true,
|
|
426
|
+
placeholder: t('components.dropdown.stories.withSearch.placeholder')
|
|
427
|
+
}
|
|
428
|
+
}`,...f.parameters?.docs?.source}}};I.parameters={...I.parameters,docs:{...I.parameters?.docs,source:{originalSource:`{
|
|
429
|
+
storyName: t('components.dropdown.stories.interactive.storyName'),
|
|
430
|
+
args: {
|
|
431
|
+
options: [{
|
|
432
|
+
value: 'option1',
|
|
433
|
+
label: t('components.dropdown.stories.options.option1')
|
|
434
|
+
}, {
|
|
435
|
+
value: 'option2',
|
|
436
|
+
label: t('components.dropdown.stories.options.option2')
|
|
437
|
+
}, {
|
|
438
|
+
value: 'option3',
|
|
439
|
+
label: t('components.dropdown.stories.options.option3')
|
|
440
|
+
}, {
|
|
441
|
+
value: 'option4',
|
|
442
|
+
label: t('components.dropdown.stories.options.option4')
|
|
443
|
+
}, {
|
|
444
|
+
value: 'option5',
|
|
445
|
+
label: t('components.dropdown.stories.options.option5')
|
|
446
|
+
}],
|
|
447
|
+
placeholder: t('components.dropdown.stories.default.placeholder')
|
|
448
|
+
}
|
|
449
|
+
}`,...I.parameters?.docs?.source}}};const Se=["Default","Controlled","WithLabel","Shapes","States","WithSearch","Interactive"];export{w as Controlled,g as Default,I as Interactive,y as Shapes,h as States,b as WithLabel,f as WithSearch,Se as __namedExportsOrder,Pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as _}from"./iframe-DfPay7Zl.js";function en(t){return Object.prototype.toString.call(t)==="[object Object]"}function zt(t){return en(t)||Array.isArray(t)}function on(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function vt(t,n){const o=Object.keys(t),s=Object.keys(n);if(o.length!==s.length)return!1;const c=JSON.stringify(Object.keys(t.breakpoints||{})),r=JSON.stringify(Object.keys(n.breakpoints||{}));return c!==r?!1:o.every(e=>{const f=t[e],i=n[e];return typeof f=="function"?`${f}`==`${i}`:!zt(f)||!zt(i)?f===i:vt(f,i)})}function jt(t){return t.concat().sort((n,o)=>n.name>o.name?1:-1).map(n=>n.options)}function rn(t,n){if(t.length!==n.length)return!1;const o=jt(t),s=jt(n);return o.every((c,r)=>{const e=s[r];return vt(c,e)})}function At(t){return typeof t=="number"}function It(t){return typeof t=="string"}function St(t){return typeof t=="boolean"}function Gt(t){return Object.prototype.toString.call(t)==="[object Object]"}function w(t){return Math.abs(t)}function Ot(t){return Math.sign(t)}function at(t,n){return w(t-n)}function sn(t,n){if(t===0||n===0||w(t)<=w(n))return 0;const o=at(w(t),w(n));return w(o/t)}function cn(t){return Math.round(t*100)/100}function lt(t){return dt(t).map(Number)}function z(t){return t[mt(t)]}function mt(t){return Math.max(0,t.length-1)}function Dt(t,n){return n===mt(t)}function Ht(t,n=0){return Array.from(Array(t),(o,s)=>n+s)}function dt(t){return Object.keys(t)}function Rt(t,n){return[t,n].reduce((o,s)=>(dt(s).forEach(c=>{const r=o[c],e=s[c],f=Gt(r)&&Gt(e);o[c]=f?Rt(r,e):e}),o),{})}function Tt(t,n){return typeof n.MouseEvent<"u"&&t instanceof n.MouseEvent}function un(t,n){const o={start:s,center:c,end:r};function s(){return 0}function c(i){return r(i)/2}function r(i){return n-i}function e(i,u){return It(t)?o[t](i):t(n,i,u)}return{measure:e}}function pt(){let t=[];function n(c,r,e,f={passive:!0}){let i;if("addEventListener"in c)c.addEventListener(r,e,f),i=()=>c.removeEventListener(r,e,f);else{const u=c;u.addListener(e),i=()=>u.removeListener(e)}return t.push(i),s}function o(){t=t.filter(c=>c())}const s={add:n,clear:o};return s}function fn(t,n,o,s){const c=pt(),r=1e3/60;let e=null,f=0,i=0;function u(){c.add(t,"visibilitychange",()=>{t.hidden&&l()})}function h(){b(),c.clear()}function d(g){if(!i)return;e||(e=g,o(),o());const a=g-e;for(e=g,f+=a;f>=r;)o(),f-=r;const S=f/r;s(S),i&&(i=n.requestAnimationFrame(d))}function p(){i||(i=n.requestAnimationFrame(d))}function b(){n.cancelAnimationFrame(i),e=null,f=0,i=0}function l(){e=null,f=0}return{init:u,destroy:h,start:p,stop:b,update:o,render:s}}function an(t,n){const o=n==="rtl",s=t==="y",c=s?"y":"x",r=s?"x":"y",e=!s&&o?-1:1,f=h(),i=d();function u(l){const{height:m,width:g}=l;return s?m:g}function h(){return s?"top":o?"right":"left"}function d(){return s?"bottom":o?"left":"right"}function p(l){return l*e}return{scroll:c,cross:r,startEdge:f,endEdge:i,measureSize:u,direction:p}}function nt(t=0,n=0){const o=w(t-n);function s(u){return u<t}function c(u){return u>n}function r(u){return s(u)||c(u)}function e(u){return r(u)?s(u)?t:n:u}function f(u){return o?u-o*Math.ceil((u-n)/o):u}return{length:o,max:n,min:t,constrain:e,reachedAny:r,reachedMax:c,reachedMin:s,removeOffset:f}}function qt(t,n,o){const{constrain:s}=nt(0,t),c=t+1;let r=e(n);function e(p){return o?w((c+p)%c):s(p)}function f(){return r}function i(p){return r=e(p),d}function u(p){return h().set(f()+p)}function h(){return qt(t,f(),o)}const d={get:f,set:i,add:u,clone:h};return d}function ln(t,n,o,s,c,r,e,f,i,u,h,d,p,b,l,m,g,a,S){const{cross:x,direction:I}=t,D=["INPUT","SELECT","TEXTAREA"],T={passive:!1},E=pt(),L=pt(),v=nt(50,225).constrain(b.measure(20)),P={mouse:300,touch:400},A={mouse:500,touch:600},N=l?43:25;let j=!1,G=0,H=0,Z=!1,X=!1,$=!1,U=!1;function st(y){if(!S)return;function O(k){(St(S)||S(y,k))&&ct(k)}const F=n;E.add(F,"dragstart",k=>k.preventDefault(),T).add(F,"touchmove",()=>{},T).add(F,"touchend",()=>{}).add(F,"touchstart",O).add(F,"mousedown",O).add(F,"touchcancel",C).add(F,"contextmenu",C).add(F,"click",Q,!0)}function R(){E.clear(),L.clear()}function et(){const y=U?o:n;L.add(y,"touchmove",B,T).add(y,"touchend",C).add(y,"mousemove",B,T).add(y,"mouseup",C)}function ot(y){const O=y.nodeName||"";return D.includes(O)}function K(){return(l?A:P)[U?"mouse":"touch"]}function it(y,O){const F=d.add(Ot(y)*-1),k=h.byDistance(y,!l).distance;return l||w(y)<v?k:g&&O?k*.5:h.byIndex(F.get(),0).distance}function ct(y){const O=Tt(y,s);U=O,$=l&&O&&!y.buttons&&j,j=at(c.get(),e.get())>=2,!(O&&y.button!==0)&&(ot(y.target)||(Z=!0,r.pointerDown(y),u.useFriction(0).useDuration(0),c.set(e),et(),G=r.readPoint(y),H=r.readPoint(y,x),p.emit("pointerDown")))}function B(y){if(!Tt(y,s)&&y.touches.length>=2)return C(y);const F=r.readPoint(y),k=r.readPoint(y,x),q=at(F,G),J=at(k,H);if(!X&&!U&&(!y.cancelable||(X=q>J,!X)))return C(y);const W=r.pointerMove(y);q>m&&($=!0),u.useFriction(.3).useDuration(.75),f.start(),c.add(I(W)),y.preventDefault()}function C(y){const F=h.byDistance(0,!1).index!==d.get(),k=r.pointerUp(y)*K(),q=it(I(k),F),J=sn(k,q),W=N-10*J,Y=a+J/50;X=!1,Z=!1,L.clear(),u.useDuration(W).useFriction(Y),i.distance(q,!l),U=!1,p.emit("pointerUp")}function Q(y){$&&(y.stopPropagation(),y.preventDefault(),$=!1)}function V(){return Z}return{init:st,destroy:R,pointerDown:V}}function dn(t,n){let s,c;function r(d){return d.timeStamp}function e(d,p){const l=`client${(p||t.scroll)==="x"?"X":"Y"}`;return(Tt(d,n)?d:d.touches[0])[l]}function f(d){return s=d,c=d,e(d)}function i(d){const p=e(d)-e(c),b=r(d)-r(s)>170;return c=d,b&&(s=d),p}function u(d){if(!s||!c)return 0;const p=e(c)-e(s),b=r(d)-r(s),l=r(d)-r(c)>170,m=p/b;return b&&!l&&w(m)>.1?m:0}return{pointerDown:f,pointerMove:i,pointerUp:u,readPoint:e}}function pn(){function t(o){const{offsetTop:s,offsetLeft:c,offsetWidth:r,offsetHeight:e}=o;return{top:s,right:c+r,bottom:s+e,left:c,width:r,height:e}}return{measure:t}}function mn(t){function n(s){return t*(s/100)}return{measure:n}}function gn(t,n,o,s,c,r,e){const f=[t].concat(s);let i,u,h=[],d=!1;function p(g){return c.measureSize(e.measure(g))}function b(g){if(!r)return;u=p(t),h=s.map(p);function a(S){for(const x of S){if(d)return;const I=x.target===t,D=s.indexOf(x.target),T=I?u:h[D],E=p(I?t:s[D]);if(w(E-T)>=.5){g.reInit(),n.emit("resize");break}}}i=new ResizeObserver(S=>{(St(r)||r(g,S))&&a(S)}),o.requestAnimationFrame(()=>{f.forEach(S=>i.observe(S))})}function l(){d=!0,i&&i.disconnect()}return{init:b,destroy:l}}function hn(t,n,o,s,c,r){let e=0,f=0,i=c,u=r,h=t.get(),d=0;function p(){const T=s.get()-t.get(),E=!i;let L=0;return E?(e=0,o.set(s),t.set(s),L=T):(o.set(t),e+=T/i,e*=u,h+=e,t.add(e),L=h-d),f=Ot(L),d=h,D}function b(){const T=s.get()-n.get();return w(T)<.001}function l(){return i}function m(){return f}function g(){return e}function a(){return x(c)}function S(){return I(r)}function x(T){return i=T,D}function I(T){return u=T,D}const D={direction:m,duration:l,velocity:g,seek:p,settled:b,useBaseFriction:S,useBaseDuration:a,useFriction:I,useDuration:x};return D}function Sn(t,n,o,s,c){const r=c.measure(10),e=c.measure(50),f=nt(.1,.99);let i=!1;function u(){return!(i||!t.reachedAny(o.get())||!t.reachedAny(n.get()))}function h(b){if(!u())return;const l=t.reachedMin(n.get())?"min":"max",m=w(t[l]-n.get()),g=o.get()-n.get(),a=f.constrain(m/e);o.subtract(g*a),!b&&w(g)<r&&(o.set(t.constrain(o.get())),s.useDuration(25).useBaseFriction())}function d(b){i=!b}return{shouldConstrain:u,constrain:h,toggleActive:d}}function yn(t,n,o,s,c){const r=nt(-n+t,0),e=d(),f=h(),i=p();function u(l,m){return at(l,m)<=1}function h(){const l=e[0],m=z(e),g=e.lastIndexOf(l),a=e.indexOf(m)+1;return nt(g,a)}function d(){return o.map((l,m)=>{const{min:g,max:a}=r,S=r.constrain(l),x=!m,I=Dt(o,m);return x?a:I||u(g,S)?g:u(a,S)?a:S}).map(l=>parseFloat(l.toFixed(3)))}function p(){if(n<=t+c)return[r.max];if(s==="keepSnaps")return e;const{min:l,max:m}=f;return e.slice(l,m)}return{snapsContained:i,scrollContainLimit:f}}function bn(t,n,o){const s=n[0],c=o?s-t:z(n);return{limit:nt(c,s)}}function xn(t,n,o,s){const r=n.min+.1,e=n.max+.1,{reachedMin:f,reachedMax:i}=nt(r,e);function u(p){return p===1?i(o.get()):p===-1?f(o.get()):!1}function h(p){if(!u(p))return;const b=t*(p*-1);s.forEach(l=>l.add(b))}return{loop:h}}function En(t){const{max:n,length:o}=t;function s(r){const e=r-n;return o?e/-o:0}return{get:s}}function Ln(t,n,o,s,c){const{startEdge:r,endEdge:e}=t,{groupSlides:f}=c,i=d().map(n.measure),u=p(),h=b();function d(){return f(s).map(m=>z(m)[e]-m[0][r]).map(w)}function p(){return s.map(m=>o[r]-m[r]).map(m=>-w(m))}function b(){return f(u).map(m=>m[0]).map((m,g)=>m+i[g])}return{snaps:u,snapsAligned:h}}function In(t,n,o,s,c,r){const{groupSlides:e}=c,{min:f,max:i}=s,u=h();function h(){const p=e(r),b=!t||n==="keepSnaps";return o.length===1?[r]:b?p:p.slice(f,i).map((l,m,g)=>{const a=!m,S=Dt(g,m);if(a){const x=z(g[0])+1;return Ht(x)}if(S){const x=mt(r)-z(g)[0]+1;return Ht(x,z(g)[0])}return l})}return{slideRegistry:u}}function Tn(t,n,o,s,c){const{reachedAny:r,removeOffset:e,constrain:f}=s;function i(l){return l.concat().sort((m,g)=>w(m)-w(g))[0]}function u(l){const m=t?e(l):f(l),g=n.map((S,x)=>({diff:h(S-m,0),index:x})).sort((S,x)=>w(S.diff)-w(x.diff)),{index:a}=g[0];return{index:a,distance:m}}function h(l,m){const g=[l,l+o,l-o];if(!t)return l;if(!m)return i(g);const a=g.filter(S=>Ot(S)===m);return a.length?i(a):z(g)-o}function d(l,m){const g=n[l]-c.get(),a=h(g,m);return{index:l,distance:a}}function p(l,m){const g=c.get()+l,{index:a,distance:S}=u(g),x=!t&&r(g);if(!m||x)return{index:a,distance:l};const I=n[a]-S,D=l+h(I,0);return{index:a,distance:D}}return{byDistance:p,byIndex:d,shortcut:h}}function vn(t,n,o,s,c,r,e){function f(d){const p=d.distance,b=d.index!==n.get();r.add(p),p&&(s.duration()?t.start():(t.update(),t.render(1),t.update())),b&&(o.set(n.get()),n.set(d.index),e.emit("select"))}function i(d,p){const b=c.byDistance(d,p);f(b)}function u(d,p){const b=n.clone().set(d),l=c.byIndex(b.get(),p);f(l)}return{distance:i,index:u}}function An(t,n,o,s,c,r,e,f){const i={passive:!0,capture:!0};let u=0;function h(b){if(!f)return;function l(m){if(new Date().getTime()-u>10)return;e.emit("slideFocusStart"),t.scrollLeft=0;const S=o.findIndex(x=>x.includes(m));At(S)&&(c.useDuration(0),s.index(S,0),e.emit("slideFocus"))}r.add(document,"keydown",d,!1),n.forEach((m,g)=>{r.add(m,"focus",a=>{(St(f)||f(b,a))&&l(g)},i)})}function d(b){b.code==="Tab"&&(u=new Date().getTime())}return{init:h}}function ft(t){let n=t;function o(){return n}function s(i){n=e(i)}function c(i){n+=e(i)}function r(i){n-=e(i)}function e(i){return At(i)?i:i.get()}return{get:o,set:s,add:c,subtract:r}}function $t(t,n){const o=t.scroll==="x"?e:f,s=n.style;let c=null,r=!1;function e(p){return`translate3d(${p}px,0px,0px)`}function f(p){return`translate3d(0px,${p}px,0px)`}function i(p){if(r)return;const b=cn(t.direction(p));b!==c&&(s.transform=o(b),c=b)}function u(p){r=!p}function h(){r||(s.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:h,to:i,toggleActive:u}}function On(t,n,o,s,c,r,e,f,i){const h=lt(c),d=lt(c).reverse(),p=a().concat(S());function b(E,L){return E.reduce((v,P)=>v-c[P],L)}function l(E,L){return E.reduce((v,P)=>b(v,L)>0?v.concat([P]):v,[])}function m(E){return r.map((L,v)=>({start:L-s[v]+.5+E,end:L+n-.5+E}))}function g(E,L,v){const P=m(L);return E.map(A=>{const N=v?0:-o,j=v?o:0,G=v?"end":"start",H=P[A][G];return{index:A,loopPoint:H,slideLocation:ft(-1),translate:$t(t,i[A]),target:()=>f.get()>H?N:j}})}function a(){const E=e[0],L=l(d,E);return g(L,o,!1)}function S(){const E=n-e[0]-1,L=l(h,E);return g(L,-o,!0)}function x(){return p.every(({index:E})=>{const L=h.filter(v=>v!==E);return b(L,n)<=.1})}function I(){p.forEach(E=>{const{target:L,translate:v,slideLocation:P}=E,A=L();A!==P.get()&&(v.to(A),P.set(A))})}function D(){p.forEach(E=>E.translate.clear())}return{canLoop:x,clear:D,loop:I,loopPoints:p}}function Dn(t,n,o){let s,c=!1;function r(i){if(!o)return;function u(h){for(const d of h)if(d.type==="childList"){i.reInit(),n.emit("slidesChanged");break}}s=new MutationObserver(h=>{c||(St(o)||o(i,h))&&u(h)}),s.observe(t,{childList:!0})}function e(){s&&s.disconnect(),c=!0}return{init:r,destroy:e}}function Mn(t,n,o,s){const c={};let r=null,e=null,f,i=!1;function u(){f=new IntersectionObserver(l=>{i||(l.forEach(m=>{const g=n.indexOf(m.target);c[g]=m}),r=null,e=null,o.emit("slidesInView"))},{root:t.parentElement,threshold:s}),n.forEach(l=>f.observe(l))}function h(){f&&f.disconnect(),i=!0}function d(l){return dt(c).reduce((m,g)=>{const a=parseInt(g),{isIntersecting:S}=c[a];return(l&&S||!l&&!S)&&m.push(a),m},[])}function p(l=!0){if(l&&r)return r;if(!l&&e)return e;const m=d(l);return l&&(r=m),l||(e=m),m}return{init:u,destroy:h,get:p}}function wn(t,n,o,s,c,r){const{measureSize:e,startEdge:f,endEdge:i}=t,u=o[0]&&c,h=l(),d=m(),p=o.map(e),b=g();function l(){if(!u)return 0;const S=o[0];return w(n[f]-S[f])}function m(){if(!u)return 0;const S=r.getComputedStyle(z(s));return parseFloat(S.getPropertyValue(`margin-${i}`))}function g(){return o.map((S,x,I)=>{const D=!x,T=Dt(I,x);return D?p[x]+h:T?p[x]+d:I[x+1][f]-S[f]}).map(w)}return{slideSizes:p,slideSizesWithGaps:b,startGap:h,endGap:d}}function Pn(t,n,o,s,c,r,e,f,i){const{startEdge:u,endEdge:h,direction:d}=t,p=At(o);function b(a,S){return lt(a).filter(x=>x%S===0).map(x=>a.slice(x,x+S))}function l(a){return a.length?lt(a).reduce((S,x,I)=>{const D=z(S)||0,T=D===0,E=x===mt(a),L=c[u]-r[D][u],v=c[u]-r[x][h],P=!s&&T?d(e):0,A=!s&&E?d(f):0,N=w(v-A-(L+P));return I&&N>n+i&&S.push(x),E&&S.push(a.length),S},[]).map((S,x,I)=>{const D=Math.max(I[x-1]||0);return a.slice(D,S)}):[]}function m(a){return p?b(a,o):l(a)}return{groupSlides:m}}function Fn(t,n,o,s,c,r,e){const{align:f,axis:i,direction:u,startIndex:h,loop:d,duration:p,dragFree:b,dragThreshold:l,inViewThreshold:m,slidesToScroll:g,skipSnaps:a,containScroll:S,watchResize:x,watchSlides:I,watchDrag:D,watchFocus:T}=r,E=2,L=pn(),v=L.measure(n),P=o.map(L.measure),A=an(i,u),N=A.measureSize(v),j=mn(N),G=un(f,N),H=!d&&!!S,Z=d||!!S,{slideSizes:X,slideSizesWithGaps:$,startGap:U,endGap:st}=wn(A,v,P,o,Z,c),R=Pn(A,N,g,d,v,P,U,st,E),{snaps:et,snapsAligned:ot}=Ln(A,G,v,P,R),K=-z(et)+z($),{snapsContained:it,scrollContainLimit:ct}=yn(N,K,ot,S,E),B=H?it:ot,{limit:C}=bn(K,B,d),Q=qt(mt(B),h,d),V=Q.clone(),M=lt(o),y=({dragHandler:rt,scrollBody:Et,scrollBounds:Lt,options:{loop:gt}})=>{gt||Lt.constrain(rt.pointerDown()),Et.seek()},O=({scrollBody:rt,translate:Et,location:Lt,offsetLocation:gt,previousLocation:Jt,scrollLooper:Xt,slideLooper:Yt,dragHandler:_t,animation:Zt,eventHandler:Ft,scrollBounds:Wt,options:{loop:Ct}},kt)=>{const Nt=rt.settled(),tn=!Wt.shouldConstrain(),Bt=Ct?Nt:Nt&&tn,Vt=Bt&&!_t.pointerDown();Vt&&Zt.stop();const nn=Lt.get()*kt+Jt.get()*(1-kt);gt.set(nn),Ct&&(Xt.loop(rt.direction()),Yt.loop()),Et.to(gt.get()),Vt&&Ft.emit("settle"),Bt||Ft.emit("scroll")},F=fn(s,c,()=>y(xt),rt=>O(xt,rt)),k=.68,q=B[Q.get()],J=ft(q),W=ft(q),Y=ft(q),tt=ft(q),ut=hn(J,Y,W,tt,p,k),yt=Tn(d,B,K,C,tt),bt=vn(F,Q,V,ut,yt,tt,e),Mt=En(C),wt=pt(),Kt=Mn(n,o,e,m),{slideRegistry:Pt}=In(H,S,B,ct,R,M),Qt=An(t,o,Pt,bt,ut,wt,e,T),xt={ownerDocument:s,ownerWindow:c,eventHandler:e,containerRect:v,slideRects:P,animation:F,axis:A,dragHandler:ln(A,t,s,c,tt,dn(A,c),J,F,bt,ut,yt,Q,e,j,b,l,a,k,D),eventStore:wt,percentOfView:j,index:Q,indexPrevious:V,limit:C,location:J,offsetLocation:Y,previousLocation:W,options:r,resizeHandler:gn(n,e,c,o,A,x,L),scrollBody:ut,scrollBounds:Sn(C,Y,tt,ut,j),scrollLooper:xn(K,C,Y,[J,Y,W,tt]),scrollProgress:Mt,scrollSnapList:B.map(Mt.get),scrollSnaps:B,scrollTarget:yt,scrollTo:bt,slideLooper:On(A,N,K,X,$,et,B,Y,o),slideFocus:Qt,slidesHandler:Dn(n,e,I),slidesInView:Kt,slideIndexes:M,slideRegistry:Pt,slidesToScroll:R,target:tt,translate:$t(A,n)};return xt}function Cn(){let t={},n;function o(u){n=u}function s(u){return t[u]||[]}function c(u){return s(u).forEach(h=>h(n,u)),i}function r(u,h){return t[u]=s(u).concat([h]),i}function e(u,h){return t[u]=s(u).filter(d=>d!==h),i}function f(){t={}}const i={init:o,emit:c,off:e,on:r,clear:f};return i}const kn={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Nn(t){function n(r,e){return Rt(r,e||{})}function o(r){const e=r.breakpoints||{},f=dt(e).filter(i=>t.matchMedia(i).matches).map(i=>e[i]).reduce((i,u)=>n(i,u),{});return n(r,f)}function s(r){return r.map(e=>dt(e.breakpoints||{})).reduce((e,f)=>e.concat(f),[]).map(t.matchMedia)}return{mergeOptions:n,optionsAtMedia:o,optionsMediaQueries:s}}function Bn(t){let n=[];function o(r,e){return n=e.filter(({options:f})=>t.optionsAtMedia(f).active!==!1),n.forEach(f=>f.init(r,t)),e.reduce((f,i)=>Object.assign(f,{[i.name]:i}),{})}function s(){n=n.filter(r=>r.destroy())}return{init:o,destroy:s}}function ht(t,n,o){const s=t.ownerDocument,c=s.defaultView,r=Nn(c),e=Bn(r),f=pt(),i=Cn(),{mergeOptions:u,optionsAtMedia:h,optionsMediaQueries:d}=r,{on:p,off:b,emit:l}=i,m=A;let g=!1,a,S=u(kn,ht.globalOptions),x=u(S),I=[],D,T,E;function L(){const{container:M,slides:y}=x;T=(It(M)?t.querySelector(M):M)||t.children[0];const F=It(y)?T.querySelectorAll(y):y;E=[].slice.call(F||T.children)}function v(M){const y=Fn(t,T,E,s,c,M,i);if(M.loop&&!y.slideLooper.canLoop()){const O=Object.assign({},M,{loop:!1});return v(O)}return y}function P(M,y){g||(S=u(S,M),x=h(S),I=y||I,L(),a=v(x),d([S,...I.map(({options:O})=>O)]).forEach(O=>f.add(O,"change",A)),x.active&&(a.translate.to(a.location.get()),a.animation.init(),a.slidesInView.init(),a.slideFocus.init(V),a.eventHandler.init(V),a.resizeHandler.init(V),a.slidesHandler.init(V),a.options.loop&&a.slideLooper.loop(),T.offsetParent&&E.length&&a.dragHandler.init(V),D=e.init(V,I)))}function A(M,y){const O=R();N(),P(u({startIndex:O},M),y),i.emit("reInit")}function N(){a.dragHandler.destroy(),a.eventStore.clear(),a.translate.clear(),a.slideLooper.clear(),a.resizeHandler.destroy(),a.slidesHandler.destroy(),a.slidesInView.destroy(),a.animation.destroy(),e.destroy(),f.clear()}function j(){g||(g=!0,f.clear(),N(),i.emit("destroy"),i.clear())}function G(M,y,O){!x.active||g||(a.scrollBody.useBaseFriction().useDuration(y===!0?0:x.duration),a.scrollTo.index(M,O||0))}function H(M){const y=a.index.add(1).get();G(y,M,-1)}function Z(M){const y=a.index.add(-1).get();G(y,M,1)}function X(){return a.index.add(1).get()!==R()}function $(){return a.index.add(-1).get()!==R()}function U(){return a.scrollSnapList}function st(){return a.scrollProgress.get(a.offsetLocation.get())}function R(){return a.index.get()}function et(){return a.indexPrevious.get()}function ot(){return a.slidesInView.get()}function K(){return a.slidesInView.get(!1)}function it(){return D}function ct(){return a}function B(){return t}function C(){return T}function Q(){return E}const V={canScrollNext:X,canScrollPrev:$,containerNode:C,internalEngine:ct,destroy:j,off:b,on:p,emit:l,plugins:it,previousScrollSnap:et,reInit:m,rootNode:B,scrollNext:H,scrollPrev:Z,scrollProgress:st,scrollSnapList:U,scrollTo:G,selectedScrollSnap:R,slideNodes:Q,slidesInView:ot,slidesNotInView:K};return P(n,o),setTimeout(()=>i.emit("init"),0),V}ht.globalOptions=void 0;function Ut(t={},n=[]){const o=_.useRef(t),s=_.useRef(n),[c,r]=_.useState(),[e,f]=_.useState(),i=_.useCallback(()=>{c&&c.reInit(o.current,s.current)},[c]);return _.useEffect(()=>{vt(o.current,t)||(o.current=t,i())},[t,i]),_.useEffect(()=>{rn(s.current,n)||(s.current=n,i())},[n,i]),_.useEffect(()=>{if(on()&&e){ht.globalOptions=Ut.globalOptions;const u=ht(e,o.current,s.current);return r(u),()=>u.destroy()}else r(void 0)},[e,r]),[f,c]}Ut.globalOptions=void 0;export{Ut as u};
|
|
1
|
+
import{r as _}from"./iframe-Crg_lbde.js";function en(t){return Object.prototype.toString.call(t)==="[object Object]"}function zt(t){return en(t)||Array.isArray(t)}function on(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function vt(t,n){const o=Object.keys(t),s=Object.keys(n);if(o.length!==s.length)return!1;const c=JSON.stringify(Object.keys(t.breakpoints||{})),r=JSON.stringify(Object.keys(n.breakpoints||{}));return c!==r?!1:o.every(e=>{const f=t[e],i=n[e];return typeof f=="function"?`${f}`==`${i}`:!zt(f)||!zt(i)?f===i:vt(f,i)})}function jt(t){return t.concat().sort((n,o)=>n.name>o.name?1:-1).map(n=>n.options)}function rn(t,n){if(t.length!==n.length)return!1;const o=jt(t),s=jt(n);return o.every((c,r)=>{const e=s[r];return vt(c,e)})}function At(t){return typeof t=="number"}function It(t){return typeof t=="string"}function St(t){return typeof t=="boolean"}function Gt(t){return Object.prototype.toString.call(t)==="[object Object]"}function w(t){return Math.abs(t)}function Ot(t){return Math.sign(t)}function at(t,n){return w(t-n)}function sn(t,n){if(t===0||n===0||w(t)<=w(n))return 0;const o=at(w(t),w(n));return w(o/t)}function cn(t){return Math.round(t*100)/100}function lt(t){return dt(t).map(Number)}function z(t){return t[mt(t)]}function mt(t){return Math.max(0,t.length-1)}function Dt(t,n){return n===mt(t)}function Ht(t,n=0){return Array.from(Array(t),(o,s)=>n+s)}function dt(t){return Object.keys(t)}function Rt(t,n){return[t,n].reduce((o,s)=>(dt(s).forEach(c=>{const r=o[c],e=s[c],f=Gt(r)&&Gt(e);o[c]=f?Rt(r,e):e}),o),{})}function Tt(t,n){return typeof n.MouseEvent<"u"&&t instanceof n.MouseEvent}function un(t,n){const o={start:s,center:c,end:r};function s(){return 0}function c(i){return r(i)/2}function r(i){return n-i}function e(i,u){return It(t)?o[t](i):t(n,i,u)}return{measure:e}}function pt(){let t=[];function n(c,r,e,f={passive:!0}){let i;if("addEventListener"in c)c.addEventListener(r,e,f),i=()=>c.removeEventListener(r,e,f);else{const u=c;u.addListener(e),i=()=>u.removeListener(e)}return t.push(i),s}function o(){t=t.filter(c=>c())}const s={add:n,clear:o};return s}function fn(t,n,o,s){const c=pt(),r=1e3/60;let e=null,f=0,i=0;function u(){c.add(t,"visibilitychange",()=>{t.hidden&&l()})}function h(){b(),c.clear()}function d(g){if(!i)return;e||(e=g,o(),o());const a=g-e;for(e=g,f+=a;f>=r;)o(),f-=r;const S=f/r;s(S),i&&(i=n.requestAnimationFrame(d))}function p(){i||(i=n.requestAnimationFrame(d))}function b(){n.cancelAnimationFrame(i),e=null,f=0,i=0}function l(){e=null,f=0}return{init:u,destroy:h,start:p,stop:b,update:o,render:s}}function an(t,n){const o=n==="rtl",s=t==="y",c=s?"y":"x",r=s?"x":"y",e=!s&&o?-1:1,f=h(),i=d();function u(l){const{height:m,width:g}=l;return s?m:g}function h(){return s?"top":o?"right":"left"}function d(){return s?"bottom":o?"left":"right"}function p(l){return l*e}return{scroll:c,cross:r,startEdge:f,endEdge:i,measureSize:u,direction:p}}function nt(t=0,n=0){const o=w(t-n);function s(u){return u<t}function c(u){return u>n}function r(u){return s(u)||c(u)}function e(u){return r(u)?s(u)?t:n:u}function f(u){return o?u-o*Math.ceil((u-n)/o):u}return{length:o,max:n,min:t,constrain:e,reachedAny:r,reachedMax:c,reachedMin:s,removeOffset:f}}function qt(t,n,o){const{constrain:s}=nt(0,t),c=t+1;let r=e(n);function e(p){return o?w((c+p)%c):s(p)}function f(){return r}function i(p){return r=e(p),d}function u(p){return h().set(f()+p)}function h(){return qt(t,f(),o)}const d={get:f,set:i,add:u,clone:h};return d}function ln(t,n,o,s,c,r,e,f,i,u,h,d,p,b,l,m,g,a,S){const{cross:x,direction:I}=t,D=["INPUT","SELECT","TEXTAREA"],T={passive:!1},E=pt(),L=pt(),v=nt(50,225).constrain(b.measure(20)),P={mouse:300,touch:400},A={mouse:500,touch:600},N=l?43:25;let j=!1,G=0,H=0,Z=!1,X=!1,$=!1,U=!1;function st(y){if(!S)return;function O(k){(St(S)||S(y,k))&&ct(k)}const F=n;E.add(F,"dragstart",k=>k.preventDefault(),T).add(F,"touchmove",()=>{},T).add(F,"touchend",()=>{}).add(F,"touchstart",O).add(F,"mousedown",O).add(F,"touchcancel",C).add(F,"contextmenu",C).add(F,"click",Q,!0)}function R(){E.clear(),L.clear()}function et(){const y=U?o:n;L.add(y,"touchmove",B,T).add(y,"touchend",C).add(y,"mousemove",B,T).add(y,"mouseup",C)}function ot(y){const O=y.nodeName||"";return D.includes(O)}function K(){return(l?A:P)[U?"mouse":"touch"]}function it(y,O){const F=d.add(Ot(y)*-1),k=h.byDistance(y,!l).distance;return l||w(y)<v?k:g&&O?k*.5:h.byIndex(F.get(),0).distance}function ct(y){const O=Tt(y,s);U=O,$=l&&O&&!y.buttons&&j,j=at(c.get(),e.get())>=2,!(O&&y.button!==0)&&(ot(y.target)||(Z=!0,r.pointerDown(y),u.useFriction(0).useDuration(0),c.set(e),et(),G=r.readPoint(y),H=r.readPoint(y,x),p.emit("pointerDown")))}function B(y){if(!Tt(y,s)&&y.touches.length>=2)return C(y);const F=r.readPoint(y),k=r.readPoint(y,x),q=at(F,G),J=at(k,H);if(!X&&!U&&(!y.cancelable||(X=q>J,!X)))return C(y);const W=r.pointerMove(y);q>m&&($=!0),u.useFriction(.3).useDuration(.75),f.start(),c.add(I(W)),y.preventDefault()}function C(y){const F=h.byDistance(0,!1).index!==d.get(),k=r.pointerUp(y)*K(),q=it(I(k),F),J=sn(k,q),W=N-10*J,Y=a+J/50;X=!1,Z=!1,L.clear(),u.useDuration(W).useFriction(Y),i.distance(q,!l),U=!1,p.emit("pointerUp")}function Q(y){$&&(y.stopPropagation(),y.preventDefault(),$=!1)}function V(){return Z}return{init:st,destroy:R,pointerDown:V}}function dn(t,n){let s,c;function r(d){return d.timeStamp}function e(d,p){const l=`client${(p||t.scroll)==="x"?"X":"Y"}`;return(Tt(d,n)?d:d.touches[0])[l]}function f(d){return s=d,c=d,e(d)}function i(d){const p=e(d)-e(c),b=r(d)-r(s)>170;return c=d,b&&(s=d),p}function u(d){if(!s||!c)return 0;const p=e(c)-e(s),b=r(d)-r(s),l=r(d)-r(c)>170,m=p/b;return b&&!l&&w(m)>.1?m:0}return{pointerDown:f,pointerMove:i,pointerUp:u,readPoint:e}}function pn(){function t(o){const{offsetTop:s,offsetLeft:c,offsetWidth:r,offsetHeight:e}=o;return{top:s,right:c+r,bottom:s+e,left:c,width:r,height:e}}return{measure:t}}function mn(t){function n(s){return t*(s/100)}return{measure:n}}function gn(t,n,o,s,c,r,e){const f=[t].concat(s);let i,u,h=[],d=!1;function p(g){return c.measureSize(e.measure(g))}function b(g){if(!r)return;u=p(t),h=s.map(p);function a(S){for(const x of S){if(d)return;const I=x.target===t,D=s.indexOf(x.target),T=I?u:h[D],E=p(I?t:s[D]);if(w(E-T)>=.5){g.reInit(),n.emit("resize");break}}}i=new ResizeObserver(S=>{(St(r)||r(g,S))&&a(S)}),o.requestAnimationFrame(()=>{f.forEach(S=>i.observe(S))})}function l(){d=!0,i&&i.disconnect()}return{init:b,destroy:l}}function hn(t,n,o,s,c,r){let e=0,f=0,i=c,u=r,h=t.get(),d=0;function p(){const T=s.get()-t.get(),E=!i;let L=0;return E?(e=0,o.set(s),t.set(s),L=T):(o.set(t),e+=T/i,e*=u,h+=e,t.add(e),L=h-d),f=Ot(L),d=h,D}function b(){const T=s.get()-n.get();return w(T)<.001}function l(){return i}function m(){return f}function g(){return e}function a(){return x(c)}function S(){return I(r)}function x(T){return i=T,D}function I(T){return u=T,D}const D={direction:m,duration:l,velocity:g,seek:p,settled:b,useBaseFriction:S,useBaseDuration:a,useFriction:I,useDuration:x};return D}function Sn(t,n,o,s,c){const r=c.measure(10),e=c.measure(50),f=nt(.1,.99);let i=!1;function u(){return!(i||!t.reachedAny(o.get())||!t.reachedAny(n.get()))}function h(b){if(!u())return;const l=t.reachedMin(n.get())?"min":"max",m=w(t[l]-n.get()),g=o.get()-n.get(),a=f.constrain(m/e);o.subtract(g*a),!b&&w(g)<r&&(o.set(t.constrain(o.get())),s.useDuration(25).useBaseFriction())}function d(b){i=!b}return{shouldConstrain:u,constrain:h,toggleActive:d}}function yn(t,n,o,s,c){const r=nt(-n+t,0),e=d(),f=h(),i=p();function u(l,m){return at(l,m)<=1}function h(){const l=e[0],m=z(e),g=e.lastIndexOf(l),a=e.indexOf(m)+1;return nt(g,a)}function d(){return o.map((l,m)=>{const{min:g,max:a}=r,S=r.constrain(l),x=!m,I=Dt(o,m);return x?a:I||u(g,S)?g:u(a,S)?a:S}).map(l=>parseFloat(l.toFixed(3)))}function p(){if(n<=t+c)return[r.max];if(s==="keepSnaps")return e;const{min:l,max:m}=f;return e.slice(l,m)}return{snapsContained:i,scrollContainLimit:f}}function bn(t,n,o){const s=n[0],c=o?s-t:z(n);return{limit:nt(c,s)}}function xn(t,n,o,s){const r=n.min+.1,e=n.max+.1,{reachedMin:f,reachedMax:i}=nt(r,e);function u(p){return p===1?i(o.get()):p===-1?f(o.get()):!1}function h(p){if(!u(p))return;const b=t*(p*-1);s.forEach(l=>l.add(b))}return{loop:h}}function En(t){const{max:n,length:o}=t;function s(r){const e=r-n;return o?e/-o:0}return{get:s}}function Ln(t,n,o,s,c){const{startEdge:r,endEdge:e}=t,{groupSlides:f}=c,i=d().map(n.measure),u=p(),h=b();function d(){return f(s).map(m=>z(m)[e]-m[0][r]).map(w)}function p(){return s.map(m=>o[r]-m[r]).map(m=>-w(m))}function b(){return f(u).map(m=>m[0]).map((m,g)=>m+i[g])}return{snaps:u,snapsAligned:h}}function In(t,n,o,s,c,r){const{groupSlides:e}=c,{min:f,max:i}=s,u=h();function h(){const p=e(r),b=!t||n==="keepSnaps";return o.length===1?[r]:b?p:p.slice(f,i).map((l,m,g)=>{const a=!m,S=Dt(g,m);if(a){const x=z(g[0])+1;return Ht(x)}if(S){const x=mt(r)-z(g)[0]+1;return Ht(x,z(g)[0])}return l})}return{slideRegistry:u}}function Tn(t,n,o,s,c){const{reachedAny:r,removeOffset:e,constrain:f}=s;function i(l){return l.concat().sort((m,g)=>w(m)-w(g))[0]}function u(l){const m=t?e(l):f(l),g=n.map((S,x)=>({diff:h(S-m,0),index:x})).sort((S,x)=>w(S.diff)-w(x.diff)),{index:a}=g[0];return{index:a,distance:m}}function h(l,m){const g=[l,l+o,l-o];if(!t)return l;if(!m)return i(g);const a=g.filter(S=>Ot(S)===m);return a.length?i(a):z(g)-o}function d(l,m){const g=n[l]-c.get(),a=h(g,m);return{index:l,distance:a}}function p(l,m){const g=c.get()+l,{index:a,distance:S}=u(g),x=!t&&r(g);if(!m||x)return{index:a,distance:l};const I=n[a]-S,D=l+h(I,0);return{index:a,distance:D}}return{byDistance:p,byIndex:d,shortcut:h}}function vn(t,n,o,s,c,r,e){function f(d){const p=d.distance,b=d.index!==n.get();r.add(p),p&&(s.duration()?t.start():(t.update(),t.render(1),t.update())),b&&(o.set(n.get()),n.set(d.index),e.emit("select"))}function i(d,p){const b=c.byDistance(d,p);f(b)}function u(d,p){const b=n.clone().set(d),l=c.byIndex(b.get(),p);f(l)}return{distance:i,index:u}}function An(t,n,o,s,c,r,e,f){const i={passive:!0,capture:!0};let u=0;function h(b){if(!f)return;function l(m){if(new Date().getTime()-u>10)return;e.emit("slideFocusStart"),t.scrollLeft=0;const S=o.findIndex(x=>x.includes(m));At(S)&&(c.useDuration(0),s.index(S,0),e.emit("slideFocus"))}r.add(document,"keydown",d,!1),n.forEach((m,g)=>{r.add(m,"focus",a=>{(St(f)||f(b,a))&&l(g)},i)})}function d(b){b.code==="Tab"&&(u=new Date().getTime())}return{init:h}}function ft(t){let n=t;function o(){return n}function s(i){n=e(i)}function c(i){n+=e(i)}function r(i){n-=e(i)}function e(i){return At(i)?i:i.get()}return{get:o,set:s,add:c,subtract:r}}function $t(t,n){const o=t.scroll==="x"?e:f,s=n.style;let c=null,r=!1;function e(p){return`translate3d(${p}px,0px,0px)`}function f(p){return`translate3d(0px,${p}px,0px)`}function i(p){if(r)return;const b=cn(t.direction(p));b!==c&&(s.transform=o(b),c=b)}function u(p){r=!p}function h(){r||(s.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:h,to:i,toggleActive:u}}function On(t,n,o,s,c,r,e,f,i){const h=lt(c),d=lt(c).reverse(),p=a().concat(S());function b(E,L){return E.reduce((v,P)=>v-c[P],L)}function l(E,L){return E.reduce((v,P)=>b(v,L)>0?v.concat([P]):v,[])}function m(E){return r.map((L,v)=>({start:L-s[v]+.5+E,end:L+n-.5+E}))}function g(E,L,v){const P=m(L);return E.map(A=>{const N=v?0:-o,j=v?o:0,G=v?"end":"start",H=P[A][G];return{index:A,loopPoint:H,slideLocation:ft(-1),translate:$t(t,i[A]),target:()=>f.get()>H?N:j}})}function a(){const E=e[0],L=l(d,E);return g(L,o,!1)}function S(){const E=n-e[0]-1,L=l(h,E);return g(L,-o,!0)}function x(){return p.every(({index:E})=>{const L=h.filter(v=>v!==E);return b(L,n)<=.1})}function I(){p.forEach(E=>{const{target:L,translate:v,slideLocation:P}=E,A=L();A!==P.get()&&(v.to(A),P.set(A))})}function D(){p.forEach(E=>E.translate.clear())}return{canLoop:x,clear:D,loop:I,loopPoints:p}}function Dn(t,n,o){let s,c=!1;function r(i){if(!o)return;function u(h){for(const d of h)if(d.type==="childList"){i.reInit(),n.emit("slidesChanged");break}}s=new MutationObserver(h=>{c||(St(o)||o(i,h))&&u(h)}),s.observe(t,{childList:!0})}function e(){s&&s.disconnect(),c=!0}return{init:r,destroy:e}}function Mn(t,n,o,s){const c={};let r=null,e=null,f,i=!1;function u(){f=new IntersectionObserver(l=>{i||(l.forEach(m=>{const g=n.indexOf(m.target);c[g]=m}),r=null,e=null,o.emit("slidesInView"))},{root:t.parentElement,threshold:s}),n.forEach(l=>f.observe(l))}function h(){f&&f.disconnect(),i=!0}function d(l){return dt(c).reduce((m,g)=>{const a=parseInt(g),{isIntersecting:S}=c[a];return(l&&S||!l&&!S)&&m.push(a),m},[])}function p(l=!0){if(l&&r)return r;if(!l&&e)return e;const m=d(l);return l&&(r=m),l||(e=m),m}return{init:u,destroy:h,get:p}}function wn(t,n,o,s,c,r){const{measureSize:e,startEdge:f,endEdge:i}=t,u=o[0]&&c,h=l(),d=m(),p=o.map(e),b=g();function l(){if(!u)return 0;const S=o[0];return w(n[f]-S[f])}function m(){if(!u)return 0;const S=r.getComputedStyle(z(s));return parseFloat(S.getPropertyValue(`margin-${i}`))}function g(){return o.map((S,x,I)=>{const D=!x,T=Dt(I,x);return D?p[x]+h:T?p[x]+d:I[x+1][f]-S[f]}).map(w)}return{slideSizes:p,slideSizesWithGaps:b,startGap:h,endGap:d}}function Pn(t,n,o,s,c,r,e,f,i){const{startEdge:u,endEdge:h,direction:d}=t,p=At(o);function b(a,S){return lt(a).filter(x=>x%S===0).map(x=>a.slice(x,x+S))}function l(a){return a.length?lt(a).reduce((S,x,I)=>{const D=z(S)||0,T=D===0,E=x===mt(a),L=c[u]-r[D][u],v=c[u]-r[x][h],P=!s&&T?d(e):0,A=!s&&E?d(f):0,N=w(v-A-(L+P));return I&&N>n+i&&S.push(x),E&&S.push(a.length),S},[]).map((S,x,I)=>{const D=Math.max(I[x-1]||0);return a.slice(D,S)}):[]}function m(a){return p?b(a,o):l(a)}return{groupSlides:m}}function Fn(t,n,o,s,c,r,e){const{align:f,axis:i,direction:u,startIndex:h,loop:d,duration:p,dragFree:b,dragThreshold:l,inViewThreshold:m,slidesToScroll:g,skipSnaps:a,containScroll:S,watchResize:x,watchSlides:I,watchDrag:D,watchFocus:T}=r,E=2,L=pn(),v=L.measure(n),P=o.map(L.measure),A=an(i,u),N=A.measureSize(v),j=mn(N),G=un(f,N),H=!d&&!!S,Z=d||!!S,{slideSizes:X,slideSizesWithGaps:$,startGap:U,endGap:st}=wn(A,v,P,o,Z,c),R=Pn(A,N,g,d,v,P,U,st,E),{snaps:et,snapsAligned:ot}=Ln(A,G,v,P,R),K=-z(et)+z($),{snapsContained:it,scrollContainLimit:ct}=yn(N,K,ot,S,E),B=H?it:ot,{limit:C}=bn(K,B,d),Q=qt(mt(B),h,d),V=Q.clone(),M=lt(o),y=({dragHandler:rt,scrollBody:Et,scrollBounds:Lt,options:{loop:gt}})=>{gt||Lt.constrain(rt.pointerDown()),Et.seek()},O=({scrollBody:rt,translate:Et,location:Lt,offsetLocation:gt,previousLocation:Jt,scrollLooper:Xt,slideLooper:Yt,dragHandler:_t,animation:Zt,eventHandler:Ft,scrollBounds:Wt,options:{loop:Ct}},kt)=>{const Nt=rt.settled(),tn=!Wt.shouldConstrain(),Bt=Ct?Nt:Nt&&tn,Vt=Bt&&!_t.pointerDown();Vt&&Zt.stop();const nn=Lt.get()*kt+Jt.get()*(1-kt);gt.set(nn),Ct&&(Xt.loop(rt.direction()),Yt.loop()),Et.to(gt.get()),Vt&&Ft.emit("settle"),Bt||Ft.emit("scroll")},F=fn(s,c,()=>y(xt),rt=>O(xt,rt)),k=.68,q=B[Q.get()],J=ft(q),W=ft(q),Y=ft(q),tt=ft(q),ut=hn(J,Y,W,tt,p,k),yt=Tn(d,B,K,C,tt),bt=vn(F,Q,V,ut,yt,tt,e),Mt=En(C),wt=pt(),Kt=Mn(n,o,e,m),{slideRegistry:Pt}=In(H,S,B,ct,R,M),Qt=An(t,o,Pt,bt,ut,wt,e,T),xt={ownerDocument:s,ownerWindow:c,eventHandler:e,containerRect:v,slideRects:P,animation:F,axis:A,dragHandler:ln(A,t,s,c,tt,dn(A,c),J,F,bt,ut,yt,Q,e,j,b,l,a,k,D),eventStore:wt,percentOfView:j,index:Q,indexPrevious:V,limit:C,location:J,offsetLocation:Y,previousLocation:W,options:r,resizeHandler:gn(n,e,c,o,A,x,L),scrollBody:ut,scrollBounds:Sn(C,Y,tt,ut,j),scrollLooper:xn(K,C,Y,[J,Y,W,tt]),scrollProgress:Mt,scrollSnapList:B.map(Mt.get),scrollSnaps:B,scrollTarget:yt,scrollTo:bt,slideLooper:On(A,N,K,X,$,et,B,Y,o),slideFocus:Qt,slidesHandler:Dn(n,e,I),slidesInView:Kt,slideIndexes:M,slideRegistry:Pt,slidesToScroll:R,target:tt,translate:$t(A,n)};return xt}function Cn(){let t={},n;function o(u){n=u}function s(u){return t[u]||[]}function c(u){return s(u).forEach(h=>h(n,u)),i}function r(u,h){return t[u]=s(u).concat([h]),i}function e(u,h){return t[u]=s(u).filter(d=>d!==h),i}function f(){t={}}const i={init:o,emit:c,off:e,on:r,clear:f};return i}const kn={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Nn(t){function n(r,e){return Rt(r,e||{})}function o(r){const e=r.breakpoints||{},f=dt(e).filter(i=>t.matchMedia(i).matches).map(i=>e[i]).reduce((i,u)=>n(i,u),{});return n(r,f)}function s(r){return r.map(e=>dt(e.breakpoints||{})).reduce((e,f)=>e.concat(f),[]).map(t.matchMedia)}return{mergeOptions:n,optionsAtMedia:o,optionsMediaQueries:s}}function Bn(t){let n=[];function o(r,e){return n=e.filter(({options:f})=>t.optionsAtMedia(f).active!==!1),n.forEach(f=>f.init(r,t)),e.reduce((f,i)=>Object.assign(f,{[i.name]:i}),{})}function s(){n=n.filter(r=>r.destroy())}return{init:o,destroy:s}}function ht(t,n,o){const s=t.ownerDocument,c=s.defaultView,r=Nn(c),e=Bn(r),f=pt(),i=Cn(),{mergeOptions:u,optionsAtMedia:h,optionsMediaQueries:d}=r,{on:p,off:b,emit:l}=i,m=A;let g=!1,a,S=u(kn,ht.globalOptions),x=u(S),I=[],D,T,E;function L(){const{container:M,slides:y}=x;T=(It(M)?t.querySelector(M):M)||t.children[0];const F=It(y)?T.querySelectorAll(y):y;E=[].slice.call(F||T.children)}function v(M){const y=Fn(t,T,E,s,c,M,i);if(M.loop&&!y.slideLooper.canLoop()){const O=Object.assign({},M,{loop:!1});return v(O)}return y}function P(M,y){g||(S=u(S,M),x=h(S),I=y||I,L(),a=v(x),d([S,...I.map(({options:O})=>O)]).forEach(O=>f.add(O,"change",A)),x.active&&(a.translate.to(a.location.get()),a.animation.init(),a.slidesInView.init(),a.slideFocus.init(V),a.eventHandler.init(V),a.resizeHandler.init(V),a.slidesHandler.init(V),a.options.loop&&a.slideLooper.loop(),T.offsetParent&&E.length&&a.dragHandler.init(V),D=e.init(V,I)))}function A(M,y){const O=R();N(),P(u({startIndex:O},M),y),i.emit("reInit")}function N(){a.dragHandler.destroy(),a.eventStore.clear(),a.translate.clear(),a.slideLooper.clear(),a.resizeHandler.destroy(),a.slidesHandler.destroy(),a.slidesInView.destroy(),a.animation.destroy(),e.destroy(),f.clear()}function j(){g||(g=!0,f.clear(),N(),i.emit("destroy"),i.clear())}function G(M,y,O){!x.active||g||(a.scrollBody.useBaseFriction().useDuration(y===!0?0:x.duration),a.scrollTo.index(M,O||0))}function H(M){const y=a.index.add(1).get();G(y,M,-1)}function Z(M){const y=a.index.add(-1).get();G(y,M,1)}function X(){return a.index.add(1).get()!==R()}function $(){return a.index.add(-1).get()!==R()}function U(){return a.scrollSnapList}function st(){return a.scrollProgress.get(a.offsetLocation.get())}function R(){return a.index.get()}function et(){return a.indexPrevious.get()}function ot(){return a.slidesInView.get()}function K(){return a.slidesInView.get(!1)}function it(){return D}function ct(){return a}function B(){return t}function C(){return T}function Q(){return E}const V={canScrollNext:X,canScrollPrev:$,containerNode:C,internalEngine:ct,destroy:j,off:b,on:p,emit:l,plugins:it,previousScrollSnap:et,reInit:m,rootNode:B,scrollNext:H,scrollPrev:Z,scrollProgress:st,scrollSnapList:U,scrollTo:G,selectedScrollSnap:R,slideNodes:Q,slidesInView:ot,slidesNotInView:K};return P(n,o),setTimeout(()=>i.emit("init"),0),V}ht.globalOptions=void 0;function Ut(t={},n=[]){const o=_.useRef(t),s=_.useRef(n),[c,r]=_.useState(),[e,f]=_.useState(),i=_.useCallback(()=>{c&&c.reInit(o.current,s.current)},[c]);return _.useEffect(()=>{vt(o.current,t)||(o.current=t,i())},[t,i]),_.useEffect(()=>{rn(s.current,n)||(s.current=n,i())},[n,i]),_.useEffect(()=>{if(on()&&e){ht.globalOptions=Ut.globalOptions;const u=ht(e,o.current,s.current);return r(u),()=>u.destroy()}else r(void 0)},[e,r]),[f,c]}Ut.globalOptions=void 0;export{Ut as u};
|