Skip to content

Commit

Permalink
Merge pull request unovue#724 from radix-vue/1.5
Browse files Browse the repository at this point in the history
1.5
  • Loading branch information
zernonia authored Mar 6, 2024
2 parents ccff2e7 + d0517a2 commit a6ff3ea
Show file tree
Hide file tree
Showing 366 changed files with 24,586 additions and 3,568 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ coverage
*.sln
*.sw?
./.nuxt
.neoconf.json

test-results/
playwright-report/
vite.config.ts.timestamp*
*/.vitepress/cache
*/.vitepress/cache
13 changes: 7 additions & 6 deletions .histoire/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"story:preview": "histoire preview"
},
"devDependencies": {
"@histoire/plugin-vue": "^0.17.7",
"@antfu/eslint-config": "^0.39.7",
"@floating-ui/dom": "^1.4.2",
"@floating-ui/vue": "^1.0.2",
"@histoire/plugin-vue": "^0.17.9",
"@iconify/vue": "^4.1.1",
"@radix-ui/colors": "^1.0.1",
"@rollup/plugin-alias": "^5.1.0",
Expand All @@ -20,13 +23,11 @@
"tailwindcss": "^3.4.1"
},
"peerDependencies": {
"vue": "*",
"vite": "*",
"@floating-ui/dom": "*",
"@floating-ui/vue": "*",
"@vitejs/plugin-vue": "*",
"@vueuse/components": "*",
"@vueuse/core": "*",
"@vueuse/shared": "*"
"@vueuse/shared": "*",
"vite": "*",
"vue": "*"
}
}
5 changes: 5 additions & 0 deletions .histoire/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@
.histoire-generic-render-story:not(.__histoire-render-custom-controls) [data-v-app] {
@apply flex justify-center;
}

/* span the width to full if child has w-full class */
.histoire-generic-render-story:not(.__histoire-render-custom-controls) [data-v-app] > div:has(div.w-full) {
width: 100%;
}
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"recommendations": [
"Vue.volar",
"Vue.vscode-typescript-vue-plugin",
"dbaeumer.vscode-eslint"
]
}
9 changes: 9 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export default defineConfig({
{ text: 'Composition', link: '/guides/composition' },
{ text: 'Server side rendering', link: '/guides/server-side-rendering' },
{ text: 'Namespaced', link: '/guides/namespaced-components' },
{ text: `Dates ${BadgeHTML('New')}`, link: '/guides/dates' },
// { text: `Namespaced ${BadgeHTML('New')}`, link: '/guides/namespaced-components' },
],
},
Expand All @@ -111,10 +112,15 @@ export default defineConfig({
{ text: 'Alert Dialog', link: '/components/alert-dialog' },
{ text: 'Aspect Ratio', link: '/components/aspect-ratio' },
{ text: 'Avatar', link: '/components/avatar' },
{ text: `Calendar ${BadgeHTML('Alpha')}`, link: '/components/calendar' },
{ text: 'Checkbox', link: '/components/checkbox' },
{ text: 'Collapsible', link: '/components/collapsible' },
{ text: 'Combobox', link: '/components/combobox' },
{ text: 'Context Menu', link: '/components/context-menu' },
{ text: `Date Field ${BadgeHTML('Alpha')}`, link: '/components/date-field' },
{ text: `Date Picker ${BadgeHTML('Alpha')}`, link: '/components/date-picker' },
{ text: `Date Range Field ${BadgeHTML('Alpha')}`, link: '/components/date-range-field' },
{ text: `Date Range Picker ${BadgeHTML('Alpha')}`, link: '/components/date-range-picker' },
{ text: 'Dialog', link: '/components/dialog' },
{ text: 'Dropdown Menu', link: '/components/dropdown-menu' },
{ text: 'Hover Card', link: '/components/hover-card' },
Expand All @@ -126,10 +132,12 @@ export default defineConfig({
{ text: 'Popover', link: '/components/popover' },
{ text: 'Progress', link: '/components/progress' },
{ text: 'Radio Group', link: '/components/radio-group' },
{ text: `Range Calendar ${BadgeHTML('Alpha')}`, link: '/components/range-calendar' },
{ text: 'Scroll Area', link: '/components/scroll-area' },
{ text: 'Select', link: '/components/select' },
{ text: 'Separator', link: '/components/separator' },
{ text: 'Slider', link: '/components/slider' },
{ text: `Splitter ${BadgeHTML('Alpha')}`, link: '/components/splitter' },
{ text: 'Switch', link: '/components/switch' },
{ text: 'Tabs', link: '/components/tabs' },
{ text: 'Tags Input', link: '/components/tags-input' },
Expand All @@ -149,6 +157,7 @@ export default defineConfig({
{ text: 'Primitive', link: '/utilities/primitive' },
{ text: 'Slot', link: '/utilities/slot' },
{ text: 'useId', link: '/utilities/use-id' },
{ text: 'useDateFormatter', link: '/utilities/use-date-formatter' },
{ text: 'useEmitAsProps', link: '/utilities/use-emit-as-props' },
{ text: 'useForwardExpose', link: '/utilities/use-forward-expose' },
{ text: 'useForwardProps', link: '/utilities/use-forward-props' },
Expand Down
72 changes: 40 additions & 32 deletions docs/.vitepress/contributor-names.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,51 @@
"MellKam",
"mujahidfa",
"onmax",
"sadeghbarati",
"DamianGlowala",
"Scrum",
"BayBreezy",
"kdnk",
"teleskop150750",
"mukundshah",
"sadeghbarati",
"kdnk",
"BayBreezy",
"npldevfr",
"uyloal",
"teleskop150750",
"DamianGlowala",
"enkot",
"madebyfabian",
"libondev",
"romanhrynevych",
"misbahansori",
"YunYouJun",
"maltoze",
"lennartzellmer",
"hoonweiting",
"owlnai",
"tristandubbeld",
"sdq-sts",
"runyasak",
"rsoltanzadeh",
"Scalamando",
"oaleynik",
"steakscience",
"libondev",
"madebyfabian",
"enkot",
"andreww2012",
"ChrisGV04",
"aboubakrbm",
"messenjer",
"94726",
"pkrinesh",
"kn0wn",
"Jordan-Ellis",
"lepture",
"glennlaysonjr",
"edtorba",
"DennisSmuda",
"D-Lite",
"CapitaineToinon",
"steakscience",
"oaleynik",
"pohnean",
"Scalamando",
"rsoltanzadeh",
"runyasak",
"sdq-sts",
"tristandubbeld",
"owlnai",
"hoonweiting",
"lennartzellmer",
"maltoze",
"YunYouJun",
"sanscheese",
"andreww2012",
"aboubakrbm"
"CapitaineToinon",
"cyyynthia",
"D-Lite",
"DennisSmuda",
"idmytro",
"dougwollison",
"edtorba",
"epreston",
"yyx990803",
"glennlaysonjr",
"lepture",
"Jordan-Ellis",
"kn0wn",
"pkrinesh",
"94726"
]
6 changes: 3 additions & 3 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Customize default theme styling by overriding CSS variables:
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/

/**
* Colors
* -------------------------------------------------------------------------- */
Expand All @@ -15,7 +15,7 @@
--vp-c-brand-2: #059669;
--vp-c-brand-darker: #047857;
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
--vp-code-color: rgba(60, 60, 67);
--vp-code-color: rgba(60, 60, 67);
--vp-code-block-bg: #292b30;
--vp-code-block-bg-light: #1e1e20;
--vp-code-block-divider-color: #000000;
Expand All @@ -24,7 +24,7 @@

.dark {
--vp-c-bg: #1e1e20;
--vp-c-bg-alt: #161618;
--vp-c-bg-alt: #161618;
--vp-c-bg-soft: #252529;
--vp-code-block-bg: #161618;
}
Expand Down
28 changes: 28 additions & 0 deletions docs/components/Demos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import AccordionDemo from './demo/Accordion/tailwind/index.vue'
import AlertDialogDemo from './demo/AlertDialog/tailwind/index.vue'
import AspectRatioDemo from './demo/AspectRatio/tailwind/index.vue'
import AvatarDemo from './demo/Avatar/tailwind/index.vue'
import CalendarDemo from './demo/Calendar/tailwind/index.vue'
import CheckboxDemo from './demo/Checkbox/tailwind/index.vue'
import CollapsibleDemo from './demo/Collapsible/tailwind/index.vue'
import ComboboxDemo from './demo/Combobox/tailwind/index.vue'
import ContextMenuDemo from './demo/ContextMenu/tailwind/index.vue'
import DateFieldDemo from './demo/DateField/tailwind/index.vue'
import DatePickerDemo from './demo/DatePicker/tailwind/index.vue'
import DateRangeFieldDemo from './demo/DateRangeField/tailwind/index.vue'
import DateRangePickerDemo from './demo/DateRangePicker/tailwind/index.vue'
import DialogDemo from './demo/Dialog/tailwind/index.vue'
import DropdownMenuDemo from './demo/DropdownMenu/tailwind/index.vue'
import HoverCardDemo from './demo/HoverCard/tailwind/index.vue'
Expand All @@ -18,10 +23,12 @@ import PinInputDemo from './demo/PinInput/tailwind/index.vue'
import PopoverDemo from './demo/Popover/tailwind/index.vue'
import ProgressDemo from './demo/Progress/tailwind/index.vue'
import RadioGroupDemo from './demo/RadioGroup/tailwind/index.vue'
import RangeCalendarDemo from './demo/RangeCalendar/tailwind/index.vue'
import ScrollAreaDemo from './demo/ScrollArea/tailwind/index.vue'
import SelectDemo from './demo/Select/tailwind/index.vue'
import SeparatorDemo from './demo/Separator/tailwind/index.vue'
import SliderDemo from './demo/Slider/tailwind/index.vue'
import SplitterDemo from './demo/Splitter/tailwind/index.vue'
import SwitchDemo from './demo/Switch/tailwind/index.vue'
import TabsDemo from './demo/Tabs/tailwind/index.vue'
import TagsInputDemo from './demo/TagsInput/tailwind/index.vue'
Expand All @@ -48,6 +55,9 @@ import DemoContainer from './DemoContainer.vue'
<DemoContainer title="avatar">
<AvatarDemo />
</DemoContainer>
<DemoContainer title="calendar">
<CalendarDemo />
</DemoContainer>
<DemoContainer title="checkbox">
<CheckboxDemo />
</DemoContainer>
Expand All @@ -60,6 +70,18 @@ import DemoContainer from './DemoContainer.vue'
<DemoContainer title="context menu">
<ContextMenuDemo />
</DemoContainer>
<DemoContainer title="date field">
<DateFieldDemo />
</DemoContainer>
<DemoContainer title="date picker">
<DatePickerDemo />
</DemoContainer>
<DemoContainer title="date range field">
<DateRangeFieldDemo />
</DemoContainer>
<DemoContainer title="date range picker">
<DateRangePickerDemo />
</DemoContainer>
<DemoContainer title="dialog">
<DialogDemo />
</DemoContainer>
Expand Down Expand Up @@ -93,6 +115,9 @@ import DemoContainer from './DemoContainer.vue'
<DemoContainer title="radio group">
<RadioGroupDemo />
</DemoContainer>
<DemoContainer title="range calendar">
<RangeCalendarDemo />
</DemoContainer>
<DemoContainer title="scroll area">
<ScrollAreaDemo />
</DemoContainer>
Expand All @@ -105,6 +130,9 @@ import DemoContainer from './DemoContainer.vue'
<DemoContainer title="slider">
<SliderDemo />
</DemoContainer>
<DemoContainer title="splitter">
<SplitterDemo />
</DemoContainer>
<DemoContainer title="switch">
<SwitchDemo />
</DemoContainer>
Expand Down
64 changes: 64 additions & 0 deletions docs/components/demo/Calendar/css/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<script setup lang="ts">
import { Icon } from '@iconify/vue'
import { CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNext, CalendarPrev, CalendarRoot, type CalendarRootProps } from 'radix-vue'
import './styles.css'
const isDateUnavailable: CalendarRootProps['isDateUnavailable'] = (date) => {
return date.day === 17 || date.day === 18
}
</script>

<template>
<CalendarRoot
v-slot="{ weekDays, grid }"
:is-date-unavailable="isDateUnavailable"
class="Calendar"
fixed-weeks
>
<CalendarHeader class="CalendarHeader">
<CalendarPrev
class="CalendarNavButton"
>
<Icon icon="radix-icons:chevron-left" class="Icon" />
</CalendarPrev>
<CalendarHeading class="CalendarHeading" />
<CalendarNext
class="CalendarNavButton"
>
<Icon icon="radix-icons:chevron-right" class="Icon" />
</CalendarNext>
</CalendarHeader>
<div
class="CalendarWrapper"
>
<CalendarGrid v-for="month in grid" :key="month.value.toString()" class="CalendarGrid">
<CalendarGridHead>
<CalendarGridRow class="CalendarGridRow">
<CalendarHeadCell
v-for="day in weekDays" :key="day"
class="CalendarHeadCell"
>
{{ day }}
</CalendarHeadCell>
</CalendarGridRow>
</CalendarGridHead>
<CalendarGridBody class="CalendarGridWrapper">
<CalendarGridRow v-for="(weekDates, index) in month.rows" :key="`weekDate-${index}`" class="CalendarGridRow">
<CalendarCell
v-for="weekDate in weekDates"
:key="weekDate.toString()"
:date="weekDate"
class="CalendarCell"
>
<CalendarCellTrigger
:day="weekDate"
:month="month.value"
class="CalendarCellTrigger"
/>
</CalendarCell>
</CalendarGridRow>
</CalendarGridBody>
</CalendarGrid>
</div>
</CalendarRoot>
</template>
Loading

0 comments on commit a6ff3ea

Please sign in to comment.