@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
package/README.md
CHANGED
|
@@ -104,36 +104,6 @@ const componentsProperties = computed(() => {
|
|
|
104
104
|
|
|
105
105
|
const anchors = ref([])
|
|
106
106
|
const currentAnchor = ref(null)
|
|
107
|
-
const anchorObserver = ref(null)
|
|
108
|
-
|
|
109
|
-
onMounted(() => {
|
|
110
|
-
// setAnchorObserver()
|
|
111
|
-
// setAnchors()
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
onUnmounted(() => {
|
|
115
|
-
// anchorObserver.value.disconnect()
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
// function setAnchors() {
|
|
119
|
-
// document.querySelectorAll('h2').forEach((element) => {
|
|
120
|
-
// anchors.value.push({
|
|
121
|
-
// id: element.id,
|
|
122
|
-
// name: element?.textContent?.trim().replace('#', '') || '',
|
|
123
|
-
// })
|
|
124
|
-
// anchorObserver.value.observe(element)
|
|
125
|
-
// })
|
|
126
|
-
// }
|
|
127
|
-
// function setAnchorObserver() {
|
|
128
|
-
// anchorObserver = new IntersectionObserver((entries) => {
|
|
129
|
-
// entries.forEach((entry) => {
|
|
130
|
-
// if (entry.isIntersecting) currentAnchor.value = entry.target.id
|
|
131
|
-
// })
|
|
132
|
-
// }, {
|
|
133
|
-
// root: null,
|
|
134
|
-
// threshold: 1,
|
|
135
|
-
// })
|
|
136
|
-
// }
|
|
137
107
|
</script>
|
|
138
108
|
|
|
139
109
|
<template>
|
|
@@ -15,6 +15,7 @@ const components = [
|
|
|
15
15
|
items: [
|
|
16
16
|
{ to: '/component/button', label: 'Button' },
|
|
17
17
|
{ to: '/component/checkbox', label: 'Checkbox' },
|
|
18
|
+
{ to: '/component/datepicker', label: 'Datepicker' },
|
|
18
19
|
{ to: '/component/form', label: 'Form' },
|
|
19
20
|
{ to: '/component/formGroup', label: 'Form Group' },
|
|
20
21
|
{ to: '/component/input', label: 'Input' },
|
|
@@ -51,6 +52,7 @@ const components = [
|
|
|
51
52
|
{ to: '/component/pagination', label: 'Pagination' },
|
|
52
53
|
{ to: '/component/popover', label: 'Popover' },
|
|
53
54
|
{ to: '/component/progress', label: 'Progress' },
|
|
55
|
+
{ to: '/component/qrCode', label: 'QR Code' },
|
|
54
56
|
{ to: '/component/skeleton', label: 'Skeleton' },
|
|
55
57
|
{ to: '/component/spinner', label: 'Spinner' },
|
|
56
58
|
{ to: '/component/stepper', label: 'Stepper' },
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { XDatepicker } from '@indielayer/ui'
|
|
3
|
+
import UsageDemoCode from './usage.vue?raw'
|
|
4
|
+
import UsageDemo from './usage.vue'
|
|
5
|
+
|
|
6
|
+
const title = 'Datepicker'
|
|
7
|
+
const description = 'The datepicker component is used to select a date or time.'
|
|
8
|
+
const components = [XDatepicker]
|
|
9
|
+
const demos = [{
|
|
10
|
+
name: 'Usage',
|
|
11
|
+
description: '',
|
|
12
|
+
code: UsageDemoCode,
|
|
13
|
+
component: UsageDemo,
|
|
14
|
+
}]
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<document-page
|
|
19
|
+
github="https://github.com/indielayer/ui/blob/main/packages/ui/docs/pages/component/datepicker"
|
|
20
|
+
:title="title"
|
|
21
|
+
:description="description"
|
|
22
|
+
:components="components"
|
|
23
|
+
:demos="demos"
|
|
24
|
+
>
|
|
25
|
+
<x-alert type="info" color="warning" outlined>
|
|
26
|
+
This component is just a wrapper for the @vuepic/vue-datepicker package to fit the look and feel. For more documentation please see <x-link
|
|
27
|
+
href="https://vue3datepicker.com/"
|
|
28
|
+
external
|
|
29
|
+
target="blank"
|
|
30
|
+
shadow
|
|
31
|
+
rel="noopener noreferrer"
|
|
32
|
+
>@vuepic/vue-datepicker</x-link> documentation.
|
|
33
|
+
</x-alert>
|
|
34
|
+
</document-page>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
const date = ref()
|
|
5
|
+
const startDate = new Date()
|
|
6
|
+
const endDate = new Date(new Date().setDate(startDate.getDate() + 7))
|
|
7
|
+
|
|
8
|
+
date.value = [startDate, endDate]
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<x-datepicker
|
|
13
|
+
v-model="date"
|
|
14
|
+
label="Select a date"
|
|
15
|
+
helper="Pick a date"
|
|
16
|
+
tooltip="Use it to pick a date"
|
|
17
|
+
range
|
|
18
|
+
multi-calendars
|
|
19
|
+
disable-year-select
|
|
20
|
+
:enable-time-picker="false"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
@@ -24,6 +24,7 @@ const rules = {
|
|
|
24
24
|
return !!v || 'Field is required'
|
|
25
25
|
},
|
|
26
26
|
}
|
|
27
|
+
const range = ref([])
|
|
27
28
|
|
|
28
29
|
function onSubmit(isValid: string) {
|
|
29
30
|
if (isValid) notifications?.success('Valid! Sumitted.')
|
|
@@ -75,6 +76,18 @@ function onSubmit(isValid: string) {
|
|
|
75
76
|
label="Country"
|
|
76
77
|
/>
|
|
77
78
|
|
|
79
|
+
<x-datepicker
|
|
80
|
+
v-model="range"
|
|
81
|
+
:rules="[rules.isRequired]"
|
|
82
|
+
label="Select a date"
|
|
83
|
+
helper="Pick a date"
|
|
84
|
+
tooltip="Use it to pick a date"
|
|
85
|
+
range
|
|
86
|
+
multi-calendars
|
|
87
|
+
disable-year-select
|
|
88
|
+
:enable-time-picker="false"
|
|
89
|
+
/>
|
|
90
|
+
|
|
78
91
|
<x-checkbox
|
|
79
92
|
v-model="agree"
|
|
80
93
|
:rules="[rules.isRequired]"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { MenuArrayItem } from '@indielayer/ui'
|
|
3
|
+
|
|
2
4
|
const menu1 = [{
|
|
3
5
|
label: 'Open',
|
|
4
6
|
active: false,
|
|
@@ -15,10 +17,11 @@ const menu1 = [{
|
|
|
15
17
|
active: false,
|
|
16
18
|
value: 'c',
|
|
17
19
|
}]
|
|
18
|
-
const menu2 = [{
|
|
20
|
+
const menu2: MenuArrayItem[] = [{
|
|
19
21
|
label: 'Menu item 1',
|
|
20
22
|
value: '',
|
|
21
23
|
target: '_blank',
|
|
24
|
+
icon: 'smile',
|
|
22
25
|
href: 'https://indielayer.com',
|
|
23
26
|
}, {
|
|
24
27
|
to: 'menu',
|
|
@@ -30,6 +33,7 @@ const menu2 = [{
|
|
|
30
33
|
label: 'Menu item 3',
|
|
31
34
|
value: '',
|
|
32
35
|
exact: true,
|
|
36
|
+
icon: 'smile',
|
|
33
37
|
items: [{
|
|
34
38
|
label: 'derp',
|
|
35
39
|
}],
|
|
@@ -56,7 +60,7 @@ const menu2 = [{
|
|
|
56
60
|
label: 'Last menu item',
|
|
57
61
|
value: '',
|
|
58
62
|
icon: 'heart',
|
|
59
|
-
exact:
|
|
63
|
+
exact: true,
|
|
60
64
|
onClick: () => {},
|
|
61
65
|
disabled: false,
|
|
62
66
|
}]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { XQrCode } from '@indielayer/ui'
|
|
3
|
+
import UsageDemoCode from './usage.vue?raw'
|
|
4
|
+
import UsageDemo from './usage.vue'
|
|
5
|
+
|
|
6
|
+
const title = 'QR Code'
|
|
7
|
+
const description = 'The QR Code component is used to generate a QR code.'
|
|
8
|
+
const components = [XQrCode]
|
|
9
|
+
const demos = [{
|
|
10
|
+
name: 'Usage',
|
|
11
|
+
description: '',
|
|
12
|
+
code: UsageDemoCode,
|
|
13
|
+
component: UsageDemo,
|
|
14
|
+
}]
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<document-page
|
|
19
|
+
github="https://github.com/indielayer/ui/blob/main/packages/ui/docs/pages/component/qrCode"
|
|
20
|
+
:title="title"
|
|
21
|
+
:description="description"
|
|
22
|
+
:components="components"
|
|
23
|
+
:demos="demos"
|
|
24
|
+
/>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
const value = ref('https://indielayer.com')
|
|
5
|
+
const selected = ref('M')
|
|
6
|
+
const options = [
|
|
7
|
+
{ value: 'L', label: 'Low' },
|
|
8
|
+
{ value: 'M', label: 'Medium' },
|
|
9
|
+
{ value: 'Q', label: 'Quartile' },
|
|
10
|
+
{ value: 'H', label: 'High' },
|
|
11
|
+
]
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="grid grid-cols-2 gap-4 mb-2">
|
|
16
|
+
<x-input v-model="value" label="QR Code Value"/>
|
|
17
|
+
<x-select v-model="selected" native :options="options" label="Error correction"/>
|
|
18
|
+
</div>
|
|
19
|
+
<x-qr-code :value="value" size="140" :error-correction-level="selected"/>
|
|
20
|
+
</template>
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { ref } from 'vue'
|
|
3
|
-
const value = ref(
|
|
3
|
+
const value = ref(30)
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<template>
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<x-slider v-model="value" label="Slider 2 (gradient)" gradient/>
|
|
14
|
-
</div>
|
|
7
|
+
<x-slider v-model="value" label="Slider 1">
|
|
8
|
+
<template #prefix="ctx">
|
|
9
|
+
<div class="w-12">{{ ctx.value }}%</div>
|
|
10
|
+
</template>
|
|
11
|
+
</x-slider>
|
|
12
|
+
<x-slider v-model="value" label="Slider 2" helper="Slide me" class="mt-10"/>
|
|
15
13
|
</template>
|
package/docs/pages/index.vue
CHANGED
|
@@ -77,12 +77,12 @@ module.exports = {
|
|
|
77
77
|
<code-snippet
|
|
78
78
|
lang="js"
|
|
79
79
|
:code="`import { createApp } from 'vue'
|
|
80
|
-
import UI from '@indielayer/ui'
|
|
80
|
+
import UI, { BaseTheme } from '@indielayer/ui'
|
|
81
81
|
|
|
82
82
|
const app = createApp(App)
|
|
83
83
|
|
|
84
84
|
app.use(UI, {
|
|
85
|
-
|
|
85
|
+
theme: BaseTheme,
|
|
86
86
|
})`"
|
|
87
87
|
/>
|
|
88
88
|
<h4 class="text-xl mt-8 mb-4">Load on a Nuxt 3 project</h4>
|
|
@@ -91,35 +91,24 @@ app.use(UI, {
|
|
|
91
91
|
:snippets="[{
|
|
92
92
|
label: 'npm',
|
|
93
93
|
lang: 'bash',
|
|
94
|
-
code: 'npm install @indielayer/ui @vueuse/core floating-vue -D'
|
|
94
|
+
code: 'npm install @indielayer/ui @vueuse/core floating-vue @vuepic/vue-datepicker -D'
|
|
95
95
|
}, {
|
|
96
96
|
label: 'yarn',
|
|
97
97
|
lang: 'bash',
|
|
98
|
-
code: 'yarn add @indielayer/ui @vueuse/core floating-vue -D'
|
|
98
|
+
code: 'yarn add @indielayer/ui @vueuse/core floating-vue @vuepic/vue-datepicker -D'
|
|
99
99
|
}, {
|
|
100
100
|
label: 'pnpm',
|
|
101
101
|
lang: 'bash',
|
|
102
|
-
code: 'pnpm add @indielayer/ui @vueuse/core floating-vue -D'
|
|
102
|
+
code: 'pnpm add @indielayer/ui @vueuse/core floating-vue @vuepic/vue-datepicker -D'
|
|
103
103
|
}]"
|
|
104
104
|
/>
|
|
105
105
|
<code-snippet
|
|
106
106
|
lang="js"
|
|
107
|
-
:code="`
|
|
108
|
-
|
|
107
|
+
:code="`
|
|
109
108
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
110
109
|
export default defineNuxtConfig({
|
|
111
110
|
modules: [
|
|
112
|
-
['@indielayer/ui/nuxt',
|
|
113
|
-
theme: {
|
|
114
|
-
colors: {
|
|
115
|
-
primary: colors.emerald,
|
|
116
|
-
secondary: colors.slate,
|
|
117
|
-
success: colors.green,
|
|
118
|
-
warning: colors.yellow,
|
|
119
|
-
error: colors.red,
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
}],
|
|
111
|
+
['@indielayer/ui/nuxt'],
|
|
123
112
|
],
|
|
124
113
|
css: ['~/assets/tailwind.css'],
|
|
125
114
|
/**
|
|
@@ -140,12 +129,13 @@ export default defineNuxtConfig({
|
|
|
140
129
|
<code-snippet
|
|
141
130
|
lang="js"
|
|
142
131
|
:code="`import { createApp } from 'vue'
|
|
143
|
-
import { createUI, XButton, XAlert } from '@indielayer/ui'
|
|
132
|
+
import { createUI, BaseTheme, XButton, XAlert } from '@indielayer/ui'
|
|
144
133
|
|
|
145
134
|
const app = createApp(App)
|
|
146
135
|
|
|
147
136
|
const UI = createUI({
|
|
148
137
|
components: [XButton, XAlert],
|
|
138
|
+
theme: BaseTheme,
|
|
149
139
|
})
|
|
150
140
|
|
|
151
141
|
app.use(UI)`"
|
package/exports/nuxt.plugin.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import
|
|
2
|
+
import { BaseTheme, injectIconsKey, injectOptionsKey, injectThemeKey, createUI } from '../src'
|
|
3
3
|
|
|
4
4
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
5
|
-
const UI =
|
|
5
|
+
const UI = createUI({
|
|
6
|
+
...nuxtApp.$config.public?.indielayerOptions,
|
|
7
|
+
theme: BaseTheme,
|
|
8
|
+
injectIconsKey,
|
|
9
|
+
injectOptionsKey,
|
|
10
|
+
injectThemeKey,
|
|
11
|
+
|
|
12
|
+
})
|
|
6
13
|
|
|
7
14
|
nuxtApp.vueApp.use(UI)
|
|
8
15
|
})
|
|
@@ -27,13 +27,13 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
|
|
|
27
27
|
type: String,
|
|
28
28
|
default: "right"
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, te = {
|
|
31
31
|
name: "XAccordionItem",
|
|
32
32
|
validators: {
|
|
33
33
|
iconAlign: Z
|
|
34
34
|
}
|
|
35
35
|
}, ae = /* @__PURE__ */ V({
|
|
36
|
-
...
|
|
36
|
+
...te,
|
|
37
37
|
props: ee,
|
|
38
38
|
emits: ["expand"],
|
|
39
39
|
setup(A, { expose: x, emit: _ }) {
|
|
@@ -41,40 +41,40 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
|
|
|
41
41
|
isInsideAccordion: !1
|
|
42
42
|
}), w = z(() => u.iconAlign || n.iconAlign), I = D({
|
|
43
43
|
iconAlign: w
|
|
44
|
-
}),
|
|
44
|
+
}), t = m(!n.expanded), o = m(!0);
|
|
45
45
|
H(() => n.expanded, () => {
|
|
46
|
-
|
|
46
|
+
t.value = !n.expanded;
|
|
47
47
|
});
|
|
48
48
|
function B(e) {
|
|
49
|
-
|
|
49
|
+
o.value && (e.style.height = "0px");
|
|
50
50
|
}
|
|
51
51
|
function E(e, i) {
|
|
52
|
-
|
|
52
|
+
o.value ? (e.addEventListener("transitionend", i), setTimeout(() => {
|
|
53
53
|
e.style.height = `${e.scrollHeight}px`;
|
|
54
54
|
}, 1)) : i();
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
56
|
+
function b(e) {
|
|
57
|
+
o.value ? e.style.removeProperty("height") : o.value = !0;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
59
|
+
function C(e) {
|
|
60
|
+
o.value && (e.style.height = `${e.scrollHeight}px`);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
62
|
+
function $(e, i) {
|
|
63
|
+
o.value ? (e.addEventListener("transitionend", i), setTimeout(() => {
|
|
64
64
|
e.style.height = "0px";
|
|
65
65
|
}, 1)) : i();
|
|
66
66
|
}
|
|
67
67
|
function S(e) {
|
|
68
|
-
|
|
68
|
+
o.value ? e.style.removeProperty("height") : o.value = !0;
|
|
69
69
|
}
|
|
70
70
|
function p(e = !0) {
|
|
71
|
-
|
|
71
|
+
o.value = e, t.value = !1;
|
|
72
72
|
}
|
|
73
73
|
function L(e = !0) {
|
|
74
|
-
|
|
74
|
+
o.value = e, t.value = !0;
|
|
75
75
|
}
|
|
76
76
|
function f() {
|
|
77
|
-
n.disabled || (
|
|
77
|
+
n.disabled || (t.value = !t.value);
|
|
78
78
|
}
|
|
79
79
|
function P(e = !0) {
|
|
80
80
|
p(e), k("expand");
|
|
@@ -82,20 +82,21 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
|
|
|
82
82
|
const { styles: N, classes: c, className: T } = J("AccordionItem", {}, {
|
|
83
83
|
...n,
|
|
84
84
|
...I
|
|
85
|
-
}, { collapsed:
|
|
85
|
+
}, { collapsed: t, isInsideAccordion: u.isInsideAccordion });
|
|
86
86
|
return x({ toggle: f, open: p, close: L }), (e, i) => (a(), v(K(e.tag), {
|
|
87
87
|
style: M(s(N)),
|
|
88
88
|
class: l(s(T)),
|
|
89
89
|
"aria-disabled": e.disabled,
|
|
90
|
-
"aria-expanded":
|
|
90
|
+
"aria-expanded": t.value ? "false" : "true"
|
|
91
91
|
}, {
|
|
92
92
|
default: h(() => [
|
|
93
93
|
r("button", {
|
|
94
|
+
type: "button",
|
|
94
95
|
class: l(s(c).wrapper),
|
|
95
96
|
onClick: f
|
|
96
97
|
}, [
|
|
97
98
|
r("div", R, [
|
|
98
|
-
d(e.$slots, "default", { collapsed:
|
|
99
|
+
d(e.$slots, "default", { collapsed: t.value })
|
|
99
100
|
]),
|
|
100
101
|
e.showIcon ? (a(), g("div", {
|
|
101
102
|
key: 0,
|
|
@@ -111,9 +112,9 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
|
|
|
111
112
|
X(q, {
|
|
112
113
|
onBeforeEnter: B,
|
|
113
114
|
onEnter: E,
|
|
114
|
-
onAfterEnter:
|
|
115
|
-
onBeforeLeave:
|
|
116
|
-
onLeave:
|
|
115
|
+
onAfterEnter: b,
|
|
116
|
+
onBeforeLeave: C,
|
|
117
|
+
onLeave: $,
|
|
117
118
|
onAfterLeave: S
|
|
118
119
|
}, {
|
|
119
120
|
default: h(() => [
|
|
@@ -122,10 +123,10 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
|
|
|
122
123
|
}, [
|
|
123
124
|
d(e.$slots, "content", {
|
|
124
125
|
expand: P,
|
|
125
|
-
collapsed:
|
|
126
|
+
collapsed: t.value
|
|
126
127
|
})
|
|
127
128
|
], 2), [
|
|
128
|
-
[G, !
|
|
129
|
+
[G, !t.value]
|
|
129
130
|
])
|
|
130
131
|
]),
|
|
131
132
|
_: 3
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper: ({ props: t, slots:
|
|
4
|
-
const s = ["relative flex items-center w-full text-left"];
|
|
5
|
-
return e.isInsideAccordion && (
|
|
3
|
+
wrapper: ({ props: t, slots: r, data: e }) => {
|
|
4
|
+
const s = ["relative flex items-center w-full text-left rounded"];
|
|
5
|
+
return e.isInsideAccordion && (r.default && (t.iconAlign === "left" ? s.push("pl-8 pr-4") : s.push("pr-8 pl-4"), s.push("py-2"), t.disabled || s.push("hover:bg-secondary-100 dark:hover:bg-secondary-600")), t.disabled || s.push("cursor-pointer")), s;
|
|
6
6
|
},
|
|
7
|
-
icon: ({ props: t, data:
|
|
7
|
+
icon: ({ props: t, data: r }) => {
|
|
8
8
|
const e = ["absolute flex transform transition-transform duration-150"];
|
|
9
|
-
return
|
|
9
|
+
return r.collapsed || e.push("rotate-180"), t.disabled && e.push("text-secondary-300"), t.iconAlign === "left" ? e.push("left-2") : e.push("right-2"), e;
|
|
10
10
|
},
|
|
11
11
|
content: "transition-[height] duration-150 overflow-y-hidden"
|
|
12
12
|
}
|
|
13
|
-
}, n =
|
|
13
|
+
}, n = i;
|
|
14
14
|
export {
|
|
15
15
|
n as default
|
|
16
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, computed as g, openBlock as l, createElementBlock as a, normalizeStyle as k, unref as r, normalizeClass as
|
|
1
|
+
import { defineComponent as v, computed as g, openBlock as l, createElementBlock as a, normalizeStyle as k, unref as r, normalizeClass as b, renderSlot as t, createBlock as w, createCommentVNode as i, createElementVNode as n, Fragment as B, createVNode as $ } from "vue";
|
|
2
2
|
import { useColors as I } from "../../composables/useColors.js";
|
|
3
3
|
import { useTheme as C } from "../../composables/useTheme.js";
|
|
4
4
|
import { infoIcon as h, successIcon as N, errorIcon as S, warningIcon as V, closeIcon as z } from "../../common/icons.js";
|
|
@@ -24,7 +24,7 @@ const A = /* @__PURE__ */ n("div", { class: "flex-grow" }, null, -1), E = ["aria
|
|
|
24
24
|
const o = m, p = g(() => o.type === "info" ? h : o.type === "success" ? N : o.type === "error" ? S : o.type === "warning" ? V : ""), { styles: u, classes: f, className: d } = C("Alert", {}, o);
|
|
25
25
|
return (e, s) => (l(), a("div", {
|
|
26
26
|
style: k(r(u)),
|
|
27
|
-
class:
|
|
27
|
+
class: b([
|
|
28
28
|
r(d),
|
|
29
29
|
e.$style.alert,
|
|
30
30
|
e.glow ? e.$style["alert--glow"] : "",
|
|
@@ -32,7 +32,7 @@ const A = /* @__PURE__ */ n("div", { class: "flex-grow" }, null, -1), E = ["aria
|
|
|
32
32
|
])
|
|
33
33
|
}, [
|
|
34
34
|
t(e.$slots, "icon", {}, () => [
|
|
35
|
-
e.type ? (l(),
|
|
35
|
+
e.type ? (l(), w(c, {
|
|
36
36
|
key: 0,
|
|
37
37
|
icon: p.value,
|
|
38
38
|
class: "text-[color:var(--x-alert-icon)] dark:text-[color:var(--x-alert-dark-icon)]"
|
|
@@ -44,6 +44,7 @@ const A = /* @__PURE__ */ n("div", { class: "flex-grow" }, null, -1), E = ["aria
|
|
|
44
44
|
e.removable ? (l(), a(B, { key: 0 }, [
|
|
45
45
|
A,
|
|
46
46
|
n("button", {
|
|
47
|
+
type: "button",
|
|
47
48
|
class: "shrink-0",
|
|
48
49
|
"aria-label": e.closeLabel,
|
|
49
50
|
onClick: s[0] || (s[0] = (y) => e.$emit("remove", y))
|
|
@@ -12,7 +12,7 @@ declare const buttonProps: {
|
|
|
12
12
|
icon: StringConstructor;
|
|
13
13
|
iconLeft: StringConstructor;
|
|
14
14
|
iconRight: StringConstructor;
|
|
15
|
-
to: StringConstructor;
|
|
15
|
+
to: (ObjectConstructor | StringConstructor)[];
|
|
16
16
|
outlined: BooleanConstructor;
|
|
17
17
|
rounded: BooleanConstructor;
|
|
18
18
|
glow: BooleanConstructor;
|
|
@@ -56,7 +56,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
56
56
|
icon: StringConstructor;
|
|
57
57
|
iconLeft: StringConstructor;
|
|
58
58
|
iconRight: StringConstructor;
|
|
59
|
-
to: StringConstructor;
|
|
59
|
+
to: (ObjectConstructor | StringConstructor)[];
|
|
60
60
|
outlined: BooleanConstructor;
|
|
61
61
|
rounded: BooleanConstructor;
|
|
62
62
|
glow: BooleanConstructor;
|
|
@@ -95,7 +95,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
95
95
|
icon: StringConstructor;
|
|
96
96
|
iconLeft: StringConstructor;
|
|
97
97
|
iconRight: StringConstructor;
|
|
98
|
-
to: StringConstructor;
|
|
98
|
+
to: (ObjectConstructor | StringConstructor)[];
|
|
99
99
|
outlined: BooleanConstructor;
|
|
100
100
|
rounded: BooleanConstructor;
|
|
101
101
|
glow: BooleanConstructor;
|
|
@@ -3,7 +3,7 @@ import s from "./Button.vue3.js";
|
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const e = {
|
|
5
5
|
$style: s
|
|
6
|
-
},
|
|
6
|
+
}, c = /* @__PURE__ */ t(o, [["__cssModules", e], ["__scopeId", "data-v-ee892a0a"]]);
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
c as default
|
|
9
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as D, ref as I, inject as
|
|
2
|
-
import { useTheme as
|
|
1
|
+
import { defineComponent as D, ref as I, inject as O, computed as l, useAttrs as T, unref as t, openBlock as a, createBlock as r, resolveDynamicComponent as V, normalizeClass as u, normalizeStyle as A, withCtx as E, createCommentVNode as d, createElementVNode as m, renderSlot as F } from "vue";
|
|
2
|
+
import { useTheme as K } from "../../composables/useTheme.js";
|
|
3
3
|
import { useColors as X } from "../../composables/useColors.js";
|
|
4
4
|
import { useCommon as b } from "../../composables/useCommon.js";
|
|
5
5
|
import { useInteractive as h } from "../../composables/useInteractive.js";
|
|
@@ -21,7 +21,7 @@ const J = {
|
|
|
21
21
|
icon: String,
|
|
22
22
|
iconLeft: String,
|
|
23
23
|
iconRight: String,
|
|
24
|
-
to: String,
|
|
24
|
+
to: [String, Object],
|
|
25
25
|
outlined: Boolean,
|
|
26
26
|
rounded: Boolean,
|
|
27
27
|
glow: Boolean,
|
|
@@ -38,10 +38,10 @@ const J = {
|
|
|
38
38
|
...M,
|
|
39
39
|
props: J,
|
|
40
40
|
setup(y, { expose: v }) {
|
|
41
|
-
const e = y, g = I(null), s =
|
|
41
|
+
const e = y, g = I(null), s = O(q, {
|
|
42
42
|
isButtonGroup: !1,
|
|
43
43
|
groupProps: {}
|
|
44
|
-
}), { isButtonGroup: B } = s, n = l(() => s.groupProps.size || e.size), z = l(() => s.groupProps.flat || e.flat), k = l(() => e.color || s.groupProps.color), P = l(() => e.ghost || s.groupProps.ghost), S = l(() => e.light || s.groupProps.light), w = l(() => e.outlined || s.groupProps.outlined), i = l(() => e.disabled || s.groupProps.disabled), p = l(() => e.icon || e.iconLeft), C =
|
|
44
|
+
}), { isButtonGroup: B } = s, n = l(() => s.groupProps.size || e.size), z = l(() => s.groupProps.flat || e.flat), k = l(() => e.color || s.groupProps.color), P = l(() => e.ghost || s.groupProps.ghost), S = l(() => e.light || s.groupProps.light), w = l(() => e.outlined || s.groupProps.outlined), i = l(() => e.disabled || s.groupProps.disabled), p = l(() => e.icon || e.iconLeft), C = T(), R = l(() => C.href ? "a" : e.to ? "router-link" : e.tag), L = l(() => ({
|
|
45
45
|
size: t(n),
|
|
46
46
|
flat: t(z),
|
|
47
47
|
color: t(k),
|
|
@@ -55,10 +55,10 @@ const J = {
|
|
|
55
55
|
iconLeft: t(p),
|
|
56
56
|
iconRight: e.iconRight,
|
|
57
57
|
rounded: e.rounded
|
|
58
|
-
})), { className: G, classes: c, styles: $ } =
|
|
58
|
+
})), { className: G, classes: c, styles: $ } = K("Button", {}, L, {
|
|
59
59
|
isButtonGroup: B
|
|
60
60
|
}), { focus: j, blur: N } = h(g);
|
|
61
|
-
return v({ focus: j, blur: N }), (o, Q) => (a(), r(
|
|
61
|
+
return v({ focus: j, blur: N }), (o, Q) => (a(), r(V(R.value), {
|
|
62
62
|
ref_key: "elRef",
|
|
63
63
|
ref: g,
|
|
64
64
|
to: o.to,
|
|
@@ -69,13 +69,13 @@ const J = {
|
|
|
69
69
|
t(c).wrapper,
|
|
70
70
|
{ "w-full": o.block }
|
|
71
71
|
]),
|
|
72
|
-
style:
|
|
72
|
+
style: A(t($)),
|
|
73
73
|
"aria-busy": o.loading ? "true" : null,
|
|
74
74
|
"aria-disabled": o.tag !== "button" && i.value ? "true" : null,
|
|
75
75
|
disabled: i.value || o.loading,
|
|
76
76
|
type: o.tag === "button" ? o.type : null
|
|
77
77
|
}, {
|
|
78
|
-
default:
|
|
78
|
+
default: E(() => [
|
|
79
79
|
o.loading ? (a(), r(H, {
|
|
80
80
|
key: 0,
|
|
81
81
|
class: "absolute",
|
|
@@ -95,7 +95,7 @@ const J = {
|
|
|
95
95
|
])
|
|
96
96
|
}, null, 8, ["size", "icon", "class"])) : d("", !0),
|
|
97
97
|
m("span", null, [
|
|
98
|
-
|
|
98
|
+
F(o.$slots, "default", {}, void 0, !0)
|
|
99
99
|
])
|
|
100
100
|
], 2),
|
|
101
101
|
o.iconRight ? (a(), r(f, {
|