@v-miniapp/ui-react 1.0.60 → 1.0.72
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/index.d.ts +1 -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 +13358 -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 +141 -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-CJxOxRXd.js → App-BkiRuUOF.js} +1 -1
- package/dist-storybook/assets/Color-6BZIO3FS-EdXZe4iv.js +1 -0
- package/dist-storybook/assets/{DEEPLINK-B5vUshJ4.js → DEEPLINK-CvpIbZVm.js} +1 -1
- package/dist-storybook/assets/DocsRenderer-LL677BLK-Ch7ovClC.js +2 -0
- package/dist-storybook/assets/{EVENTS-DIl-sE2t.js → EVENTS-Bnl2ehlm.js} +1 -1
- package/dist-storybook/assets/{GETTING_STARTED-CR4dG_o7.js → GETTING_STARTED-BYcN9hg3.js} +1 -1
- package/dist-storybook/assets/{GETTING_STARTED-CtonLhRi.js → GETTING_STARTED-BmHWFQQE.js} +1 -1
- package/dist-storybook/assets/GETTING_STARTED-C1AOB25Z.js +45 -0
- package/dist-storybook/assets/{GETTING_STARTED-CS2BpDsP.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-BerukJIr.js → INFINITE_SCROLL-BJeWhgO7.js} +1 -1
- package/dist-storybook/assets/{LocalesProvider-CehS9yzW.js → LocalesProvider-CQEwtoq3.js} +1 -1
- package/dist-storybook/assets/{MIGRATE_DARKMODE_TO_THEME-CRf-7Wcz.js → MIGRATE_DARKMODE_TO_THEME-DCxXgvQC.js} +1 -1
- package/dist-storybook/assets/{MIGRATION_GUIDE-CRIHuXpT.js → MIGRATION_GUIDE-BN_V-xNj.js} +1 -1
- package/dist-storybook/assets/OVERVIEW-AI-CLWBzviY.js +35 -0
- package/dist-storybook/assets/{OVERVIEW-DayETux4.js → OVERVIEW-Byly3lQV.js} +1 -1
- package/dist-storybook/assets/{Router-CGsO5Wd_.js → Router-CO6rjSXr.js} +1 -1
- package/dist-storybook/assets/{TAILWIND_INTEGRATION-RPvFP-GI.js → TAILWIND_INTEGRATION-CpN4_fSu.js} +1 -1
- package/dist-storybook/assets/{THEME-C-pA_uq_.js → THEME-B9Y39f9D.js} +1 -1
- package/dist-storybook/assets/WithTooltip-65CFNBJE-D6J_7FjK.js +9 -0
- package/dist-storybook/assets/{alert.stories-CFBhdabd.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-Cj9fkEY9.js → axe-4EaTvypG.js} +13 -13
- package/dist-storybook/assets/badge-Gh2kTOE3.js +1 -0
- package/dist-storybook/assets/{badge.stories-DhVKBE64.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-DgRH6oVV.js → button.stories--0kpp_af.js} +3 -3
- package/dist-storybook/assets/calendar-ySr-9cXG.js +1 -0
- package/dist-storybook/assets/{calendar.stories-B0K_T9ak.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-D0908ZyT.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-C1W0DfQy.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-Bahq3f1W.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-Pp2OIUrN.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-qg8UAHBM.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-sQtCaoL2.js → image.stories-BlYIb_Qu.js} +1 -1
- package/dist-storybook/assets/index-B24pfkXD.js +1 -0
- package/dist-storybook/assets/{index-1AHvPexM.js → index-CdnALcTP.js} +1 -1
- package/dist-storybook/assets/{index-DWjPAWoJ.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-CCtGPDrS.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-ClUj8qVT.js → option-item.stories-DqA-ydWX.js} +3 -3
- package/dist-storybook/assets/pagination-CjgiVNvu.js +1 -0
- package/dist-storybook/assets/{pagination.stories-C9j6mE5z.js → pagination.stories-BsKHvdF4.js} +4 -4
- package/dist-storybook/assets/{radio.stories-D8_YUTw1.js → radio.stories-CBmxZRxo.js} +10 -10
- package/dist-storybook/assets/{rating.stories-BIftLeu2.js → rating.stories-CcdFtcNH.js} +9 -9
- package/dist-storybook/assets/react-18-D2tl8ksm.js +1 -0
- package/dist-storybook/assets/{react-zqqxT5R_.js → react-DO0-owxu.js} +1 -1
- package/dist-storybook/assets/search-field-zl4ROLfn.js +1 -0
- package/dist-storybook/assets/{search-field.stories-D1okdN8e.js → search-field.stories-DoclnxtC.js} +1 -1
- package/dist-storybook/assets/{section.stories-Cq5CY978.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-DPcC0I5i.js → sheet.stories-CoXnt4LG.js} +4 -4
- package/dist-storybook/assets/skeleton-BVLpHxKT.js +1 -0
- package/dist-storybook/assets/{skeleton.stories-CD3J1XrJ.js → skeleton.stories-B-OfMZId.js} +3 -3
- package/dist-storybook/assets/{store-BmYgrUro.js → store-BwIebEt6.js} +5 -5
- package/dist-storybook/assets/{switch.stories-C5SDbdGL.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-3Z574UAD.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-DzjpcKin.js → text-field.stories-PQoP3DbL.js} +1 -1
- package/dist-storybook/assets/toast.stories-DmPy9T3m.js +209 -0
- package/dist-storybook/assets/{tooltip.stories-DEnYdL1d.js → tooltip.stories-Be_kIaDc.js} +8 -8
- package/dist-storybook/assets/typography-CMIMyivt.js +1 -0
- package/dist-storybook/assets/{typography.stories-DWxFgTz3.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-CyjeIEPG.js → use-app-pause-_ycnhKwZ.js} +3 -3
- package/dist-storybook/assets/{use-app-resume-DntO6Rkm.js → use-app-resume-CWb2s-wo.js} +1 -1
- package/dist-storybook/assets/{use-bottom-tab-bar-Da7gjw6y.js → use-bottom-tab-bar--DRl-8c4.js} +1 -1
- package/dist-storybook/assets/{use-custom-icon-event-BEYPYrKY.js → use-custom-icon-event-BXcRPkLg.js} +1 -1
- package/dist-storybook/assets/{use-did-hide-Do-KOSzV.js → use-did-hide-LBcrwoUo.js} +1 -1
- package/dist-storybook/assets/{use-did-show-Bv9k7DdG.js → use-did-show-BXLstTgt.js} +1 -1
- package/dist-storybook/assets/{use-histories-Ci1HfRe-.js → use-histories-Cz7ncXaj.js} +1 -1
- package/dist-storybook/assets/{use-history-CkVE1jRy.js → use-history-B_w6SPwr.js} +1 -1
- package/dist-storybook/assets/{use-language-Bg-LzpzQ.js → use-language-D84C9QNT.js} +1 -1
- package/dist-storybook/assets/{use-load-more-eaC8W6Cc.js → use-load-more-Bb9YFkAE.js} +1 -1
- package/dist-storybook/assets/{use-location-BMrQnhPi.js → use-location-DnxJ5FvJ.js} +1 -1
- package/dist-storybook/assets/{use-navigate-BwwmhToy.js → use-navigate-OLqoL3vR.js} +3 -3
- package/dist-storybook/assets/{use-navigation-bar-DzgWeTpM.js → use-navigation-bar-D5BX6S-r.js} +15 -15
- package/dist-storybook/assets/{use-navigation-type-DNvXTqYH.js → use-navigation-type-Cq7T35ur.js} +1 -1
- package/dist-storybook/assets/{use-page-layout-BA2HvjAQ.js → use-page-layout-BrFRWwC6.js} +1 -1
- package/dist-storybook/assets/{use-page-scroll-D_gjlV-S.js → use-page-scroll-BZ8XiPza.js} +1 -1
- package/dist-storybook/assets/{use-pull-to-refresh-SZfswIA6.js → use-pull-to-refresh-BEjtxiFn.js} +1 -1
- package/dist-storybook/assets/{use-settings-changed-D2gdx5rD.js → use-settings-changed-UaQRSWAg.js} +1 -1
- package/dist-storybook/assets/{use-translate-BTC2AQ0k.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-DwohVA43.js +0 -1
- package/dist-storybook/assets/DocsRenderer-PQXLIZUC-vNsl3A7z.js +0 -2
- package/dist-storybook/assets/_baseClone-4nOrhHpR.js +0 -1
- package/dist-storybook/assets/alert-D3VdqAYm.js +0 -1
- package/dist-storybook/assets/app-B__CxZQv.js +0 -1
- package/dist-storybook/assets/avatar-BVV1WSnD.js +0 -1
- package/dist-storybook/assets/avatar.stories-D0RA2Mhh.js +0 -136
- package/dist-storybook/assets/badge-DLt8CmDs.js +0 -1
- package/dist-storybook/assets/blocks-D4qvS4eZ.js +0 -1243
- package/dist-storybook/assets/bottom-tab-bar-UaYvPAic.js +0 -115
- package/dist-storybook/assets/bottom-tab-bar.stories--7Qh-68J.js +0 -186
- package/dist-storybook/assets/button-CbLEqALK.js +0 -1
- package/dist-storybook/assets/calendar-C7tiySn0.js +0 -1
- package/dist-storybook/assets/carousel-C1nQGnJZ.js +0 -37
- package/dist-storybook/assets/carousel.stories-C5d6yLzd.js +0 -217
- package/dist-storybook/assets/checkbox-Bs8ghsWP.js +0 -1
- package/dist-storybook/assets/checkbox.stories-CG74gIlt.js +0 -201
- package/dist-storybook/assets/chip-D4_ukvFv.js +0 -1
- package/dist-storybook/assets/date-field-range-DSAQp9qR.js +0 -1
- package/dist-storybook/assets/date-field.stories-Dx6-qeWT.js +0 -129
- package/dist-storybook/assets/date-picker--PiU9sOL.js +0 -1
- package/dist-storybook/assets/dialog-8K5u-kre.js +0 -1
- package/dist-storybook/assets/dialog.stories-BxYc78Eo.js +0 -212
- package/dist-storybook/assets/dropdown-BeoO7m-R.js +0 -247
- package/dist-storybook/assets/dropdown.stories-Bfhg63tZ.js +0 -200
- package/dist-storybook/assets/icon-CgGksgRS.js +0 -1
- package/dist-storybook/assets/iframe-BKfReaAn.css +0 -1
- package/dist-storybook/assets/iframe-C0PGuV5s.js +0 -1071
- package/dist-storybook/assets/image-BdsCB1je.js +0 -9
- package/dist-storybook/assets/index-BLzgbpm2.js +0 -1
- package/dist-storybook/assets/index-SzFZQQjs.js +0 -1
- package/dist-storybook/assets/input-wrapper-DkEl0Eih.js +0 -1
- package/dist-storybook/assets/label-CHVpMhb5.js +0 -27
- package/dist-storybook/assets/matchers-7Z3WT2CE-Dw4MQV_s.js +0 -14
- package/dist-storybook/assets/navigation-bar-TpF0DSXB.js +0 -79
- package/dist-storybook/assets/navigation-bar.stories-CNXAxMYL.js +0 -73
- package/dist-storybook/assets/number-field-CvCF5adO.js +0 -1
- package/dist-storybook/assets/number-field.stories-Dsb_eChm.js +0 -167
- package/dist-storybook/assets/omit-D04qL5V_.js +0 -1
- package/dist-storybook/assets/option-item-Bmby544G.js +0 -1
- package/dist-storybook/assets/pagination-MBP1YLhT.js +0 -1
- package/dist-storybook/assets/proxy-edvPwIiD.js +0 -1
- package/dist-storybook/assets/radio-DRPO7cjx.js +0 -1
- package/dist-storybook/assets/rating-CTv8C1tH.js +0 -1
- package/dist-storybook/assets/react-18-CacBUmwb.js +0 -9
- package/dist-storybook/assets/search-field-CophTGGH.js +0 -1
- package/dist-storybook/assets/section-content-dVOJuOaN.js +0 -1
- package/dist-storybook/assets/sheet-footer-BL2JAvmb.js +0 -1
- package/dist-storybook/assets/skeleton-CmGRbWqE.js +0 -1
- package/dist-storybook/assets/switch-Cc-NvT4X.js +0 -1
- package/dist-storybook/assets/tab-bar-DTyg7tFP.js +0 -31
- package/dist-storybook/assets/tab-bar.stories-zKrihgXo.js +0 -136
- package/dist-storybook/assets/text-area-WRb8Dkvn.js +0 -1
- package/dist-storybook/assets/text-field-DrODy0yz.js +0 -1
- package/dist-storybook/assets/toast-provider-ChNGFQlt.js +0 -9
- package/dist-storybook/assets/toast.stories-Zj4qfKO_.js +0 -201
- package/dist-storybook/assets/tooltip-CrxOWTXS.js +0 -1
- package/dist-storybook/assets/typography-BcLxefPi.js +0 -1
- package/dist-storybook/assets/uploader.stories-DQN8yjt-.js +0 -65
- package/dist-storybook/assets/visibility-sensor-FN9n9CLs.js +0 -1
- package/dist-storybook/sb-manager/globals-module-info.js +0 -799
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import{r as m,j as e}from"./iframe-Crg_lbde.js";import{c as ee,g as ie}from"./classname-Bl5epEs-.js";import{u as ce}from"./embla-carousel-react.esm-DOEAp-w3.js";import{P as ue}from"./pagination-CjgiVNvu.js";import{t as n}from"./store-BwIebEt6.js";import{T as pe,S as me,a as Z,P as de,b as Ce}from"./blocks-CB7UwFa4.js";import{B as h}from"./button-BLW8SOpg.js";import"./preload-helper-PPVm8Dsz.js";import"./index-CdnALcTP.js";import"./typography-CMIMyivt.js";import"./colors-_6nFGM3e.js";import"./icon-Cc9W858e.js";const xe={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function ge(r,t){const o=r.scrollSnapList();return typeof t=="number"?o.map(()=>t):t(o,r)}function ye(r,t){const o=r.rootNode();return t&&t(o)||o}function Q(r={}){let t,o,i,d,g=null,C=0,c=!1,b=!1,l=!1,p=!1;function v(u,B){o=u;const{mergeOptions:T,optionsAtMedia:K}=B,se=T(xe,Q.globalOptions),ae=T(se,r);if(t=K(ae),o.scrollSnapList().length<=1)return;p=t.jump,i=!1,d=ge(o,t.delay);const{eventStore:$,ownerDocument:le}=o.internalEngine(),X=!!o.internalEngine().options.watchDrag,Y=ye(o,t.rootNode);$.add(le,"visibilitychange",W),X&&o.on("pointerDown",F),X&&!t.stopOnInteraction&&o.on("pointerUp",E),t.stopOnMouseEnter&&$.add(Y,"mouseenter",z),t.stopOnMouseEnter&&!t.stopOnInteraction&&$.add(Y,"mouseleave",U),t.stopOnFocusIn&&o.on("slideFocusStart",I),t.stopOnFocusIn&&!t.stopOnInteraction&&$.add(o.containerNode(),"focusout",f),t.playOnInit&&f()}function y(){o.off("pointerDown",F).off("pointerUp",E).off("slideFocusStart",I),I(),i=!0,c=!1}function V(){const{ownerWindow:u}=o.internalEngine();u.clearTimeout(C),C=u.setTimeout(oe,d[o.selectedScrollSnap()]),g=new Date().getTime(),o.emit("autoplay:timerset")}function N(){const{ownerWindow:u}=o.internalEngine();u.clearTimeout(C),C=0,g=null,o.emit("autoplay:timerstopped")}function f(){if(!i){if(k()){l=!0;return}c||o.emit("autoplay:play"),V(),c=!0}}function I(){i||(c&&o.emit("autoplay:stop"),N(),c=!1)}function W(){if(k())return l=c,I();l&&f()}function k(){const{ownerDocument:u}=o.internalEngine();return u.visibilityState==="hidden"}function F(){b||I()}function E(){b||f()}function z(){b=!0,I()}function U(){b=!1,f()}function G(u){typeof u<"u"&&(p=u),f()}function j(){c&&I()}function S(){c&&f()}function J(){return c}function oe(){const{index:u}=o.internalEngine(),B=u.clone().add(1).get(),T=o.scrollSnapList().length-1,K=t.stopOnLastSnap&&B===T;if(o.canScrollNext()?o.scrollNext(p):o.scrollTo(0,p),o.emit("autoplay:select"),K)return I();f()}function re(){if(!g)return null;const u=d[o.selectedScrollSnap()],B=new Date().getTime()-g;return u-B}return{name:"autoplay",options:r,init:v,destroy:y,play:G,stop:j,reset:S,isPlaying:J,timeUntilNext:re}}Q.globalOptions=void 0;function ne(r={}){let t,o=[];const i=["select","slideFocus"];function d(l){t=l;const{options:{axis:p},slideRects:v}=t.internalEngine();p!=="y"&&(o=v.map(y=>y.height),i.forEach(y=>t.on(y,c)),c())}function g(){i.forEach(p=>t.off(p,c));const l=t.containerNode();l.style.height="",l.getAttribute("style")||l.removeAttribute("style")}function C(){const{slideRegistry:l}=t.internalEngine(),p=l[t.selectedScrollSnap()];return p?p.map(v=>o[v]).reduce((v,y)=>Math.max(v,y),0):null}function c(){C()!==null&&(t.containerNode().style.height=`${C()}px`)}return{name:"autoHeight",options:r,init:d,destroy:g}}ne.globalOptions=void 0;const te=(r={})=>{const{align:t="center",initialIndex:o=0,autoplay:i=!1,delay:d=3e3,duration:g=25,loop:C,autoHeight:c=!0}=r,[b,l]=ce({axis:"x",align:t,startIndex:o,duration:g,loop:C},[Q({playOnInit:!0,delay:d,active:i}),ne({active:c})]),p=l?.scrollNext,v=m.useCallback(S=>p?.(S.jump),[p]),y=l?.scrollPrev,V=m.useCallback(S=>y?.(S.jump),[y]),N=l?.scrollTo,f=m.useCallback((S,J)=>N?.(S,J.jump),[N]),[I,W]=m.useState(!1),[k,F]=m.useState(!1),[E,z]=m.useState(0),[U,G]=m.useState([]),j=m.useCallback(()=>{l&&(F(!!l?.canScrollPrev()),W(!!l?.canScrollNext()),G(l.scrollSnapList()),z(l.selectedScrollSnap()))},[l]);return m.useEffect(()=>{l&&(j(),l.on("reInit",j).on("select",j))},[l,j]),{ref:b,next:v,prev:V,toSlide:f,activeIndex:E,canNext:I,canPrev:k,snaps:U,options:r}},M=ie("carousel"),x=m.forwardRef(({className:r,carousel:t,options:o,pagination:i=!0,children:d},g)=>{const C=te(o);return t=t||C,m.useImperativeHandle(g,()=>t),e.jsxs("div",{className:ee(M,r),style:{"--carousel-gap":typeof t.options.gap=="number"?t.options.gap+"px":"8px"},children:[e.jsx("div",{className:`${M}__viewport`,ref:t.ref,children:e.jsx("div",{className:`${M}__tracks`,children:d})}),!!i&&e.jsx(ue,{total:t.snaps.length,activeIndex:t.activeIndex})]})}),s=({children:r,className:t,...o})=>e.jsx("div",{className:ee(`${M}__item`,t),...o,children:r});x.__docgenInfo={description:"",methods:[],displayName:"Carousel",props:{className:{required:!1,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactNode"},description:""},carousel:{required:!1,tsType:{name:"signature",type:"object",raw:`{
|
|
2
|
+
ref: ICarouselViewPortRef
|
|
3
|
+
next: (options: ICarouselToOptions) => void
|
|
4
|
+
prev: (options: ICarouselToOptions) => void
|
|
5
|
+
toSlide: (index: number, options: ICarouselToOptions) => void
|
|
6
|
+
activeIndex: number
|
|
7
|
+
canNext: boolean
|
|
8
|
+
canPrev: boolean
|
|
9
|
+
snaps: number[]
|
|
10
|
+
options: ICarouselOptions
|
|
11
|
+
}`,signature:{properties:[{key:"ref",value:{name:"signature",type:"function",raw:`<ViewportElement extends HTMLElement>(
|
|
12
|
+
instance: ViewportElement | null,
|
|
13
|
+
) => void`,signature:{arguments:[{type:{name:"union",raw:"ViewportElement | null",elements:[{name:"ViewportElement"},{name:"null"}]},name:"instance"}],return:{name:"void"}},required:!0}},{key:"next",value:{name:"signature",type:"function",raw:"(options: ICarouselToOptions) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
|
|
14
|
+
jump?: boolean
|
|
15
|
+
}`,signature:{properties:[{key:"jump",value:{name:"boolean",required:!1}}]}},name:"options"}],return:{name:"void"}},required:!0}},{key:"prev",value:{name:"signature",type:"function",raw:"(options: ICarouselToOptions) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
|
|
16
|
+
jump?: boolean
|
|
17
|
+
}`,signature:{properties:[{key:"jump",value:{name:"boolean",required:!1}}]}},name:"options"}],return:{name:"void"}},required:!0}},{key:"toSlide",value:{name:"signature",type:"function",raw:"(index: number, options: ICarouselToOptions) => void",signature:{arguments:[{type:{name:"number"},name:"index"},{type:{name:"signature",type:"object",raw:`{
|
|
18
|
+
jump?: boolean
|
|
19
|
+
}`,signature:{properties:[{key:"jump",value:{name:"boolean",required:!1}}]}},name:"options"}],return:{name:"void"}},required:!0}},{key:"activeIndex",value:{name:"number",required:!0}},{key:"canNext",value:{name:"boolean",required:!0}},{key:"canPrev",value:{name:"boolean",required:!0}},{key:"snaps",value:{name:"Array",elements:[{name:"number"}],raw:"number[]",required:!0}},{key:"options",value:{name:"signature",type:"object",raw:`{
|
|
20
|
+
align?: ICarouselAlign
|
|
21
|
+
initialIndex?: number
|
|
22
|
+
loop?: boolean
|
|
23
|
+
duration?: number
|
|
24
|
+
autoplay?: boolean
|
|
25
|
+
delay?: number
|
|
26
|
+
autoHeight?: boolean
|
|
27
|
+
gap?: number
|
|
28
|
+
}`,signature:{properties:[{key:"align",value:{name:"union",raw:"'start' | 'center' | 'end'",elements:[{name:"literal",value:"'start'"},{name:"literal",value:"'center'"},{name:"literal",value:"'end'"}],required:!1}},{key:"initialIndex",value:{name:"number",required:!1}},{key:"loop",value:{name:"boolean",required:!1}},{key:"duration",value:{name:"number",required:!1}},{key:"autoplay",value:{name:"boolean",required:!1}},{key:"delay",value:{name:"number",required:!1}},{key:"autoHeight",value:{name:"boolean",required:!1}},{key:"gap",value:{name:"number",required:!1}}]},required:!0}}]}},description:""},options:{required:!1,tsType:{name:"signature",type:"object",raw:`{
|
|
29
|
+
align?: ICarouselAlign
|
|
30
|
+
initialIndex?: number
|
|
31
|
+
loop?: boolean
|
|
32
|
+
duration?: number
|
|
33
|
+
autoplay?: boolean
|
|
34
|
+
delay?: number
|
|
35
|
+
autoHeight?: boolean
|
|
36
|
+
gap?: number
|
|
37
|
+
}`,signature:{properties:[{key:"align",value:{name:"union",raw:"'start' | 'center' | 'end'",elements:[{name:"literal",value:"'start'"},{name:"literal",value:"'center'"},{name:"literal",value:"'end'"}],required:!1}},{key:"initialIndex",value:{name:"number",required:!1}},{key:"loop",value:{name:"boolean",required:!1}},{key:"duration",value:{name:"number",required:!1}},{key:"autoplay",value:{name:"boolean",required:!1}},{key:"delay",value:{name:"number",required:!1}},{key:"autoHeight",value:{name:"boolean",required:!1}},{key:"gap",value:{name:"number",required:!1}}]}},description:""},pagination:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}}}};s.__docgenInfo={description:"",methods:[],displayName:"CarouselItem"};const fe=()=>{const r=`
|
|
38
|
+
## ${n("common.table.title")}
|
|
39
|
+
|
|
40
|
+
| ${n("common.table.name")} | ${n("common.table.type")} | ${n("common.table.required")} | ${n("common.table.description")} |
|
|
41
|
+
| :--- | :--- | :--- | :--- |
|
|
42
|
+
| \`children\` | \`ReactNode\` | ${n("common.table.yes")} | ${n("components.carousel.childrenDescription")} |
|
|
43
|
+
| \`carousel\` | \`ICarouselInstance\` | ${n("common.table.no")} | ${n("components.carousel.carouselDescription")} |
|
|
44
|
+
| \`options\` | \`ICarouselOptions\` | ${n("common.table.no")} | ${n("components.carousel.optionsDescription")} |
|
|
45
|
+
| \`pagination\` | \`boolean\` | ${n("common.table.no")} | ${n("components.carousel.paginationDescription")} |
|
|
46
|
+
| \`className\` | \`string\` | ${n("common.table.no")} | ${n("components.carousel.classNameDescription")} |
|
|
47
|
+
|
|
48
|
+
### ICarouselOptions
|
|
49
|
+
|
|
50
|
+
| ${n("common.table.name")} | ${n("common.table.type")} | ${n("common.table.required")} | ${n("common.table.description")} |
|
|
51
|
+
| :--- | :--- | :--- | :--- |
|
|
52
|
+
| \`align\` | \`'start' | 'center' | 'end'\` | ${n("common.table.no")} | ${n("components.carousel.options.alignDescription")} |
|
|
53
|
+
| \`initialIndex\` | \`number\` | ${n("common.table.no")} | ${n("components.carousel.options.initialIndexDescription")} |
|
|
54
|
+
| \`loop\` | \`boolean\` | ${n("common.table.no")} | ${n("components.carousel.options.loopDescription")} |
|
|
55
|
+
| \`duration\` | \`number\` | ${n("common.table.no")} | ${n("components.carousel.options.durationDescription")} |
|
|
56
|
+
| \`autoplay\` | \`boolean\` | ${n("common.table.no")} | ${n("components.carousel.options.autoplayDescription")} |
|
|
57
|
+
| \`delay\` | \`number\` | ${n("common.table.no")} | ${n("components.carousel.options.delayDescription")} |
|
|
58
|
+
| \`autoHeight\` | \`boolean\` | ${n("common.table.no")} | ${n("components.carousel.options.autoHeightDescription")} |
|
|
59
|
+
| \`gap\` | \`number\` | ${n("common.table.no")} | ${n("components.carousel.options.gapDescription")} |
|
|
60
|
+
`;return e.jsxs(e.Fragment,{children:[e.jsx(pe,{}),e.jsx(me,{}),e.jsx(Z,{children:n("components.carousel.description")}),e.jsx(de,{}),e.jsx(Z,{children:r}),e.jsx(Ce,{})]})},Ae={title:"Components/Carousel",component:x,parameters:{layout:"padded",docs:{page:fe}},tags:["autodocs"],argTypes:{children:{control:!1,description:n("components.carousel.argTypes.childrenDescription"),table:{type:{summary:"ReactNode"}}},carousel:{control:!1,description:n("components.carousel.argTypes.carouselDescription"),table:{type:{summary:"ICarouselInstance"}}},options:{control:"object",description:n("components.carousel.argTypes.optionsDescription"),table:{type:{summary:"ICarouselOptions"}}},pagination:{control:"boolean",description:n("components.carousel.argTypes.paginationDescription"),table:{type:{summary:"boolean"},defaultValue:{summary:"true"}}},className:{control:"text",description:n("components.carousel.argTypes.classNameDescription"),table:{type:{summary:"string"}}}}},a=(r,t)=>e.jsxs("div",{style:{width:"100%",height:"200px",backgroundColor:t,display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:"24px",fontWeight:"bold"},children:[n("components.carousel.stories.slide")," ",r+1]}),A={storyName:n("components.carousel.stories.default.title"),render:()=>e.jsxs(x,{children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})},O={storyName:n("components.carousel.stories.withLoop.title"),render:()=>e.jsxs(x,{options:{loop:!0},children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})},w={storyName:n("components.carousel.stories.withoutPagination.title"),render:()=>e.jsxs(x,{pagination:!1,children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})},D={storyName:n("components.carousel.stories.customOptions.title"),render:()=>e.jsxs(x,{options:{align:"center",loop:!0,autoplay:!0,delay:5e3,gap:16,duration:25},children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})},q={storyName:n("components.carousel.stories.programmaticControl.title"),render:()=>{const r=m.useRef(null),t=()=>{r.current?.next({})},o=()=>{r.current?.prev({})},i=d=>{r.current?.toSlide(d,{})};return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx(h,{onClick:o,children:n("components.carousel.stories.programmaticControl.previous")}),e.jsx(h,{onClick:t,children:n("components.carousel.stories.programmaticControl.next")}),e.jsx(h,{onClick:()=>i(0),children:n("components.carousel.stories.programmaticControl.goToSlide",{index:1})}),e.jsx(h,{onClick:()=>i(1),children:n("components.carousel.stories.programmaticControl.goToSlide",{index:2})}),e.jsx(h,{onClick:()=>i(2),children:n("components.carousel.stories.programmaticControl.goToSlide",{index:3})})]}),e.jsxs(x,{ref:r,children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})]})}},P={storyName:n("components.carousel.stories.externalCarouselInstance.title"),render:()=>{const r=te({loop:!1,autoplay:!1});return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx(h,{onClick:()=>r.prev({}),children:n("components.carousel.stories.externalCarouselInstance.previous")}),e.jsx(h,{onClick:()=>r.next({}),children:n("components.carousel.stories.externalCarouselInstance.next")}),e.jsxs("p",{style:{fontSize:"14px",color:"#666"},children:[`${n("components.carousel.stories.externalCarouselInstance.activeIndex")} ${r.activeIndex} | `,`${n("components.carousel.stories.externalCarouselInstance.canNext")}: `,r.canNext?n("components.carousel.stories.externalCarouselInstance.yes"):n("components.carousel.stories.externalCarouselInstance.no"),` | ${n("components.carousel.stories.externalCarouselInstance.canPrev")}: `,r.canPrev?n("components.carousel.stories.externalCarouselInstance.yes"):n("components.carousel.stories.externalCarouselInstance.no")]})]}),e.jsxs(x,{carousel:r,children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})]})}},R={storyName:n("components.carousel.stories.alignmentOptions.title"),render:()=>{const[r,t]=m.useState("center");return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx(h,{onClick:()=>t("start"),type:r==="start"?"solid":"outline",children:n("components.carousel.stories.alignmentOptions.start")}),e.jsx(h,{onClick:()=>t("center"),type:r==="center"?"solid":"outline",children:n("components.carousel.stories.alignmentOptions.center")}),e.jsx(h,{onClick:()=>t("end"),type:r==="end"?"solid":"outline",children:n("components.carousel.stories.alignmentOptions.end")})]}),e.jsxs(x,{options:{align:r,loop:!0},children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})]})}},H={storyName:n("components.carousel.stories.multipleSlides.title"),render:()=>e.jsxs(x,{options:{loop:!0,gap:12},children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")}),e.jsx(s,{children:a(3,"#FFD93D")}),e.jsx(s,{children:a(4,"#9B59B6")}),e.jsx(s,{children:a(5,"#E67E22")})]})},L={storyName:n("components.carousel.stories.withoutAutoplay.title"),render:()=>e.jsxs(x,{options:{autoplay:!1},children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})},_={storyName:n("components.carousel.stories.interactive.title"),args:{pagination:!0,children:e.jsxs(e.Fragment,{children:[e.jsx(s,{children:a(0,"#4A90E2")}),e.jsx(s,{children:a(1,"#50C878")}),e.jsx(s,{children:a(2,"#FF6B6B")})]})}};A.parameters={...A.parameters,docs:{...A.parameters?.docs,source:{originalSource:`{
|
|
61
|
+
storyName: t('components.carousel.stories.default.title'),
|
|
62
|
+
render: () => <Carousel>
|
|
63
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
64
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
65
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
66
|
+
</Carousel>
|
|
67
|
+
}`,...A.parameters?.docs?.source}}};O.parameters={...O.parameters,docs:{...O.parameters?.docs,source:{originalSource:`{
|
|
68
|
+
storyName: t('components.carousel.stories.withLoop.title'),
|
|
69
|
+
render: () => <Carousel options={{
|
|
70
|
+
loop: true
|
|
71
|
+
}}>
|
|
72
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
73
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
74
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
75
|
+
</Carousel>
|
|
76
|
+
}`,...O.parameters?.docs?.source}}};w.parameters={...w.parameters,docs:{...w.parameters?.docs,source:{originalSource:`{
|
|
77
|
+
storyName: t('components.carousel.stories.withoutPagination.title'),
|
|
78
|
+
render: () => <Carousel pagination={false}>
|
|
79
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
80
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
81
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
82
|
+
</Carousel>
|
|
83
|
+
}`,...w.parameters?.docs?.source}}};D.parameters={...D.parameters,docs:{...D.parameters?.docs,source:{originalSource:`{
|
|
84
|
+
storyName: t('components.carousel.stories.customOptions.title'),
|
|
85
|
+
render: () => <Carousel options={{
|
|
86
|
+
align: 'center',
|
|
87
|
+
loop: true,
|
|
88
|
+
autoplay: true,
|
|
89
|
+
delay: 5000,
|
|
90
|
+
gap: 16,
|
|
91
|
+
duration: 25
|
|
92
|
+
}}>
|
|
93
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
94
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
95
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
96
|
+
</Carousel>
|
|
97
|
+
}`,...D.parameters?.docs?.source}}};q.parameters={...q.parameters,docs:{...q.parameters?.docs,source:{originalSource:`{
|
|
98
|
+
storyName: t('components.carousel.stories.programmaticControl.title'),
|
|
99
|
+
render: () => {
|
|
100
|
+
const carouselRef = useRef<ICarouselInstance | null>(null);
|
|
101
|
+
const goToNext = () => {
|
|
102
|
+
carouselRef.current?.next({});
|
|
103
|
+
};
|
|
104
|
+
const goToPrevious = () => {
|
|
105
|
+
carouselRef.current?.prev({});
|
|
106
|
+
};
|
|
107
|
+
const goToSlide = (index: number) => {
|
|
108
|
+
carouselRef.current?.toSlide(index, {});
|
|
109
|
+
};
|
|
110
|
+
return <div style={{
|
|
111
|
+
display: 'flex',
|
|
112
|
+
flexDirection: 'column',
|
|
113
|
+
gap: '16px'
|
|
114
|
+
}}>
|
|
115
|
+
<div style={{
|
|
116
|
+
display: 'flex',
|
|
117
|
+
gap: '8px'
|
|
118
|
+
}}>
|
|
119
|
+
<Button onClick={goToPrevious}>
|
|
120
|
+
{t('components.carousel.stories.programmaticControl.previous')}
|
|
121
|
+
</Button>
|
|
122
|
+
<Button onClick={goToNext}>
|
|
123
|
+
{t('components.carousel.stories.programmaticControl.next')}
|
|
124
|
+
</Button>
|
|
125
|
+
<Button onClick={() => goToSlide(0)}>
|
|
126
|
+
{t('components.carousel.stories.programmaticControl.goToSlide', {
|
|
127
|
+
index: 1
|
|
128
|
+
})}
|
|
129
|
+
</Button>
|
|
130
|
+
<Button onClick={() => goToSlide(1)}>
|
|
131
|
+
{t('components.carousel.stories.programmaticControl.goToSlide', {
|
|
132
|
+
index: 2
|
|
133
|
+
})}
|
|
134
|
+
</Button>
|
|
135
|
+
<Button onClick={() => goToSlide(2)}>
|
|
136
|
+
{t('components.carousel.stories.programmaticControl.goToSlide', {
|
|
137
|
+
index: 3
|
|
138
|
+
})}
|
|
139
|
+
</Button>
|
|
140
|
+
</div>
|
|
141
|
+
<Carousel ref={carouselRef}>
|
|
142
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
143
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
144
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
145
|
+
</Carousel>
|
|
146
|
+
</div>;
|
|
147
|
+
}
|
|
148
|
+
}`,...q.parameters?.docs?.source}}};P.parameters={...P.parameters,docs:{...P.parameters?.docs,source:{originalSource:`{
|
|
149
|
+
storyName: t('components.carousel.stories.externalCarouselInstance.title'),
|
|
150
|
+
render: () => {
|
|
151
|
+
const carousel = useCarousel({
|
|
152
|
+
loop: false,
|
|
153
|
+
autoplay: false
|
|
154
|
+
});
|
|
155
|
+
return <div style={{
|
|
156
|
+
display: 'flex',
|
|
157
|
+
flexDirection: 'column',
|
|
158
|
+
gap: '16px'
|
|
159
|
+
}}>
|
|
160
|
+
<div style={{
|
|
161
|
+
display: 'flex',
|
|
162
|
+
gap: '8px'
|
|
163
|
+
}}>
|
|
164
|
+
<Button onClick={() => carousel.prev({})}>
|
|
165
|
+
{t('components.carousel.stories.externalCarouselInstance.previous')}
|
|
166
|
+
</Button>
|
|
167
|
+
<Button onClick={() => carousel.next({})}>
|
|
168
|
+
{t('components.carousel.stories.externalCarouselInstance.next')}
|
|
169
|
+
</Button>
|
|
170
|
+
<p style={{
|
|
171
|
+
fontSize: '14px',
|
|
172
|
+
color: '#666'
|
|
173
|
+
}}>
|
|
174
|
+
{\`\${t('components.carousel.stories.externalCarouselInstance.activeIndex')} \${carousel.activeIndex} | \`}
|
|
175
|
+
{\`\${t('components.carousel.stories.externalCarouselInstance.canNext')}: \`}
|
|
176
|
+
{carousel.canNext ? t('components.carousel.stories.externalCarouselInstance.yes') : t('components.carousel.stories.externalCarouselInstance.no')}
|
|
177
|
+
{\` | \${t('components.carousel.stories.externalCarouselInstance.canPrev')}: \`}
|
|
178
|
+
{carousel.canPrev ? t('components.carousel.stories.externalCarouselInstance.yes') : t('components.carousel.stories.externalCarouselInstance.no')}
|
|
179
|
+
</p>
|
|
180
|
+
</div>
|
|
181
|
+
<Carousel carousel={carousel}>
|
|
182
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
183
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
184
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
185
|
+
</Carousel>
|
|
186
|
+
</div>;
|
|
187
|
+
}
|
|
188
|
+
}`,...P.parameters?.docs?.source}}};R.parameters={...R.parameters,docs:{...R.parameters?.docs,source:{originalSource:`{
|
|
189
|
+
storyName: t('components.carousel.stories.alignmentOptions.title'),
|
|
190
|
+
render: () => {
|
|
191
|
+
const [align, setAlign] = useState<'start' | 'center' | 'end'>('center');
|
|
192
|
+
return <div style={{
|
|
193
|
+
display: 'flex',
|
|
194
|
+
flexDirection: 'column',
|
|
195
|
+
gap: '16px'
|
|
196
|
+
}}>
|
|
197
|
+
<div style={{
|
|
198
|
+
display: 'flex',
|
|
199
|
+
gap: '8px'
|
|
200
|
+
}}>
|
|
201
|
+
<Button onClick={() => setAlign('start')} type={align === 'start' ? 'solid' : 'outline'}>
|
|
202
|
+
{t('components.carousel.stories.alignmentOptions.start')}
|
|
203
|
+
</Button>
|
|
204
|
+
<Button onClick={() => setAlign('center')} type={align === 'center' ? 'solid' : 'outline'}>
|
|
205
|
+
{t('components.carousel.stories.alignmentOptions.center')}
|
|
206
|
+
</Button>
|
|
207
|
+
<Button onClick={() => setAlign('end')} type={align === 'end' ? 'solid' : 'outline'}>
|
|
208
|
+
{t('components.carousel.stories.alignmentOptions.end')}
|
|
209
|
+
</Button>
|
|
210
|
+
</div>
|
|
211
|
+
<Carousel options={{
|
|
212
|
+
align,
|
|
213
|
+
loop: true
|
|
214
|
+
}}>
|
|
215
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
216
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
217
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
218
|
+
</Carousel>
|
|
219
|
+
</div>;
|
|
220
|
+
}
|
|
221
|
+
}`,...R.parameters?.docs?.source}}};H.parameters={...H.parameters,docs:{...H.parameters?.docs,source:{originalSource:`{
|
|
222
|
+
storyName: t('components.carousel.stories.multipleSlides.title'),
|
|
223
|
+
render: () => <Carousel options={{
|
|
224
|
+
loop: true,
|
|
225
|
+
gap: 12
|
|
226
|
+
}}>
|
|
227
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
228
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
229
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
230
|
+
<CarouselItem>{createSlideContent(3, '#FFD93D')}</CarouselItem>
|
|
231
|
+
<CarouselItem>{createSlideContent(4, '#9B59B6')}</CarouselItem>
|
|
232
|
+
<CarouselItem>{createSlideContent(5, '#E67E22')}</CarouselItem>
|
|
233
|
+
</Carousel>
|
|
234
|
+
}`,...H.parameters?.docs?.source}}};L.parameters={...L.parameters,docs:{...L.parameters?.docs,source:{originalSource:`{
|
|
235
|
+
storyName: t('components.carousel.stories.withoutAutoplay.title'),
|
|
236
|
+
render: () => <Carousel options={{
|
|
237
|
+
autoplay: false
|
|
238
|
+
}}>
|
|
239
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
240
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
241
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
242
|
+
</Carousel>
|
|
243
|
+
}`,...L.parameters?.docs?.source}}};_.parameters={..._.parameters,docs:{..._.parameters?.docs,source:{originalSource:`{
|
|
244
|
+
storyName: t('components.carousel.stories.interactive.title'),
|
|
245
|
+
args: {
|
|
246
|
+
pagination: true,
|
|
247
|
+
children: <>
|
|
248
|
+
<CarouselItem>{createSlideContent(0, '#4A90E2')}</CarouselItem>
|
|
249
|
+
<CarouselItem>{createSlideContent(1, '#50C878')}</CarouselItem>
|
|
250
|
+
<CarouselItem>{createSlideContent(2, '#FF6B6B')}</CarouselItem>
|
|
251
|
+
</>
|
|
252
|
+
}
|
|
253
|
+
}`,..._.parameters?.docs?.source}}};const Oe=["Default","WithLoop","WithoutPagination","CustomOptions","ProgrammaticControl","ExternalCarouselInstance","AlignmentOptions","MultipleSlides","WithoutAutoplay","Interactive"];export{R as AlignmentOptions,D as CustomOptions,A as Default,P as ExternalCarouselInstance,_ as Interactive,H as MultipleSlides,q as ProgrammaticControl,O as WithLoop,L as WithoutAutoplay,w as WithoutPagination,Oe as __namedExportsOrder,Ae as default};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import{j as t,r as l}from"./iframe-Crg_lbde.js";import{T as R,S as L,a as _,P as M,b as H}from"./blocks-CB7UwFa4.js";import{c as U,g as Z}from"./classname-Bl5epEs-.js";import{u as w}from"./index-hDlmuyu2.js";import{T as V}from"./typography-CMIMyivt.js";import{t as e}from"./store-BwIebEt6.js";import{B as A}from"./button-BLW8SOpg.js";import"./preload-helper-PPVm8Dsz.js";import"./index-CdnALcTP.js";import"./index-B-Ksafg0.js";import"./colors-_6nFGM3e.js";import"./icon-Cc9W858e.js";const B=({fill:o="white",...n})=>t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:t.jsx("path",{d:"M5.11112 12.4445H5.10934C4.90756 12.4445 4.71645 12.352 4.59112 12.1947L1.03556 7.75026C0.805341 7.46226 0.851563 7.04359 1.13956 6.81337C1.42845 6.58315 1.84712 6.63026 2.07645 6.91737L5.11467 10.7147L12.1485 2.02492C12.3805 1.7387 12.7991 1.69337 13.0862 1.92626C13.3725 2.15826 13.4169 2.57781 13.1849 2.86403L5.62934 12.1974C5.50223 12.3538 5.31201 12.4445 5.11112 12.4445Z",fill:o})});B.__docgenInfo={description:"",methods:[],displayName:"CheckIcon",props:{fill:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'white'",computed:!1}}}};const q=({fill:o="white",...n})=>t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:t.jsx("rect",{x:"2",y:"6.5",width:"11",height:"2",rx:"1",fill:o})});q.__docgenInfo={description:"",methods:[],displayName:"IndeterminateIcon",props:{fill:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'white'",computed:!1}}}};const i=Z("checkbox"),c=l.forwardRef((o,n)=>{const{disabled:r=!1,theme:d="brand",variant:s="default",className:p,style:$,checked:K,defaultChecked:W,onChange:X,number:Y,defaultNumber:ee,onNumberChange:te,children:D,typography:I,...S}=o,O=d||"brand",u=l.useRef(null),[P,b]=l.useState(!1),[T,G]=w(o,{valuePropName:"checked",defaultValuePropName:"defaultChecked",trigger:"onChange"}),[m,E]=w(o,{valuePropName:"number",defaultValuePropName:"defaultNumber",trigger:"onNumberChange"}),h=m!==void 0?!0:T;l.useImperativeHandle(n,()=>({focus:()=>u.current?.focus?.(),blur:()=>u.current?.blur?.()}));const z=a=>{if(a.preventDefault(),r)return;const Q=m===void 0?1:m+1;E(Q)},F=()=>s==="number"?t.jsx("input",{...S,type:"text",inputMode:"numeric",value:m??"",disabled:r,readOnly:!0,ref:u,className:`${i}__input`,onClick:a=>a.stopPropagation(),onFocus:a=>{b(!0),o.onFocus?.(a)},onBlur:a=>{b(!1),o.onBlur?.(a)}}):t.jsx("input",{...S,type:"checkbox",checked:T,disabled:r,onChange:a=>G(a.target.checked),ref:u,className:`${i}__input`,onFocus:a=>{b(!0),o.onFocus?.(a)},onBlur:a=>{b(!1),o.onBlur?.(a)}});return t.jsxs("label",{className:U(i,{[`${i}--checked`]:h,[`${i}--unchecked`]:!h,[`${i}--disabled`]:r,[`${i}--focus`]:P,[`${i}--theme-${O}`]:!0,[`${i}--variant-${s}`]:s!=="default"},p),style:$,onClick:s==="number"?z:void 0,children:[t.jsxs("span",{className:`${i}__button`,children:[t.jsx("span",{className:`${i}__overlay`}),h&&s==="number"&&m!==void 0?t.jsx(V,{component:"span",size:"x-small",weight:700,color:r?"alias-border-disabled":"alias-object-on-brand",className:`${i}__number`,children:m}):h&&s==="indeterminate"?t.jsx(q,{fill:r?"var(--color-alias-border-disabled, rgba(10, 10, 10, 0.25))":"white"}):h?t.jsx(B,{fill:r?"var(--color-alias-border-disabled, rgba(10, 10, 10, 0.25))":"white"}):null,F()]}),D&&t.jsx(V,{component:"span",...I,size:"base",children:D})]})});c.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Checkbox"};const J=()=>{const o=`
|
|
2
|
+
## ${e("common.table.title")}
|
|
3
|
+
|
|
4
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
5
|
+
| :--- | :--- | :--- | :--- |
|
|
6
|
+
| \`checked\` | \`boolean\` | ${e("common.table.no")} | ${e("components.checkbox.checkedDescription")} |
|
|
7
|
+
| \`defaultChecked\` | \`boolean\` | ${e("common.table.no")} | ${e("components.checkbox.defaultCheckedDescription")} |
|
|
8
|
+
| \`disabled\` | \`boolean\` | ${e("common.table.no")} | ${e("components.checkbox.disabledDescription")} |
|
|
9
|
+
| \`theme\` | \`'brand' | 'inverse'\` | ${e("common.table.no")} | ${e("components.checkbox.themeDescription")} |
|
|
10
|
+
| \`variant\` | \`'default' | 'number' | 'indeterminate'\` | ${e("common.table.no")} | ${e("components.checkbox.variantDescription")} |
|
|
11
|
+
| \`number\` | \`number\` | ${e("common.table.no")} | ${e("components.checkbox.numberDescription")} |
|
|
12
|
+
| \`defaultNumber\` | \`number\` | ${e("common.table.no")} | ${e("components.checkbox.defaultNumberDescription")} |
|
|
13
|
+
| \`onChange\` | \`(checked: boolean) => void\` | ${e("common.table.no")} | ${e("components.checkbox.onChangeDescription")} |
|
|
14
|
+
| \`onNumberChange\` | \`(number: number | undefined) => void\` | ${e("common.table.no")} | ${e("components.checkbox.onNumberChangeDescription")} |
|
|
15
|
+
| \`children\` | \`ReactNode\` | ${e("common.table.no")} | ${e("components.checkbox.childrenDescription")} |
|
|
16
|
+
| \`typography\` | \`Omit<ITypographyProps<'span'>, 'component' | 'children'>\` | ${e("common.table.no")} | ${e("components.checkbox.typographyDescription")} |
|
|
17
|
+
| \`className\` | \`string\` | ${e("common.table.no")} | ${e("components.checkbox.classNameDescription")} |
|
|
18
|
+
| \`...props\` | \`ComponentProps<'input'>\` | ${e("common.table.no")} | ${e("components.checkbox.propsDescription")} |
|
|
19
|
+
`;return t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(L,{}),t.jsx(_,{children:e("components.checkbox.description")}),t.jsx(M,{}),t.jsx(_,{children:o}),t.jsx(H,{})]})},ue={title:"Components/Checkbox",component:c,parameters:{layout:"padded",docs:{page:J}},tags:["autodocs"],argTypes:{checked:{control:"boolean",description:e("components.checkbox.argTypes.checkedDescription"),table:{type:{summary:"boolean"}}},defaultChecked:{control:"boolean",description:e("components.checkbox.argTypes.defaultCheckedDescription"),table:{type:{summary:"boolean"},defaultValue:{summary:"false"}}},disabled:{control:"boolean",description:e("components.checkbox.argTypes.disabledDescription"),table:{type:{summary:"boolean"},defaultValue:{summary:"false"}}},theme:{control:"select",options:["default","brand","inverse"],description:e("components.checkbox.argTypes.themeDescription"),table:{type:{summary:"ICheckboxTheme"},defaultValue:{summary:"default"}}},variant:{control:"select",options:["default","number","indeterminate"],description:e("components.checkbox.argTypes.variantDescription"),table:{type:{summary:"ICheckboxVariant"},defaultValue:{summary:"default"}}},number:{control:{type:"number",min:0,max:99,step:1},description:e("components.checkbox.argTypes.numberDescription"),table:{type:{summary:"number"}}},defaultNumber:{control:{type:"number",min:0,max:99,step:1},description:e("components.checkbox.argTypes.defaultNumberDescription"),table:{type:{summary:"number"}}},children:{control:"text",description:e("components.checkbox.argTypes.childrenDescription"),table:{type:{summary:"ReactNode"}}}}},x={storyName:e("components.checkbox.stories.default.title"),args:{children:e("components.checkbox.stories.interactive.label")}},k={storyName:e("components.checkbox.stories.states.title"),render:()=>t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsx(c,{checked:!1,children:e("components.checkbox.stories.states.notChecked")}),t.jsx(c,{checked:!0,children:e("components.checkbox.stories.states.checked")}),t.jsx(c,{checked:!0,disabled:!0,children:e("components.checkbox.stories.states.disabledChecked")}),t.jsx(c,{checked:!1,disabled:!0,children:e("components.checkbox.stories.states.disabledUnchecked")})]})},f={storyName:e("components.checkbox.stories.variants.title"),render:()=>{const[o,n]=l.useState(3);return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsx(c,{checked:!0,variant:"default",children:e("components.checkbox.stories.variants.defaultCheckbox")}),t.jsx(c,{checked:!0,variant:"indeterminate",children:e("components.checkbox.stories.variants.indeterminateCheckbox")}),t.jsx(c,{checked:o>0,variant:"number",number:o,onNumberChange:r=>n(r||0),children:e("components.checkbox.stories.variants.quantity",{count:o})})]})}},y={storyName:e("components.checkbox.stories.themes.title"),render:()=>t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsx(c,{checked:!0,children:e("components.checkbox.stories.themes.brandTheme")}),t.jsx(c,{checked:!0,theme:"inverse",children:e("components.checkbox.stories.themes.inverseTheme")})]})},g={storyName:e("components.checkbox.stories.controlled.title"),render:()=>{const[o,n]=l.useState(!1);return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsx(c,{checked:o,onChange:n,children:e("components.checkbox.stories.controlled.currently",{state:o?e("components.checkbox.stories.controlled.checked"):e("components.checkbox.stories.controlled.unchecked")})}),t.jsx(A,{onClick:()=>n(!o),children:e("components.checkbox.stories.controlled.toggleButton")})]})}},C={storyName:e("components.checkbox.stories.numberVariant.title"),render:()=>{const[o,n]=l.useState(1);return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsx(c,{variant:"number",number:o,onNumberChange:r=>n(r||0),children:e("components.checkbox.stories.numberVariant.quantity")}),t.jsx("p",{style:{fontSize:"14px",color:"#666"},children:e("components.checkbox.stories.numberVariant.instructions",{count:o})})]})}},v={storyName:e("components.checkbox.stories.checkboxGroup.title"),render:()=>{const[o,n]=l.useState([]),r=["Option 1","Option 2","Option 3"],d=(s,p)=>{n(p?[...o,s]:o.filter($=>$!==s))};return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[r.map(s=>t.jsx(c,{checked:o.includes(s),onChange:p=>d(s,p),children:e(`components.checkbox.stories.checkboxGroup.options.${s}`)},s)),t.jsxs("p",{style:{fontSize:"14px",color:"#666",marginTop:"8px"},children:[e("components.checkbox.stories.checkboxGroup.selected")," ",o.join(", ")||e("components.checkbox.stories.checkboxGroup.none")]})]})}},N={storyName:e("components.checkbox.stories.completeExample.title"),render:()=>{const[o,n]=l.useState(!1),[r,d]=l.useState(2);return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[t.jsxs("div",{children:[t.jsx("h3",{style:{marginBottom:"12px"},children:e("components.checkbox.stories.complete.termsTitle")}),t.jsx(c,{checked:o,onChange:n,children:e("components.checkbox.stories.complete.agreeTerms")})]}),t.jsxs("div",{children:[t.jsx("h3",{style:{marginBottom:"12px"},children:e("components.checkbox.stories.complete.quantityTitle")}),t.jsx(c,{variant:"number",number:r,onNumberChange:s=>d(s||0),children:e("components.checkbox.stories.complete.items")})]}),t.jsxs("div",{children:[t.jsx("h3",{style:{marginBottom:"12px"},children:e("components.checkbox.stories.complete.disabledTitle")}),t.jsx(c,{checked:!0,disabled:!0,children:e("components.checkbox.stories.complete.disabledOption")})]})]})}},j={storyName:e("components.checkbox.stories.interactive.title"),args:{children:e("components.checkbox.stories.interactive.label"),checked:!1,disabled:!1,variant:"default"}};x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
|
|
20
|
+
storyName: t('components.checkbox.stories.default.title'),
|
|
21
|
+
args: {
|
|
22
|
+
children: t('components.checkbox.stories.interactive.label')
|
|
23
|
+
}
|
|
24
|
+
}`,...x.parameters?.docs?.source}}};k.parameters={...k.parameters,docs:{...k.parameters?.docs,source:{originalSource:`{
|
|
25
|
+
storyName: t('components.checkbox.stories.states.title'),
|
|
26
|
+
render: () => <div style={{
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'column',
|
|
29
|
+
gap: '16px'
|
|
30
|
+
}}>
|
|
31
|
+
<Checkbox checked={false}>
|
|
32
|
+
{t('components.checkbox.stories.states.notChecked')}
|
|
33
|
+
</Checkbox>
|
|
34
|
+
<Checkbox checked>
|
|
35
|
+
{t('components.checkbox.stories.states.checked')}
|
|
36
|
+
</Checkbox>
|
|
37
|
+
<Checkbox checked disabled>
|
|
38
|
+
{t('components.checkbox.stories.states.disabledChecked')}
|
|
39
|
+
</Checkbox>
|
|
40
|
+
<Checkbox checked={false} disabled>
|
|
41
|
+
{t('components.checkbox.stories.states.disabledUnchecked')}
|
|
42
|
+
</Checkbox>
|
|
43
|
+
</div>
|
|
44
|
+
}`,...k.parameters?.docs?.source}}};f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
|
|
45
|
+
storyName: t('components.checkbox.stories.variants.title'),
|
|
46
|
+
render: () => {
|
|
47
|
+
const [number, setNumber] = useState(3);
|
|
48
|
+
return <div style={{
|
|
49
|
+
display: 'flex',
|
|
50
|
+
flexDirection: 'column',
|
|
51
|
+
gap: '16px'
|
|
52
|
+
}}>
|
|
53
|
+
<Checkbox checked variant="default">
|
|
54
|
+
{t('components.checkbox.stories.variants.defaultCheckbox')}
|
|
55
|
+
</Checkbox>
|
|
56
|
+
<Checkbox checked variant="indeterminate">
|
|
57
|
+
{t('components.checkbox.stories.variants.indeterminateCheckbox')}
|
|
58
|
+
</Checkbox>
|
|
59
|
+
<Checkbox checked={number > 0} variant="number" number={number} onNumberChange={number => setNumber(number || 0)}>
|
|
60
|
+
{t('components.checkbox.stories.variants.quantity', {
|
|
61
|
+
count: number
|
|
62
|
+
})}
|
|
63
|
+
</Checkbox>
|
|
64
|
+
</div>;
|
|
65
|
+
}
|
|
66
|
+
}`,...f.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
|
|
67
|
+
storyName: t('components.checkbox.stories.themes.title'),
|
|
68
|
+
render: () => <div style={{
|
|
69
|
+
display: 'flex',
|
|
70
|
+
flexDirection: 'column',
|
|
71
|
+
gap: '16px'
|
|
72
|
+
}}>
|
|
73
|
+
<Checkbox checked>
|
|
74
|
+
{t('components.checkbox.stories.themes.brandTheme')}
|
|
75
|
+
</Checkbox>
|
|
76
|
+
<Checkbox checked theme="inverse">
|
|
77
|
+
{t('components.checkbox.stories.themes.inverseTheme')}
|
|
78
|
+
</Checkbox>
|
|
79
|
+
</div>
|
|
80
|
+
}`,...y.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
81
|
+
storyName: t('components.checkbox.stories.controlled.title'),
|
|
82
|
+
render: () => {
|
|
83
|
+
const [checked, setChecked] = useState(false);
|
|
84
|
+
return <div style={{
|
|
85
|
+
display: 'flex',
|
|
86
|
+
flexDirection: 'column',
|
|
87
|
+
gap: '16px'
|
|
88
|
+
}}>
|
|
89
|
+
<Checkbox checked={checked} onChange={setChecked}>
|
|
90
|
+
{t('components.checkbox.stories.controlled.currently', {
|
|
91
|
+
state: checked ? t('components.checkbox.stories.controlled.checked') : t('components.checkbox.stories.controlled.unchecked')
|
|
92
|
+
})}
|
|
93
|
+
</Checkbox>
|
|
94
|
+
<Button onClick={() => setChecked(!checked)}>
|
|
95
|
+
{t('components.checkbox.stories.controlled.toggleButton')}
|
|
96
|
+
</Button>
|
|
97
|
+
</div>;
|
|
98
|
+
}
|
|
99
|
+
}`,...g.parameters?.docs?.source}}};C.parameters={...C.parameters,docs:{...C.parameters?.docs,source:{originalSource:`{
|
|
100
|
+
storyName: t('components.checkbox.stories.numberVariant.title'),
|
|
101
|
+
render: () => {
|
|
102
|
+
const [quantity, setQuantity] = useState(1);
|
|
103
|
+
return <div style={{
|
|
104
|
+
display: 'flex',
|
|
105
|
+
flexDirection: 'column',
|
|
106
|
+
gap: '16px'
|
|
107
|
+
}}>
|
|
108
|
+
<Checkbox variant="number" number={quantity} onNumberChange={number => setQuantity(number || 0)}>
|
|
109
|
+
{t('components.checkbox.stories.numberVariant.quantity')}
|
|
110
|
+
</Checkbox>
|
|
111
|
+
<p style={{
|
|
112
|
+
fontSize: '14px',
|
|
113
|
+
color: '#666'
|
|
114
|
+
}}>
|
|
115
|
+
{t('components.checkbox.stories.numberVariant.instructions', {
|
|
116
|
+
count: quantity
|
|
117
|
+
})}
|
|
118
|
+
</p>
|
|
119
|
+
</div>;
|
|
120
|
+
}
|
|
121
|
+
}`,...C.parameters?.docs?.source}}};v.parameters={...v.parameters,docs:{...v.parameters?.docs,source:{originalSource:`{
|
|
122
|
+
storyName: t('components.checkbox.stories.checkboxGroup.title'),
|
|
123
|
+
render: () => {
|
|
124
|
+
const [selected, setSelected] = useState<string[]>([]);
|
|
125
|
+
const options = ['Option 1', 'Option 2', 'Option 3'];
|
|
126
|
+
const handleChange = (option: string, checked: boolean) => {
|
|
127
|
+
if (checked) {
|
|
128
|
+
setSelected([...selected, option]);
|
|
129
|
+
} else {
|
|
130
|
+
setSelected(selected.filter(o => o !== option));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
return <div style={{
|
|
134
|
+
display: 'flex',
|
|
135
|
+
flexDirection: 'column',
|
|
136
|
+
gap: '12px'
|
|
137
|
+
}}>
|
|
138
|
+
{options.map(option => <Checkbox key={option} checked={selected.includes(option)} onChange={checked => handleChange(option, checked)}>
|
|
139
|
+
{t(\`components.checkbox.stories.checkboxGroup.options.\${option}\`)}
|
|
140
|
+
</Checkbox>)}
|
|
141
|
+
<p style={{
|
|
142
|
+
fontSize: '14px',
|
|
143
|
+
color: '#666',
|
|
144
|
+
marginTop: '8px'
|
|
145
|
+
}}>
|
|
146
|
+
{t('components.checkbox.stories.checkboxGroup.selected')}{' '}
|
|
147
|
+
{selected.join(', ') || t('components.checkbox.stories.checkboxGroup.none')}
|
|
148
|
+
</p>
|
|
149
|
+
</div>;
|
|
150
|
+
}
|
|
151
|
+
}`,...v.parameters?.docs?.source}}};N.parameters={...N.parameters,docs:{...N.parameters?.docs,source:{originalSource:`{
|
|
152
|
+
storyName: t('components.checkbox.stories.completeExample.title'),
|
|
153
|
+
render: () => {
|
|
154
|
+
const [terms, setTerms] = useState(false);
|
|
155
|
+
const [quantity, setQuantity] = useState(2);
|
|
156
|
+
return <div style={{
|
|
157
|
+
display: 'flex',
|
|
158
|
+
flexDirection: 'column',
|
|
159
|
+
gap: '24px'
|
|
160
|
+
}}>
|
|
161
|
+
<div>
|
|
162
|
+
<h3 style={{
|
|
163
|
+
marginBottom: '12px'
|
|
164
|
+
}}>
|
|
165
|
+
{t('components.checkbox.stories.complete.termsTitle')}
|
|
166
|
+
</h3>
|
|
167
|
+
<Checkbox checked={terms} onChange={setTerms}>
|
|
168
|
+
{t('components.checkbox.stories.complete.agreeTerms')}
|
|
169
|
+
</Checkbox>
|
|
170
|
+
</div>
|
|
171
|
+
<div>
|
|
172
|
+
<h3 style={{
|
|
173
|
+
marginBottom: '12px'
|
|
174
|
+
}}>
|
|
175
|
+
{t('components.checkbox.stories.complete.quantityTitle')}
|
|
176
|
+
</h3>
|
|
177
|
+
<Checkbox variant="number" number={quantity} onNumberChange={number => setQuantity(number || 0)}>
|
|
178
|
+
{t('components.checkbox.stories.complete.items')}
|
|
179
|
+
</Checkbox>
|
|
180
|
+
</div>
|
|
181
|
+
<div>
|
|
182
|
+
<h3 style={{
|
|
183
|
+
marginBottom: '12px'
|
|
184
|
+
}}>
|
|
185
|
+
{t('components.checkbox.stories.complete.disabledTitle')}
|
|
186
|
+
</h3>
|
|
187
|
+
<Checkbox checked disabled>
|
|
188
|
+
{t('components.checkbox.stories.complete.disabledOption')}
|
|
189
|
+
</Checkbox>
|
|
190
|
+
</div>
|
|
191
|
+
</div>;
|
|
192
|
+
}
|
|
193
|
+
}`,...N.parameters?.docs?.source}}};j.parameters={...j.parameters,docs:{...j.parameters?.docs,source:{originalSource:`{
|
|
194
|
+
storyName: t('components.checkbox.stories.interactive.title'),
|
|
195
|
+
args: {
|
|
196
|
+
children: t('components.checkbox.stories.interactive.label'),
|
|
197
|
+
checked: false,
|
|
198
|
+
disabled: false,
|
|
199
|
+
variant: 'default'
|
|
200
|
+
}
|
|
201
|
+
}`,...j.parameters?.docs?.source}}};const be=["Default","States","Variants","Themes","Controlled","NumberVariant","CheckboxGroup","CompleteExample","Interactive"];export{v as CheckboxGroup,N as CompleteExample,g as Controlled,x as Default,j as Interactive,C as NumberVariant,k as States,y as Themes,f as Variants,be as __namedExportsOrder,ue as default};
|