@indielayer/ui 0.0.0-dev-20240205230210 → 0.0.0-dev-20240212133527
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/README.md +1 -1
- package/docs/components/common/DocumentPage.vue +0 -30
- package/docs/components/menu/DocsMenu.vue +2 -0
- package/docs/pages/component/datepicker/index.vue +35 -0
- package/docs/pages/component/datepicker/usage.vue +22 -0
- package/docs/pages/component/form/usage.vue +13 -0
- package/docs/pages/component/menu/usage.vue +7 -3
- package/docs/pages/component/qrCode/index.vue +25 -0
- package/docs/pages/component/qrCode/usage.vue +20 -0
- package/docs/pages/component/slider/usage.vue +8 -10
- package/docs/pages/index.vue +9 -19
- package/exports/nuxt.plugin.js +9 -2
- package/lib/components/accordion/AccordionItem.vue.js +25 -24
- package/lib/components/accordion/theme/AccordionItem.base.theme.js +7 -7
- package/lib/components/alert/Alert.vue2.js +4 -3
- package/lib/components/button/Button.vue.d.ts +3 -3
- package/lib/components/button/Button.vue.js +2 -2
- package/lib/components/button/Button.vue2.js +10 -10
- package/lib/components/carousel/Carousel.vue.d.ts +8 -2
- package/lib/components/carousel/Carousel.vue.js +51 -48
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +1 -1
- package/lib/components/datepicker/Datepicker.vue.d.ts +1886 -0
- package/lib/components/datepicker/Datepicker.vue.js +328 -0
- package/lib/components/datepicker/Datepicker.vue2.js +4 -0
- package/lib/components/datepicker/Datepicker.vue3.js +5 -0
- package/lib/components/datepicker/__tests__/Datepicker.spec.d.ts +1 -0
- package/lib/components/datepicker/index.d.ts +2 -0
- package/lib/components/datepicker/theme/Datepicker.base.theme.d.ts +3 -0
- package/lib/components/datepicker/theme/Datepicker.base.theme.js +64 -0
- package/lib/components/datepicker/theme/Datepicker.carbon.theme.d.ts +3 -0
- package/lib/components/datepicker/theme/Datepicker.carbon.theme.js +5 -0
- package/lib/components/drawer/Drawer.vue.js +1 -1
- package/lib/components/drawer/theme/Drawer.base.theme.js +1 -1
- package/lib/components/formGroup/FormGroup.vue.js +42 -36
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +99 -94
- package/lib/components/menu/Menu.vue.d.ts +4 -0
- package/lib/components/menu/Menu.vue.js +40 -34
- package/lib/components/menu/MenuItem.vue.d.ts +4 -0
- package/lib/components/menu/MenuItem.vue.js +1 -1
- package/lib/components/menu/MenuItem.vue2.js +43 -39
- package/lib/components/menu/theme/MenuItem.base.theme.js +1 -1
- package/lib/components/notifications/Notifications.vue.js +1 -0
- package/lib/components/popover/Popover.vue.d.ts +7 -25
- package/lib/components/popover/Popover.vue.js +12 -12
- package/lib/components/qrCode/QrCode.vue.d.ts +68 -0
- package/lib/components/qrCode/QrCode.vue.js +93 -0
- package/lib/components/qrCode/QrCode.vue2.js +4 -0
- package/lib/components/qrCode/__tests__/QrCode.spec.d.ts +1 -0
- package/lib/components/qrCode/index.d.ts +2 -0
- package/lib/components/qrCode/qrcodegen.d.ts +94 -0
- package/lib/components/qrCode/qrcodegen.js +571 -0
- package/lib/components/qrCode/theme/QrCode.base.theme.d.ts +3 -0
- package/lib/components/qrCode/theme/QrCode.base.theme.js +8 -0
- package/lib/components/qrCode/theme/QrCode.carbon.theme.d.ts +3 -0
- package/lib/components/qrCode/theme/QrCode.carbon.theme.js +5 -0
- package/lib/components/scroll/Scroll.vue2.js +4 -4
- package/lib/components/slider/Slider.vue.d.ts +31 -31
- package/lib/components/slider/Slider.vue.js +5 -146
- package/lib/components/slider/Slider.vue2.js +101 -2
- package/lib/components/slider/Slider.vue3.js +4 -0
- package/lib/components/slider/theme/Slider.base.theme.js +14 -10
- package/lib/components/slider/theme/Slider.carbon.theme.js +3 -14
- package/lib/components/stepper/Stepper.vue.js +35 -34
- package/lib/components/tab/Tab.vue.js +7 -6
- package/lib/components/table/Table.vue.js +16 -15
- package/lib/components/tooltip/Tooltip.vue.js +1 -1
- package/lib/create.d.ts +5 -1
- package/lib/create.js +18 -15
- package/lib/index.js +117 -113
- package/lib/index.umd.js +39 -3
- package/lib/node_modules/.pnpm/@vuepic_vue-datepicker@8.0.0_vue@3.3.9/node_modules/@vuepic/vue-datepicker/dist/main.css.js +4 -0
- package/lib/node_modules/.pnpm/@vuepic_vue-datepicker@8.0.0_vue@3.3.9/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +5011 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/_lib/format/formatters.js +518 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/_lib/protectedTokens.js +21 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/add.js +20 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/addDays.js +10 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/addMonths.js +21 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/addQuarters.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/addYears.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/constants.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/constructFrom.js +7 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/differenceInCalendarDays.js +11 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/eachDayOfInterval.js +19 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/eachQuarterOfInterval.js +20 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/endOfQuarter.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/endOfWeek.js +11 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/endOfYear.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/format.js +60 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getDay.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getDayOfYear.js +11 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getDaysInMonth.js +10 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getDefaultOptions.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getHours.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getISODay.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getISOWeek.js +12 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getISOWeekYear.js +15 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getMinutes.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getMonth.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getQuarter.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getSeconds.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getWeek.js +12 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getWeekYear.js +17 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/getYear.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/isAfter.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/isBefore.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/isDate.js +7 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/isEqual.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/isSameQuarter.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/isValid.js +12 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/locale/en-US.js +21 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/Parser.js +22 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/Setter.js +40 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/constants.js +49 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +49 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +49 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/DateParser.js +61 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +51 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/DayParser.js +45 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +49 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/EraParser.js +30 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +21 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +22 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +32 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +32 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +33 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +33 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +99 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +48 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +48 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +49 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +40 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +74 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +48 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +69 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +32 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +71 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +70 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +32 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +74 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +71 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +70 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +22 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +22 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers/YearParser.js +49 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/parsers.js +67 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse/_lib/utils.js +103 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parse.js +90 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/parseISO.js +128 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/set.js +11 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setDay.js +12 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setHours.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setISODay.js +11 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setISOWeek.js +10 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setMilliseconds.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setMinutes.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setMonth.js +13 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setSeconds.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setWeek.js +10 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/setYear.js +10 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/startOfDay.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/startOfISOWeek.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/startOfISOWeekYear.js +11 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/startOfQuarter.js +9 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/startOfWeek.js +11 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/startOfWeekYear.js +13 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/startOfYear.js +10 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/sub.js +19 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/subDays.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/subMonths.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/subYears.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/toDate.js +8 -0
- package/lib/node_modules/.pnpm/date-fns@3.3.1/node_modules/date-fns/transpose.js +18 -0
- package/lib/node_modules/.pnpm/{floating-vue@5.2.0_vue@3.3.9 → floating-vue@5.2.2_vue@3.3.9}/node_modules/floating-vue/dist/floating-vue.js +208 -183
- package/lib/nuxt.plugin.js +9 -2
- package/lib/theme.d.ts +3 -1
- package/lib/themes/base/components.d.ts +2 -0
- package/lib/themes/base/components.js +82 -78
- package/lib/themes/base/index.js +2 -2
- package/lib/themes/base/styles.d.ts +2 -0
- package/{src/themes/base/styles.css → lib/themes/base/styles.js} +5 -1
- package/lib/themes/carbon/components.d.ts +2 -0
- package/lib/themes/carbon/components.js +82 -78
- package/lib/themes/carbon/index.js +2 -2
- package/lib/themes/carbon/styles.d.ts +2 -0
- package/lib/themes/carbon/{styles.css.js → styles.js} +2 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -2
- package/src/components/accordion/AccordionItem.vue +1 -0
- package/src/components/accordion/theme/AccordionItem.base.theme.ts +2 -2
- package/src/components/alert/Alert.vue +1 -1
- package/src/components/button/Button.vue +1 -1
- package/src/components/carousel/Carousel.vue +8 -3
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +1 -1
- package/src/components/datepicker/Datepicker.vue +414 -0
- package/src/components/datepicker/__tests__/Datepicker.spec.ts +11 -0
- package/src/components/datepicker/index.ts +2 -0
- package/src/components/datepicker/theme/Datepicker.base.theme.ts +71 -0
- package/src/components/datepicker/theme/Datepicker.carbon.theme.ts +7 -0
- package/src/components/drawer/Drawer.vue +1 -1
- package/src/components/drawer/theme/Drawer.base.theme.ts +1 -1
- package/src/components/formGroup/FormGroup.vue +5 -0
- package/src/components/index.ts +2 -0
- package/src/components/menu/Menu.vue +6 -0
- package/src/components/menu/MenuItem.vue +2 -1
- package/src/components/menu/theme/MenuItem.base.theme.ts +1 -1
- package/src/components/notifications/Notifications.vue +1 -0
- package/src/components/popover/Popover.vue +2 -2
- package/src/components/qrCode/QrCode.vue +120 -0
- package/src/components/qrCode/__tests__/QrCode.spec.ts +14 -0
- package/src/components/qrCode/index.ts +2 -0
- package/src/components/qrCode/qrcodegen.ts +991 -0
- package/src/components/qrCode/theme/QrCode.base.theme.ts +9 -0
- package/src/components/qrCode/theme/QrCode.carbon.theme.ts +7 -0
- package/src/components/scroll/Scroll.vue +1 -1
- package/src/components/slider/Slider.vue +63 -137
- package/src/components/slider/theme/Slider.base.theme.ts +10 -5
- package/src/components/slider/theme/Slider.carbon.theme.ts +2 -16
- package/src/components/stepper/Stepper.vue +1 -0
- package/src/components/tab/Tab.vue +1 -0
- package/src/components/table/Table.vue +1 -1
- package/src/create.ts +11 -4
- package/src/theme.ts +4 -0
- package/src/themes/base/components.ts +2 -0
- package/src/themes/base/index.ts +2 -2
- package/{lib/themes/base/styles.css.js → src/themes/base/styles.ts} +2 -5
- package/src/themes/carbon/components.ts +2 -0
- package/src/themes/carbon/index.ts +2 -2
- package/src/themes/carbon/{styles.css → styles.ts} +2 -0
- package/src/version.ts +1 -1
- package/volar.d.ts +2 -0
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { type ExtractPublicPropTypes } from 'vue';
|
|
2
2
|
import { type ThemeComponent } from '../../composables/useTheme';
|
|
3
3
|
declare const sliderProps: {
|
|
4
|
-
min:
|
|
5
|
-
|
|
4
|
+
min: {
|
|
5
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
6
|
+
default: number;
|
|
7
|
+
};
|
|
8
|
+
max: {
|
|
9
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
6
12
|
step: {
|
|
7
|
-
type: NumberConstructor;
|
|
13
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
8
14
|
default: number;
|
|
9
15
|
};
|
|
10
|
-
gradient: BooleanConstructor;
|
|
11
16
|
modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
12
17
|
id: StringConstructor;
|
|
13
18
|
name: StringConstructor;
|
|
@@ -37,24 +42,24 @@ declare const sliderProps: {
|
|
|
37
42
|
readonly type: StringConstructor;
|
|
38
43
|
readonly default: string | undefined;
|
|
39
44
|
};
|
|
40
|
-
size: {
|
|
41
|
-
readonly type: import("vue").PropType<import("../../composables/useCommon").Size>;
|
|
42
|
-
readonly default: "md";
|
|
43
|
-
readonly validator: (value: string) => boolean;
|
|
44
|
-
};
|
|
45
45
|
};
|
|
46
46
|
export type SliderProps = ExtractPublicPropTypes<typeof sliderProps>;
|
|
47
|
-
type InternalClasses = 'wrapper' | '
|
|
47
|
+
type InternalClasses = 'wrapper' | 'input' | 'track' | 'progress';
|
|
48
48
|
export interface SliderTheme extends ThemeComponent<SliderProps, InternalClasses> {
|
|
49
49
|
}
|
|
50
50
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
51
|
-
min:
|
|
52
|
-
|
|
51
|
+
min: {
|
|
52
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
53
|
+
default: number;
|
|
54
|
+
};
|
|
55
|
+
max: {
|
|
56
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
57
|
+
default: number;
|
|
58
|
+
};
|
|
53
59
|
step: {
|
|
54
|
-
type: NumberConstructor;
|
|
60
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
55
61
|
default: number;
|
|
56
62
|
};
|
|
57
|
-
gradient: BooleanConstructor;
|
|
58
63
|
modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
59
64
|
id: StringConstructor;
|
|
60
65
|
name: StringConstructor;
|
|
@@ -84,11 +89,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
84
89
|
readonly type: StringConstructor;
|
|
85
90
|
readonly default: string | undefined;
|
|
86
91
|
};
|
|
87
|
-
size: {
|
|
88
|
-
readonly type: import("vue").PropType<import("../../composables/useCommon").Size>;
|
|
89
|
-
readonly default: "md";
|
|
90
|
-
readonly validator: (value: string) => boolean;
|
|
91
|
-
};
|
|
92
92
|
}, {
|
|
93
93
|
focus: () => void | undefined;
|
|
94
94
|
blur: () => void | undefined;
|
|
@@ -96,13 +96,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
96
96
|
validate: (val?: any) => boolean;
|
|
97
97
|
setError: (val: string) => void;
|
|
98
98
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
99
|
-
min:
|
|
100
|
-
|
|
99
|
+
min: {
|
|
100
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
101
|
+
default: number;
|
|
102
|
+
};
|
|
103
|
+
max: {
|
|
104
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
105
|
+
default: number;
|
|
106
|
+
};
|
|
101
107
|
step: {
|
|
102
|
-
type: NumberConstructor;
|
|
108
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
103
109
|
default: number;
|
|
104
110
|
};
|
|
105
|
-
gradient: BooleanConstructor;
|
|
106
111
|
modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
107
112
|
id: StringConstructor;
|
|
108
113
|
name: StringConstructor;
|
|
@@ -132,17 +137,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
132
137
|
readonly type: StringConstructor;
|
|
133
138
|
readonly default: string | undefined;
|
|
134
139
|
};
|
|
135
|
-
size: {
|
|
136
|
-
readonly type: import("vue").PropType<import("../../composables/useCommon").Size>;
|
|
137
|
-
readonly default: "md";
|
|
138
|
-
readonly validator: (value: string) => boolean;
|
|
139
|
-
};
|
|
140
140
|
}>> & {
|
|
141
141
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
142
142
|
}, {
|
|
143
143
|
disabled: boolean;
|
|
144
144
|
color: string;
|
|
145
|
-
size: import("../../composables/useCommon").Size;
|
|
146
145
|
loading: boolean;
|
|
147
146
|
loadingStatus: import("../loader/Loader.vue").LoaderStatus;
|
|
148
147
|
readonly: boolean;
|
|
@@ -150,8 +149,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
150
149
|
validateOnInput: boolean;
|
|
151
150
|
hideFooter: boolean;
|
|
152
151
|
rules: unknown[];
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
max: string | number;
|
|
153
|
+
min: string | number;
|
|
154
|
+
step: string | number;
|
|
155
155
|
}, {}>, {
|
|
156
156
|
prefix?(_: {
|
|
157
157
|
value: number;
|
|
@@ -1,148 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { useInteractive as P } from "../../composables/useInteractive.js";
|
|
6
|
-
import { useInputtable as b } from "../../composables/useInputtable.js";
|
|
7
|
-
import { useTheme as ee } from "../../composables/useTheme.js";
|
|
8
|
-
import te from "../label/Label.vue.js";
|
|
9
|
-
import re from "../progress/Progress.vue.js";
|
|
10
|
-
const oe = { class: "flex items-center relative w-full" }, ae = { class: "-mx-2" }, se = ["textContent"], le = {
|
|
11
|
-
...V.props(),
|
|
12
|
-
...Z.props("primary"),
|
|
13
|
-
...P.props(),
|
|
14
|
-
...b.props(),
|
|
15
|
-
min: Number,
|
|
16
|
-
max: Number,
|
|
17
|
-
step: {
|
|
18
|
-
type: Number,
|
|
19
|
-
default: 1
|
|
20
|
-
},
|
|
21
|
-
gradient: Boolean
|
|
22
|
-
}, ne = {
|
|
23
|
-
name: "XSlider",
|
|
24
|
-
validators: {
|
|
25
|
-
...V.validators()
|
|
26
|
-
}
|
|
27
|
-
}, be = /* @__PURE__ */ j({
|
|
28
|
-
...ne,
|
|
29
|
-
props: le,
|
|
30
|
-
emits: b.emits(!1),
|
|
31
|
-
setup(R, { expose: X, emit: L }) {
|
|
32
|
-
const d = R, x = L, v = u(null), o = u(null), n = u(null), t = u(Number(d.modelValue ?? 0)), { focus: p, blur: S } = P(v);
|
|
33
|
-
D(() => d.modelValue, (e) => {
|
|
34
|
-
t.value = Number(e ?? 0);
|
|
35
|
-
}), D(t, (e) => {
|
|
36
|
-
x("update:modelValue", e);
|
|
37
|
-
});
|
|
38
|
-
const a = u(), w = G(() => !!a.value);
|
|
39
|
-
function W(e) {
|
|
40
|
-
if (e.stopPropagation(), !o.value || !n.value)
|
|
41
|
-
return;
|
|
42
|
-
p();
|
|
43
|
-
const r = n.value.offsetWidth;
|
|
44
|
-
let s = Math.floor(e.offsetX * 100 / r);
|
|
45
|
-
s < 0 && (s = 0), s > 100 && (s = 100), t.value = s, setTimeout(() => {
|
|
46
|
-
var m;
|
|
47
|
-
a.value = {
|
|
48
|
-
x: e.x,
|
|
49
|
-
y: e.y,
|
|
50
|
-
maxWidth: r,
|
|
51
|
-
offsetX: (m = o.value) == null ? void 0 : m.offsetLeft
|
|
52
|
-
};
|
|
53
|
-
}), e.preventDefault(), e.stopPropagation();
|
|
54
|
-
}
|
|
55
|
-
function $(e) {
|
|
56
|
-
!o.value || !n.value || (p(), a.value = {
|
|
57
|
-
x: e.x,
|
|
58
|
-
y: e.y,
|
|
59
|
-
maxWidth: n.value.offsetWidth,
|
|
60
|
-
offsetX: o.value.offsetLeft
|
|
61
|
-
}, e.preventDefault(), e.stopPropagation());
|
|
62
|
-
}
|
|
63
|
-
function B(e) {
|
|
64
|
-
if (!a.value || !o.value)
|
|
65
|
-
return;
|
|
66
|
-
const { x: r, maxWidth: s, offsetX: m } = a.value, _ = e.x - r;
|
|
67
|
-
if (_ === 0)
|
|
68
|
-
return;
|
|
69
|
-
const K = m + _;
|
|
70
|
-
let i = Math.floor(K * 100 / s);
|
|
71
|
-
i < 0 && (i = 0), i > 100 && (i = 100), t.value = i, e.preventDefault(), e.stopPropagation();
|
|
72
|
-
}
|
|
73
|
-
function E(e) {
|
|
74
|
-
a.value && (a.value = void 0, e.preventDefault(), e.stopPropagation());
|
|
75
|
-
}
|
|
76
|
-
typeof window < "u" && (f(n, "pointerdown", W, !1), f(o, "pointerdown", $, !1), f(window, "pointermove", B, !0), f(window, "pointerup", E, !0)), f(v, "keydown", I);
|
|
77
|
-
function I(e) {
|
|
78
|
-
if (e.code === "ArrowLeft") {
|
|
79
|
-
const r = t.value - 1;
|
|
80
|
-
r >= 0 && (t.value = r), e.preventDefault();
|
|
81
|
-
} else if (e.code === "ArrowRight") {
|
|
82
|
-
const r = t.value + 1;
|
|
83
|
-
r <= 100 && (t.value = r), e.preventDefault();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
const {
|
|
87
|
-
errorInternal: y,
|
|
88
|
-
reset: q,
|
|
89
|
-
validate: M,
|
|
90
|
-
setError: z,
|
|
91
|
-
isInsideForm: A
|
|
92
|
-
} = b(d, { focus: p, emit: x, withListeners: !1 }), { styles: T, classes: h, className: F } = ee("Slider", {}, d);
|
|
93
|
-
return X({ focus: p, blur: S, reset: q, validate: M, setError: z }), (e, r) => (k(), H(te, {
|
|
94
|
-
ref_key: "elRef",
|
|
95
|
-
ref: v,
|
|
96
|
-
tabindex: "0",
|
|
97
|
-
class: g(["group", [
|
|
98
|
-
l(F),
|
|
99
|
-
l(h).wrapper
|
|
100
|
-
]]),
|
|
101
|
-
style: N(l(T)),
|
|
102
|
-
disabled: e.disabled,
|
|
103
|
-
required: e.required,
|
|
104
|
-
"is-inside-form": l(A),
|
|
105
|
-
label: e.label
|
|
106
|
-
}, {
|
|
107
|
-
default: J(() => [
|
|
108
|
-
c("div", oe, [
|
|
109
|
-
C(e.$slots, "prefix", { value: t.value }),
|
|
110
|
-
c("div", {
|
|
111
|
-
ref_key: "progressRef",
|
|
112
|
-
ref: n,
|
|
113
|
-
class: g([[w.value ? "cursor-grabbing" : "cursor-grab"], "relative w-full py-2 mx-2"])
|
|
114
|
-
}, [
|
|
115
|
-
c("div", ae, [
|
|
116
|
-
O(re, {
|
|
117
|
-
percentage: t.value,
|
|
118
|
-
animate: !1,
|
|
119
|
-
thick: "",
|
|
120
|
-
class: "w-full",
|
|
121
|
-
gradient: e.gradient
|
|
122
|
-
}, null, 8, ["percentage", "gradient"])
|
|
123
|
-
]),
|
|
124
|
-
c("div", {
|
|
125
|
-
ref_key: "dragRef",
|
|
126
|
-
ref: o,
|
|
127
|
-
class: g(["absolute group-focus:border-[color:var(--x-slider-border)]", [
|
|
128
|
-
l(h).drag,
|
|
129
|
-
w.value ? "cursor-grabbing" : "cursor-grab"
|
|
130
|
-
]]),
|
|
131
|
-
style: N(`left: ${t.value}%;`)
|
|
132
|
-
}, null, 6)
|
|
133
|
-
], 2),
|
|
134
|
-
C(e.$slots, "suffix", { value: t.value })
|
|
135
|
-
]),
|
|
136
|
-
l(y) ? (k(), Q("p", {
|
|
137
|
-
key: 0,
|
|
138
|
-
class: "text-sm text-error-500 mt-1",
|
|
139
|
-
textContent: U(l(y))
|
|
140
|
-
}, null, 8, se)) : Y("", !0)
|
|
141
|
-
]),
|
|
142
|
-
_: 3
|
|
143
|
-
}, 8, ["style", "disabled", "required", "is-inside-form", "label", "class"]));
|
|
144
|
-
}
|
|
145
|
-
});
|
|
1
|
+
import o from "./Slider.vue2.js";
|
|
2
|
+
import "./Slider.vue3.js";
|
|
3
|
+
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0298db68"]]);
|
|
146
5
|
export {
|
|
147
|
-
|
|
6
|
+
_ as default
|
|
148
7
|
};
|
|
@@ -1,4 +1,103 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as E, ref as d, watch as p, computed as F, openBlock as f, createBlock as c, normalizeStyle as v, unref as r, normalizeClass as a, withCtx as P, createElementVNode as o, renderSlot as b, mergeProps as R, toHandlers as H, createCommentVNode as L } from "vue";
|
|
2
|
+
import { useCommon as T } from "../../composables/useCommon.js";
|
|
3
|
+
import { useColors as X } from "../../composables/useColors.js";
|
|
4
|
+
import { useInteractive as y } from "../../composables/useInteractive.js";
|
|
5
|
+
import { useInputtable as i } from "../../composables/useInputtable.js";
|
|
6
|
+
import { useTheme as j } from "../../composables/useTheme.js";
|
|
7
|
+
import x from "../label/Label.vue.js";
|
|
8
|
+
import A from "../inputFooter/InputFooter.vue.js";
|
|
9
|
+
const D = { class: "flex items-center relative w-full gap-2 min-h-[1.25rem]" }, G = { class: "relative flex items-center flex-1" }, J = ["id", "disabled", "name", "max", "min", "step", "readonly", "value"], K = {
|
|
10
|
+
...X.props("primary"),
|
|
11
|
+
...y.props(),
|
|
12
|
+
...i.props(),
|
|
13
|
+
min: {
|
|
14
|
+
type: [Number, String],
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
max: {
|
|
18
|
+
type: [Number, String],
|
|
19
|
+
default: 100
|
|
20
|
+
},
|
|
21
|
+
step: {
|
|
22
|
+
type: [Number, String],
|
|
23
|
+
default: 1
|
|
24
|
+
}
|
|
25
|
+
}, M = {
|
|
26
|
+
name: "XSlider",
|
|
27
|
+
validators: {
|
|
28
|
+
...T.validators()
|
|
29
|
+
}
|
|
30
|
+
}, le = /* @__PURE__ */ E({
|
|
31
|
+
...M,
|
|
32
|
+
props: K,
|
|
33
|
+
emits: i.emits(),
|
|
34
|
+
setup(h, { expose: N, emit: g }) {
|
|
35
|
+
const s = h, n = g, m = d(null), l = d(Number(s.modelValue ?? 0)), { focus: u, blur: w } = y(m);
|
|
36
|
+
p(() => s.modelValue, (e) => {
|
|
37
|
+
l.value = Number(e ?? 0);
|
|
38
|
+
}), p(l, (e) => {
|
|
39
|
+
n("update:modelValue", e);
|
|
40
|
+
});
|
|
41
|
+
const S = F(() => (l.value - Number(s.min)) / (Number(s.max) - Number(s.min)) * 100), {
|
|
42
|
+
errorInternal: C,
|
|
43
|
+
hideFooterInternal: _,
|
|
44
|
+
isInsideForm: k,
|
|
45
|
+
inputListeners: I,
|
|
46
|
+
reset: V,
|
|
47
|
+
validate: $,
|
|
48
|
+
setError: q
|
|
49
|
+
} = i(s, { focus: u, emit: n }), { styles: z, classes: t, className: B } = j("Slider", {}, s);
|
|
50
|
+
return N({ focus: u, blur: w, reset: V, validate: $, setError: q }), (e, O) => (f(), c(x, {
|
|
51
|
+
style: v(r(z)),
|
|
52
|
+
disabled: e.disabled,
|
|
53
|
+
required: e.required,
|
|
54
|
+
"is-inside-form": r(k),
|
|
55
|
+
label: e.label,
|
|
56
|
+
class: a([
|
|
57
|
+
r(B),
|
|
58
|
+
r(t).wrapper
|
|
59
|
+
]),
|
|
60
|
+
tooltip: e.tooltip
|
|
61
|
+
}, {
|
|
62
|
+
default: P(() => [
|
|
63
|
+
o("div", D, [
|
|
64
|
+
b(e.$slots, "prefix", { value: l.value }, void 0, !0),
|
|
65
|
+
o("div", G, [
|
|
66
|
+
o("input", R({
|
|
67
|
+
id: e.id,
|
|
68
|
+
ref_key: "elRef",
|
|
69
|
+
ref: m,
|
|
70
|
+
type: "range",
|
|
71
|
+
class: [r(t).input, "absolute w-full z-10 appearance-none bg-transparent focus:outline-none focus-visible:outline-none"],
|
|
72
|
+
disabled: e.disabled,
|
|
73
|
+
name: e.name,
|
|
74
|
+
max: e.max,
|
|
75
|
+
min: e.min,
|
|
76
|
+
step: e.step,
|
|
77
|
+
readonly: e.readonly,
|
|
78
|
+
value: l.value
|
|
79
|
+
}, H(r(I), !0)), null, 16, J),
|
|
80
|
+
o("div", {
|
|
81
|
+
class: a(["absolute w-full", r(t).track])
|
|
82
|
+
}, [
|
|
83
|
+
o("div", {
|
|
84
|
+
class: a(r(t).progress),
|
|
85
|
+
style: v({ width: S.value + "%" })
|
|
86
|
+
}, null, 6)
|
|
87
|
+
], 2)
|
|
88
|
+
]),
|
|
89
|
+
b(e.$slots, "suffix", { value: l.value }, void 0, !0)
|
|
90
|
+
]),
|
|
91
|
+
r(_) ? L("", !0) : (f(), c(A, {
|
|
92
|
+
key: 0,
|
|
93
|
+
error: r(C),
|
|
94
|
+
helper: e.helper
|
|
95
|
+
}, null, 8, ["error", "helper"]))
|
|
96
|
+
]),
|
|
97
|
+
_: 3
|
|
98
|
+
}, 8, ["style", "disabled", "required", "is-inside-form", "label", "class", "tooltip"]));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
2
101
|
export {
|
|
3
|
-
|
|
102
|
+
le as default
|
|
4
103
|
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper:
|
|
4
|
-
|
|
3
|
+
wrapper: ({ props: r }) => {
|
|
4
|
+
const e = [];
|
|
5
|
+
return r.disabled && e.push("cursor-not-allowed"), e;
|
|
6
|
+
},
|
|
7
|
+
input: "w-[calc(100%+0.65rem)] -ml-1 disabled:cursor-not-allowed",
|
|
8
|
+
track: "h-1.5 bg-secondary-200 dark:bg-secondary-700 rounded-md overflow-hidden",
|
|
9
|
+
progress: "h-full bg-[color:var(--x-slider-bg)]"
|
|
5
10
|
},
|
|
6
|
-
styles: ({ props:
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
bg:
|
|
10
|
-
border: a[500]
|
|
11
|
+
styles: ({ props: r, colors: e, css: s }) => {
|
|
12
|
+
const o = e.getPalette(r.color);
|
|
13
|
+
return s.variables({
|
|
14
|
+
bg: o[400]
|
|
11
15
|
});
|
|
12
16
|
}
|
|
13
|
-
},
|
|
17
|
+
}, a = l;
|
|
14
18
|
export {
|
|
15
|
-
|
|
19
|
+
a as default
|
|
16
20
|
};
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
wrapper: "",
|
|
4
|
-
drag: "w-[16px] h-[16px] -mt-[11px] -ml-[8px] rounded-full bg-secondary-900 dark:bg-secondary-100"
|
|
5
|
-
},
|
|
6
|
-
styles: ({ props: r, colors: e, css: t }) => {
|
|
7
|
-
const a = e.getPalette("primary"), s = e.getPalette(r.color);
|
|
8
|
-
return t.variables({
|
|
9
|
-
bg: s[500],
|
|
10
|
-
border: a[500]
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}, l = o;
|
|
1
|
+
import e from "./Slider.base.theme.js";
|
|
2
|
+
const t = e, o = t;
|
|
14
3
|
export {
|
|
15
|
-
|
|
4
|
+
o as default
|
|
16
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as x, ref as c, openBlock as l, createElementBlock as d, createElementVNode as r, normalizeClass as s, unref as o, normalizeStyle as B, createVNode as u, withCtx as m, Fragment as R, renderList as V, createBlock as N, resolveDynamicComponent as z, toDisplayString as f, createCommentVNode as E, renderSlot as P } from "vue";
|
|
2
2
|
import { useCommon as v } from "../../composables/useCommon.js";
|
|
3
3
|
import { useColors as $ } from "../../composables/useColors.js";
|
|
4
4
|
import { useTheme as D } from "../../composables/useTheme.js";
|
|
@@ -40,85 +40,86 @@ const j = { class: "overflow-hidden" }, q = { class: "flex items-start pr-4" },
|
|
|
40
40
|
}, O = {
|
|
41
41
|
name: "XStepper",
|
|
42
42
|
validators: K
|
|
43
|
-
}, se = /* @__PURE__ */
|
|
43
|
+
}, se = /* @__PURE__ */ x({
|
|
44
44
|
...O,
|
|
45
45
|
props: M,
|
|
46
46
|
emits: ["update:modelValue"],
|
|
47
47
|
setup(y, { emit: _ }) {
|
|
48
|
-
const n = y,
|
|
49
|
-
function k(
|
|
50
|
-
|
|
48
|
+
const n = y, b = _, g = c(null), S = c(null), h = c(null);
|
|
49
|
+
function k(e, a) {
|
|
50
|
+
e.disabled || !n.interactive || b("update:modelValue", a);
|
|
51
51
|
}
|
|
52
|
-
function C(
|
|
53
|
-
return
|
|
52
|
+
function C(e, a) {
|
|
53
|
+
return e.status === "incomplete" ? n.iconIncomplete || F : e.status === "error" ? n.iconError || L : e.status === "complete" ? n.iconComplete || T : n.iconPristine || W;
|
|
54
54
|
}
|
|
55
|
-
const { styles: w, classes:
|
|
56
|
-
return (
|
|
55
|
+
const { styles: w, classes: i, className: I } = D("Stepper", {}, n);
|
|
56
|
+
return (e, a) => (l(), d("div", null, [
|
|
57
57
|
r("div", {
|
|
58
58
|
ref_key: "wrapperRef",
|
|
59
59
|
ref: S,
|
|
60
60
|
class: s(["relative", [
|
|
61
|
-
o(
|
|
62
|
-
o(
|
|
61
|
+
o(I),
|
|
62
|
+
o(i).wrapper
|
|
63
63
|
]]),
|
|
64
64
|
style: B(o(w))
|
|
65
65
|
}, [
|
|
66
66
|
u(X, {
|
|
67
67
|
ref_key: "scrollRef",
|
|
68
|
-
ref:
|
|
68
|
+
ref: g,
|
|
69
69
|
scrollbar: !1,
|
|
70
70
|
horizontal: "",
|
|
71
71
|
mousewheel: "",
|
|
72
|
-
class: s(o(
|
|
72
|
+
class: s(o(i).scroller)
|
|
73
73
|
}, {
|
|
74
|
-
default:
|
|
74
|
+
default: m(() => [
|
|
75
75
|
r("div", {
|
|
76
76
|
ref_key: "stepperRef",
|
|
77
77
|
ref: h,
|
|
78
|
-
class: s(["relative", o(
|
|
78
|
+
class: s(["relative", o(i).list])
|
|
79
79
|
}, [
|
|
80
|
-
(
|
|
81
|
-
key:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
80
|
+
(l(!0), d(R, null, V(e.steps, (t, p) => (l(), N(z(e.interactive ? "button" : "div"), {
|
|
81
|
+
key: p,
|
|
82
|
+
type: e.interactive ? "button" : void 0,
|
|
83
|
+
class: s([o(i).step, {
|
|
84
|
+
"cursor-pointer": e.interactive && !t.disabled,
|
|
85
|
+
"text-secondary-400 dark:text-secondary-600": t.disabled,
|
|
86
|
+
"flex-1": e.grow
|
|
86
87
|
}]),
|
|
87
|
-
disabled:
|
|
88
|
-
onClick: (Q) => k(
|
|
88
|
+
disabled: t.disabled || !e.interactive,
|
|
89
|
+
onClick: (Q) => k(t, p)
|
|
89
90
|
}, {
|
|
90
|
-
default:
|
|
91
|
+
default: m(() => [
|
|
91
92
|
r("div", j, [
|
|
92
93
|
r("div", {
|
|
93
|
-
class: s(["h-0.5 w-full mb-2", [
|
|
94
|
+
class: s(["h-0.5 w-full mb-2", [t.status === "complete" || t.status === "incomplete" ? "bg-primary-500" : "bg-secondary-200 dark:bg-secondary-700"]])
|
|
94
95
|
}, null, 2),
|
|
95
96
|
r("div", q, [
|
|
96
97
|
u(A, {
|
|
97
|
-
icon: C(
|
|
98
|
+
icon: C(t),
|
|
98
99
|
size: "sm",
|
|
99
|
-
class: s([o(
|
|
100
|
-
"text-primary-500":
|
|
101
|
-
"text-error-500":
|
|
100
|
+
class: s([o(i).icon, {
|
|
101
|
+
"text-primary-500": t.status === "complete" || t.status === "incomplete",
|
|
102
|
+
"text-error-500": t.status === "error"
|
|
102
103
|
}])
|
|
103
104
|
}, null, 8, ["icon", "class"]),
|
|
104
105
|
r("div", G, [
|
|
105
|
-
r("div", H, f(
|
|
106
|
-
|
|
106
|
+
r("div", H, f(t.label), 1),
|
|
107
|
+
t.description ? (l(), d("div", J, f(t.description), 1)) : E("", !0)
|
|
107
108
|
])
|
|
108
109
|
])
|
|
109
110
|
])
|
|
110
111
|
]),
|
|
111
112
|
_: 2
|
|
112
|
-
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
|
113
|
+
}, 1032, ["type", "class", "disabled", "onClick"]))), 128))
|
|
113
114
|
], 2)
|
|
114
115
|
]),
|
|
115
116
|
_: 1
|
|
116
117
|
}, 8, ["class"])
|
|
117
118
|
], 6),
|
|
118
119
|
r("div", {
|
|
119
|
-
class: s(o(
|
|
120
|
+
class: s(o(i).content)
|
|
120
121
|
}, [
|
|
121
|
-
P(
|
|
122
|
+
P(e.$slots, "default")
|
|
122
123
|
], 2)
|
|
123
124
|
]));
|
|
124
125
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as R, computed as s, ref as d, inject as j, reactive as D, onMounted as E, openBlock as c, createBlock as m, resolveDynamicComponent as L, normalizeStyle as V, unref as o, normalizeClass as v, withCtx as M, renderSlot as g, createElementVNode as z, createCommentVNode as p, toDisplayString as O, Teleport as P, createElementBlock as X } from "vue";
|
|
2
2
|
import { useMutationObserver as F } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
|
|
3
3
|
import { injectTabGroupKey as G } from "../../composables/keys.js";
|
|
4
|
-
import { useCommon as
|
|
4
|
+
import { useCommon as T } from "../../composables/useCommon.js";
|
|
5
5
|
import { useTheme as I } from "../../composables/useTheme.js";
|
|
6
6
|
import C from "../icon/Icon.vue.js";
|
|
7
7
|
import K from "../link/Link.vue.js";
|
|
8
8
|
import { closeIcon as q } from "../../common/icons.js";
|
|
9
9
|
const A = {
|
|
10
|
-
...
|
|
10
|
+
...T.props(),
|
|
11
11
|
value: {
|
|
12
12
|
type: [String, Number]
|
|
13
13
|
},
|
|
@@ -24,14 +24,14 @@ const A = {
|
|
|
24
24
|
}, H = {
|
|
25
25
|
name: "XTab",
|
|
26
26
|
validators: {
|
|
27
|
-
...
|
|
27
|
+
...T.validators()
|
|
28
28
|
}
|
|
29
29
|
}, te = /* @__PURE__ */ R({
|
|
30
30
|
...H,
|
|
31
31
|
props: A,
|
|
32
32
|
emits: ["remove"],
|
|
33
|
-
setup(
|
|
34
|
-
const t =
|
|
33
|
+
setup(x) {
|
|
34
|
+
const t = x, i = s(() => {
|
|
35
35
|
var e, u;
|
|
36
36
|
return ((u = (e = l.value) == null ? void 0 : e.$el) == null ? void 0 : u.href) || t.value;
|
|
37
37
|
}), S = s(() => t.label || t.value), b = d(null), l = d(null), a = j(G, {
|
|
@@ -76,6 +76,7 @@ const A = {
|
|
|
76
76
|
return (e, u) => (c(), m(L(e.to ? K : e.tag), {
|
|
77
77
|
ref_key: "elRef",
|
|
78
78
|
ref: l,
|
|
79
|
+
type: e.tag === "button" ? "button" : void 0,
|
|
79
80
|
"data-value": i.value,
|
|
80
81
|
to: e.to,
|
|
81
82
|
color: r.value ? $.value : void 0,
|
|
@@ -141,7 +142,7 @@ const A = {
|
|
|
141
142
|
], 8, ["to"])) : p("", !0)
|
|
142
143
|
]),
|
|
143
144
|
_: 3
|
|
144
|
-
}, 8, ["data-value", "to", "color", "style", "class", "aria-disabled", "aria-selected"]));
|
|
145
|
+
}, 8, ["type", "data-value", "to", "color", "style", "class", "aria-disabled", "aria-selected"]));
|
|
145
146
|
}
|
|
146
147
|
});
|
|
147
148
|
export {
|