@dolanske/vui 0.4.0 → 1.0.0

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.
Files changed (155) hide show
  1. package/README.md +6 -13
  2. package/dist/components/Alert/Alert.vue.d.ts +7 -1
  3. package/dist/components/Avatar/Avatar.vue.d.ts +15 -1
  4. package/dist/components/Badge/Badge.vue.d.ts +1 -1
  5. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +1 -1
  6. package/dist/components/Button/Button.vue.d.ts +5 -15
  7. package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +2 -0
  8. package/dist/components/Calendar/Calendar.vue.d.ts +1 -1
  9. package/dist/components/Checkbox/Checkbox.vue.d.ts +1 -0
  10. package/dist/components/Dropdown/Dropdown.vue.d.ts +19 -4
  11. package/dist/components/Dropdown/DropdownTitle.vue.d.ts +5 -1
  12. package/dist/components/Flex/Flex.vue.d.ts +3 -1
  13. package/dist/components/Grid/Grid.vue.d.ts +7 -2
  14. package/dist/components/Input/Dropzone.vue.d.ts +1 -1
  15. package/dist/components/Input/Input.vue.d.ts +2 -2
  16. package/dist/components/Kbd/KbdGroup.vue.d.ts +3 -11
  17. package/dist/components/Modal/Confirm.vue.d.ts +1 -1
  18. package/dist/components/Modal/Modal.vue.d.ts +1 -1
  19. package/dist/components/Pagination/Pagination.vue.d.ts +3 -0
  20. package/dist/components/Popout/Popout.vue.d.ts +8 -1
  21. package/dist/components/Progress/Progress.vue.d.ts +2 -0
  22. package/dist/components/Radio/Radio.vue.d.ts +1 -0
  23. package/dist/components/Select/Select.vue.d.ts +2 -0
  24. package/dist/components/Sheet/Sheet.vue.d.ts +3 -0
  25. package/dist/components/Switch/Switch.vue.d.ts +1 -0
  26. package/dist/components/Table/index.d.ts +6 -0
  27. package/dist/components/Table/table.d.ts +1 -1
  28. package/dist/components/Tabs/Tab.vue.d.ts +16 -3
  29. package/dist/components/Tabs/Tabs.vue.d.ts +4 -0
  30. package/dist/components/Toast/toast.d.ts +245 -0
  31. package/dist/index.d.ts +2 -7
  32. package/dist/shared/helpers.d.ts +9 -0
  33. package/dist/shared/theme.d.ts +3 -0
  34. package/dist/style.css +1 -1
  35. package/dist/vui.js +6423 -6046
  36. package/package.json +8 -4
  37. package/src/App.vue +89 -192
  38. package/src/components/Accordion/accordion.scss +2 -0
  39. package/src/components/Alert/Alert.vue +11 -5
  40. package/src/components/Alert/alert.scss +104 -23
  41. package/src/components/Avatar/Avatar.vue +4 -1
  42. package/src/components/Avatar/avatar.scss +1 -1
  43. package/src/components/Badge/Badge.vue +1 -1
  44. package/src/components/Badge/badge.scss +134 -17
  45. package/src/components/Breadcrumbs/BreadcrumbItem.vue +2 -2
  46. package/src/components/Breadcrumbs/Breadcrumbs.vue +1 -2
  47. package/src/components/Breadcrumbs/breadcrumbs.scss +2 -1
  48. package/src/components/Button/Button.vue +16 -21
  49. package/src/components/Button/button.scss +159 -56
  50. package/src/components/ButtonGroup/ButtonGroup.vue +4 -1
  51. package/src/components/ButtonGroup/button-group.scss +2 -2
  52. package/src/components/Calendar/Calendar.vue +9 -3
  53. package/src/components/Calendar/calendar.scss +29 -2
  54. package/src/components/Card/Card.vue +2 -2
  55. package/src/components/Card/card.scss +4 -4
  56. package/src/components/Checkbox/Checkbox.vue +7 -5
  57. package/src/components/Checkbox/checkbox.scss +27 -13
  58. package/src/components/CopyClipboard/CopyClipboard.vue +15 -6
  59. package/src/components/CopyClipboard/copy-clipboard.scss +10 -2
  60. package/src/components/Drawer/Drawer.vue +4 -4
  61. package/src/components/Drawer/drawer.scss +1 -0
  62. package/src/components/Dropdown/Dropdown.vue +44 -20
  63. package/src/components/Dropdown/DropdownItem.vue +5 -4
  64. package/src/components/Dropdown/DropdownTitle.vue +7 -1
  65. package/src/components/Dropdown/dropdown-item.scss +84 -0
  66. package/src/components/Dropdown/dropdown.scss +21 -86
  67. package/src/components/Flex/Flex.vue +4 -1
  68. package/src/components/Grid/Grid.vue +25 -2
  69. package/src/components/Input/Color.vue +26 -0
  70. package/src/components/Input/Counter.vue +12 -16
  71. package/src/components/Input/Dropzone.vue +1 -1
  72. package/src/components/Input/File.vue +1 -1
  73. package/src/components/Input/Input.vue +8 -6
  74. package/src/components/Input/Password.vue +1 -13
  75. package/src/components/Input/Textarea.vue +4 -2
  76. package/src/components/Input/input.scss +113 -19
  77. package/src/components/Kbd/KbdGroup.vue +2 -6
  78. package/src/components/Kbd/kbd.scss +7 -6
  79. package/src/components/Modal/Confirm.vue +1 -1
  80. package/src/components/Modal/Modal.vue +23 -15
  81. package/src/components/Modal/modal.scss +11 -6
  82. package/src/components/OTP/otp.scss +8 -7
  83. package/src/components/Pagination/Pagination.vue +6 -3
  84. package/src/components/Popout/Popout.vue +15 -5
  85. package/src/components/Popout/popout.scss +8 -1
  86. package/src/components/Progress/Progress.vue +18 -5
  87. package/src/components/Progress/progress.scss +7 -1
  88. package/src/components/Radio/Radio.vue +4 -2
  89. package/src/components/Radio/radio.scss +28 -9
  90. package/src/components/Select/Select.vue +49 -18
  91. package/src/components/Select/select.scss +35 -2
  92. package/src/components/Sheet/Sheet.vue +8 -2
  93. package/src/components/Sheet/sheet.scss +9 -0
  94. package/src/components/Sidebar/Sidebar.vue +46 -16
  95. package/src/components/Sidebar/sidebar.scss +6 -5
  96. package/src/components/Spinner/spinner.scss +2 -1
  97. package/src/components/Switch/Switch.vue +4 -3
  98. package/src/components/Switch/switch.scss +48 -7
  99. package/src/components/Table/{Header.vue → Head.vue} +5 -5
  100. package/src/components/Table/{Table.vue → Root.vue} +2 -2
  101. package/src/components/Table/SelectRow.vue +2 -1
  102. package/src/components/Table/index.ts +7 -0
  103. package/src/components/Table/table.scss +25 -5
  104. package/src/components/Table/table.ts +7 -3
  105. package/src/components/Tabs/Tab.vue +7 -9
  106. package/src/components/Tabs/Tabs.vue +9 -2
  107. package/src/components/Tabs/tabs.scss +11 -3
  108. package/src/components/Toast/Toasts.vue +5 -0
  109. package/src/components/Toast/toast.scss +6 -2
  110. package/src/components/Toast/toast.ts +7 -0
  111. package/src/components/Tooltip/Tooltip.vue +9 -9
  112. package/src/components/Tooltip/tooltip.scss +4 -0
  113. package/src/examples/ExampleAccordions.vue +58 -0
  114. package/src/examples/ExampleAlerts.vue +78 -0
  115. package/src/examples/ExampleAvatars.vue +44 -0
  116. package/src/examples/ExampleBadges.vue +48 -0
  117. package/src/examples/ExampleBreadcrumbs.vue +46 -0
  118. package/src/examples/ExampleButtons.vue +140 -0
  119. package/src/examples/ExampleCalendars.vue +40 -0
  120. package/src/examples/ExampleCards.vue +94 -0
  121. package/src/examples/ExampleCheckboxes.vue +123 -0
  122. package/src/examples/ExampleCopyClipboard.vue +47 -0
  123. package/src/examples/ExampleDividers.vue +39 -0
  124. package/src/examples/ExampleDrawers.vue +67 -0
  125. package/src/examples/ExampleDropdowns.vue +114 -0
  126. package/src/examples/ExampleFlexGrid.vue +122 -0
  127. package/src/examples/ExampleInputs.vue +234 -0
  128. package/src/examples/ExampleKBD.vue +65 -0
  129. package/src/examples/ExampleModals.vue +143 -0
  130. package/src/examples/ExamplePalette.vue +159 -0
  131. package/src/examples/ExamplePopouts.vue +41 -0
  132. package/src/examples/ExampleSheets.vue +77 -0
  133. package/src/examples/ExampleSidebars.vue +270 -0
  134. package/src/examples/ExampleSkeletons.vue +26 -0
  135. package/src/examples/ExampleSpinners.vue +78 -0
  136. package/src/examples/ExampleTables.vue +195 -0
  137. package/src/examples/ExampleTabs.vue +119 -0
  138. package/src/examples/ExampleToasts.vue +96 -0
  139. package/src/examples/ExampleTooltips.vue +70 -0
  140. package/src/examples/shared/ExampleColor.vue +28 -0
  141. package/src/index.ts +4 -11
  142. package/src/internal/Backdrop/backdrop.scss +7 -1
  143. package/src/shared/helpers.ts +43 -0
  144. package/src/shared/theme.ts +22 -0
  145. package/src/style/animation.scss +1 -0
  146. package/src/style/core.scss +34 -57
  147. package/src/style/layout.scss +102 -5
  148. package/src/style/{fonts.scss → text.scss} +39 -0
  149. package/src/style/theme.scss +195 -0
  150. package/src/style/tooltip.scss +22 -4
  151. package/src/style/typography.scss +95 -18
  152. package/dist/components/Table/Row.vue.d.ts +0 -16
  153. package/src/components/Table/Row.vue +0 -9
  154. /package/dist/components/Table/{Header.vue.d.ts → Head.vue.d.ts} +0 -0
  155. /package/dist/components/Table/{Table.vue.d.ts → Root.vue.d.ts} +0 -0
@@ -16,7 +16,7 @@ interface Props {
16
16
  }
17
17
 
18
18
  const {
19
- placement = 'bottom',
19
+ placement,
20
20
  delay = 0,
21
21
  } = defineProps<Props>()
22
22
 
@@ -66,21 +66,21 @@ const id = useId()
66
66
  >
67
67
  <slot />
68
68
  </div>
69
- <Transition appear name="tooltip">
70
- <Popout v-if="showTooltip" :id :anchor="popoutAnchorRef" class="vui-tooltip" :placement name="tooltip">
71
- <slot name="tooltip" />
72
- </Popout>
73
- </Transition>
69
+ <!-- <Transition name="tooltip"> -->
70
+ <Popout v-if="showTooltip" :id :anchor="popoutAnchorRef" class="vui-tooltip" :placement>
71
+ <slot name="tooltip" />
72
+ </Popout>
73
+ <!-- </Transition> -->
74
74
  </template>
75
75
 
76
- <style scoped>
76
+ <!-- <style scoped>
77
77
  .tooltip-enter-active,
78
78
  .tooltip-leave-active {
79
- transition: 0.1s opacity ease-in-out;
79
+ transition: var(--transition-fast);
80
80
  }
81
81
 
82
82
  .tooltip-enter-from,
83
83
  .tooltip-leave-to {
84
84
  opacity: 0;
85
85
  }
86
- </style>
86
+ </style> -->
@@ -1,4 +1,8 @@
1
1
  .vui-tooltip {
2
2
  padding: var(--space-s);
3
3
  max-width: 512px;
4
+ background-color: var(--color-bg-raised);
4
5
  }
6
+
7
+ // :root.light {
8
+ // }
@@ -0,0 +1,58 @@
1
+ <script setup lang='ts'>
2
+ import Accordion from '../components/Accordion/Accordion.vue'
3
+ import AccordionGroup from '../components/Accordion/AccordionGroup.vue'
4
+ import Grid from '../components/Grid/Grid.vue'
5
+ </script>
6
+
7
+ <template>
8
+ <div class="mb-xxl">
9
+ <h3 class="mb-l">
10
+ Accordion
11
+ </h3>
12
+
13
+ <Grid :columns="2" gap="xl">
14
+ <div>
15
+ <strong class="block mb-s">Base</strong>
16
+ <Accordion label="Open details" class="mb-xl">
17
+ <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Excepturi nostrum aspernatur nam earum vitae deleniti, odio atque esse sequi, in harum! Sint dolorum quis excepturi odio eum aspernatur aliquid harum.</p>
18
+ </Accordion>
19
+
20
+ <div class="mb-xl" />
21
+
22
+ <strong class="block mb-s">Group</strong>
23
+ <AccordionGroup single>
24
+ <Accordion label="First">
25
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum aliquam ad dicta nesciunt exercitationem? Quas vitae suscipit aliquam numquam incidunt corporis ullam, nihil dolores perferendis ipsa velit tempora accusantium cupiditate.
26
+ </Accordion>
27
+ <Accordion label="Second">
28
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum aliquam ad dicta nesciunt exercitationem? Quas vitae suscipit aliquam numquam incidunt corporis ullam, nihil dolores perferendis ipsa velit tempora accusantium cupiditate.
29
+ </Accordion>
30
+ <Accordion label="Third">
31
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum aliquam ad dicta nesciunt exercitationem? Quas vitae suscipit aliquam numquam incidunt corporis ullam, nihil dolores perferendis ipsa velit tempora accusantium cupiditate.
32
+ </Accordion>
33
+ </AccordionGroup>
34
+ </div>
35
+ <div>
36
+ <strong class="block mb-s">Card</strong>
37
+ <Accordion label="Open details" card>
38
+ <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Excepturi nostrum aspernatur nam earum vitae deleniti, odio atque esse sequi, in harum! Sint dolorum quis excepturi odio eum aspernatur aliquid harum.</p>
39
+ </Accordion>
40
+
41
+ <div class="mb-xl" />
42
+
43
+ <strong class="block mb-s">Card group</strong>
44
+ <AccordionGroup single>
45
+ <Accordion card label="First" class="mb-xs">
46
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum aliquam ad dicta nesciunt exercitationem? Quas vitae suscipit aliquam numquam incidunt corporis ullam, nihil dolores perferendis ipsa velit tempora accusantium cupiditate.
47
+ </Accordion>
48
+ <Accordion card label="Second" class="mb-xs">
49
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum aliquam ad dicta nesciunt exercitationem? Quas vitae suscipit aliquam numquam incidunt corporis ullam, nihil dolores perferendis ipsa velit tempora accusantium cupiditate.
50
+ </Accordion>
51
+ <Accordion card label="Third" class="mb-xs">
52
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum aliquam ad dicta nesciunt exercitationem? Quas vitae suscipit aliquam numquam incidunt corporis ullam, nihil dolores perferendis ipsa velit tempora accusantium cupiditate.
53
+ </Accordion>
54
+ </AccordionGroup>
55
+ </div>
56
+ </Grid>
57
+ </div>
58
+ </template>
@@ -0,0 +1,78 @@
1
+ <script setup lang='ts'>
2
+ import { Icon } from '@iconify/vue'
3
+ import Alert from '../components/Alert/Alert.vue'
4
+ import Button from '../components/Button/Button.vue'
5
+ import Flex from '../components/Flex/Flex.vue'
6
+
7
+ const variants = ['neutral', 'danger', 'warning', 'success', 'info'] as const
8
+ </script>
9
+
10
+ <template>
11
+ <div class="mb-xxl">
12
+ <h3 class="mb-l">
13
+ Alerts
14
+ </h3>
15
+ <table>
16
+ <tbody>
17
+ <tr>
18
+ <th>Base</th>
19
+ <td>
20
+ <Flex column>
21
+ <Alert v-for="variant in variants" :key="variant" :variant>
22
+ We'd like to get in touch about your car's extended warranty.
23
+ </Alert>
24
+ </Flex>
25
+ </td>
26
+ </tr>
27
+ <tr>
28
+ <th>Filled</th>
29
+ <td>
30
+ <Flex column>
31
+ <Alert v-for="variant in variants" :key="variant" :variant filled>
32
+ We'd like to get in touch about your car's extended warranty.
33
+ </Alert>
34
+ </Flex>
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <th>Title + description</th>
39
+ <td>
40
+ <Flex column>
41
+ <Alert
42
+ v-for="variant in variants"
43
+ :key="variant"
44
+ :variant
45
+ title="Warranty discounts 2025"
46
+ description="We'd like to get in touch about your car's extended warranty."
47
+ />
48
+ </Flex>
49
+ </td>
50
+ </tr>
51
+ <tr>
52
+ <th>Title + description + filled</th>
53
+ <td>
54
+ <Flex column>
55
+ <Alert v-for="variant in variants" :key="variant" :variant title="Warranty discounts 2025" filled description="We'd like to get in touch about your car's extended warranty." />
56
+ </Flex>
57
+ </td>
58
+ </tr>
59
+ <tr>
60
+ <th>Custom</th>
61
+ <td>
62
+ <Alert variant="warning">
63
+ <Flex align-center space-between>
64
+ <p>Unfortunately we can't help you.</p>
65
+ <Button>
66
+ <template #start>
67
+ <Icon icon="ph:x" />
68
+ </template>
69
+ Ignore
70
+ </Button>
71
+ </Flex>
72
+ </Alert>
73
+ </td>
74
+ </tr>
75
+ </tbody>
76
+ </table>
77
+ </div>
78
+ </template>
@@ -0,0 +1,44 @@
1
+ <script setup lang='ts'>
2
+ import Avatar from '../components/Avatar/Avatar.vue'
3
+ import Flex from '../components/Flex/Flex.vue'
4
+
5
+ const variants = ['s', 'm', 'l', 96] as const
6
+ </script>
7
+
8
+ <template>
9
+ <div class="mb-xxl">
10
+ <h3 class="mb-l">
11
+ Avatars
12
+ </h3>
13
+ <table>
14
+ <tbody>
15
+ <tr>
16
+ <th>Base S, M, L <br> + custom size</th>
17
+ <td>
18
+ <Flex>
19
+ <Avatar v-for="size in variants" :key="size" :size />
20
+ </Flex>
21
+ </td>
22
+ </tr>
23
+ <tr>
24
+ <th>Photo</th>
25
+ <td>
26
+ <Flex>
27
+ <Avatar v-for="size in variants" :key="size" :size url="https://i.imgur.com/bHWgZfD.jpeg" />
28
+ </Flex>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <th>Abbreviation</th>
33
+ <td>
34
+ <Flex>
35
+ <Avatar v-for="size in variants" :key="size" :size>
36
+ AB
37
+ </Avatar>
38
+ </Flex>
39
+ </td>
40
+ </tr>
41
+ </tbody>
42
+ </table>
43
+ </div>
44
+ </template>
@@ -0,0 +1,48 @@
1
+ <script setup lang='ts'>
2
+ import Badge from '../components/Badge/Badge.vue'
3
+ import Flex from '../components/Flex/Flex.vue'
4
+
5
+ const variants = ['neutral', 'danger', 'warning', 'success', 'info', 'accent'] as const
6
+ </script>
7
+
8
+ <template>
9
+ <div class="mb-xxl">
10
+ <h3 class="mb-l">
11
+ Badges
12
+ </h3>
13
+ <table>
14
+ <tbody>
15
+ <tr>
16
+ <th>Base</th>
17
+ <td>
18
+ <Flex>
19
+ <Badge v-for="variant in variants" :key="variant" :variant>
20
+ Badge
21
+ </Badge>
22
+ </Flex>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <th>Outline</th>
27
+ <td>
28
+ <Flex>
29
+ <Badge v-for="variant in variants" :key="variant" :variant outline>
30
+ Badge
31
+ </Badge>
32
+ </Flex>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <th>Filled</th>
37
+ <td>
38
+ <Flex>
39
+ <Badge v-for="variant in variants" :key="variant" :variant filled>
40
+ Badge
41
+ </Badge>
42
+ </Flex>
43
+ </td>
44
+ </tr>
45
+ </tbody>
46
+ </table>
47
+ </div>
48
+ </template>
@@ -0,0 +1,46 @@
1
+ <script setup lang='ts'>
2
+ import { Icon } from '@iconify/vue'
3
+ import BreadcrumbItem from '../components/Breadcrumbs/BreadcrumbItem.vue'
4
+ import Breadcrumbs from '../components/Breadcrumbs/Breadcrumbs.vue'
5
+ import Button from '../components/Button/Button.vue'
6
+ </script>
7
+
8
+ <template>
9
+ <div class="mb-xxl">
10
+ <h3 class="mb-l">
11
+ Breadcrumbs
12
+ </h3>
13
+
14
+ <table>
15
+ <tbody>
16
+ <tr>
17
+ <th>Base with links</th>
18
+ <td>
19
+ <Breadcrumbs>
20
+ <BreadcrumbItem label="Home" href="#" />
21
+ <BreadcrumbItem label="About" href="#" />
22
+ <BreadcrumbItem label="You" />
23
+ </Breadcrumbs>
24
+ </td>
25
+ </tr>
26
+ <tr>
27
+ <th>With components</th>
28
+ <td>
29
+ <Breadcrumbs>
30
+ <BreadcrumbItem label="Home" href="#" />
31
+ <BreadcrumbItem label="About" href="#" />
32
+ <BreadcrumbItem>
33
+ <Button size="s">
34
+ Switch
35
+ <template #end>
36
+ <Icon icon="ph:caret-down" />
37
+ </template>
38
+ </Button>
39
+ </BreadcrumbItem>
40
+ </Breadcrumbs>
41
+ </td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+ </div>
46
+ </template>
@@ -0,0 +1,140 @@
1
+ <script setup lang='ts'>
2
+ import { Icon } from '@iconify/vue'
3
+ import Button from '../components/Button/Button.vue'
4
+ import ButtonGroup from '../components/ButtonGroup/ButtonGroup.vue'
5
+ import Flex from '../components/Flex/Flex.vue'
6
+
7
+ const variants = ['gray', 'fill', 'danger', 'success', 'link', 'accent'] as const
8
+ </script>
9
+
10
+ <template>
11
+ <div class="mb-xxl">
12
+ <h3 class="mb-l">
13
+ Buttons
14
+ </h3>
15
+ <table>
16
+ <tbody>
17
+ <tr>
18
+ <th>Base</th>
19
+ <td>
20
+ <Flex gap="s">
21
+ <Button v-for="btn in variants" :key="btn" :variant="btn">
22
+ Button
23
+ </Button>
24
+ </Flex>
25
+ </td>
26
+ </tr>
27
+ <tr>
28
+ <th>Base + large</th>
29
+ <td>
30
+ <Flex gap="s">
31
+ <Button v-for="btn in variants" :key="btn" :variant="btn" size="l">
32
+ Button
33
+ </Button>
34
+ </Flex>
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <th>Base + small</th>
39
+ <td>
40
+ <Flex gap="s">
41
+ <Button v-for="btn in variants" :key="btn" :variant="btn" size="s">
42
+ Button
43
+ </Button>
44
+ </Flex>
45
+ </td>
46
+ </tr>
47
+ <tr>
48
+ <th>Plain</th>
49
+ <td>
50
+ <Flex gap="s">
51
+ <Button v-for="btn in variants" :key="btn" :variant="btn" plain>
52
+ Button
53
+ </Button>
54
+ </Flex>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <th>Outline</th>
59
+ <td>
60
+ <Flex gap="s">
61
+ <Button v-for="btn in variants" :key="btn" :variant="btn" outline>
62
+ Button
63
+ </Button>
64
+ </Flex>
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <th>Disabled</th>
69
+ <td>
70
+ <Flex gap="s">
71
+ <Button v-for="btn in variants" :key="btn" :variant="btn" disabled>
72
+ Button
73
+ </Button>
74
+ </Flex>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <th>Squar + icon</th>
79
+ <td>
80
+ <Flex gap="s">
81
+ <Button v-for="btn in variants" :key="btn" :variant="btn" square icon="ph:info" />
82
+ </Flex>
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <th>Squar + icon + small</th>
87
+ <td>
88
+ <Flex gap="s">
89
+ <Button v-for="btn in variants" :key="btn" :variant="btn" square icon="ph:info" size="s" />
90
+ </Flex>
91
+ </td>
92
+ </tr>
93
+ <tr>
94
+ <th>Squar + icon + large</th>
95
+ <td>
96
+ <Flex gap="s">
97
+ <Button v-for="btn in variants" :key="btn" :variant="btn" square icon="ph:info" size="l" />
98
+ </Flex>
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <th>Icon + text</th>
103
+ <td>
104
+ <Flex gap="s">
105
+ <Button v-for="btn in variants" :key="btn" :variant="btn">
106
+ <template #start>
107
+ <Icon icon="ph:arrow-left" />
108
+ </template>
109
+ Prev
110
+ <template #end>
111
+ <Icon icon="ph:arrow-right" />
112
+ </template>
113
+ </Button>
114
+ </Flex>
115
+ </td>
116
+ </tr>
117
+ <tr>
118
+ <td>Button group</td>
119
+ <td>
120
+ <Flex gap="s" wrap>
121
+ <ButtonGroup v-for="btn in variants" :key="btn">
122
+ <Button :variant="btn">
123
+ Hello
124
+ </Button>
125
+ <Button :variant="btn" icon="ph:caret-down" />
126
+ </ButtonGroup>
127
+
128
+ <ButtonGroup>
129
+ <Button square icon="ph:text-b-bold" active />
130
+ <Button square icon="ph:text-bold" />
131
+ <Button square icon="ph:text-italic" />
132
+ <Button square icon="ph:text-a-underline" />
133
+ </ButtonGroup>
134
+ </Flex>
135
+ </td>
136
+ </tr>
137
+ </tbody>
138
+ </table>
139
+ </div>
140
+ </template>
@@ -0,0 +1,40 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import Button from '../components/Button/Button.vue'
4
+ import Calendar from '../components/Calendar/Calendar.vue'
5
+
6
+ const date = ref(Date.now())
7
+ </script>
8
+
9
+ <template>
10
+ <div class="mb-xxl">
11
+ <h3 class="mb-l">
12
+ Calendars
13
+ </h3>
14
+
15
+ <p class="mb-s">
16
+ Using the <a href="https://vue3datepicker.com/" target="_blank">Vue Datepicker</a> component. By default it always outputs a javascript Date object. So it is up to the user to format the dates themselves.
17
+ </p>
18
+
19
+ <table>
20
+ <tbody>
21
+ <tr>
22
+ <th>Base</th>
23
+ <td>
24
+ <Calendar v-model="date" format="dd/MM/yyyy">
25
+ <template #trigger>
26
+ <Button>{{ date ?? 'Choose date' }}</Button>
27
+ </template>
28
+ </Calendar>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <th>Inline</th>
33
+ <th>
34
+ <Calendar inline />
35
+ </th>
36
+ </tr>
37
+ </tbody>
38
+ </table>
39
+ </div>
40
+ </template>
@@ -0,0 +1,94 @@
1
+ <script setup lang='ts'>
2
+ import Button from '../components/Button/Button.vue'
3
+ import Card from '../components/Card/Card.vue'
4
+ import Flex from '../components/Flex/Flex.vue'
5
+ import Grid from '../components/Grid/Grid.vue'
6
+ </script>
7
+
8
+ <template>
9
+ <div class="mb-xxl">
10
+ <h3 class="mb-l">
11
+ Cards
12
+ </h3>
13
+
14
+ <Grid :columns="2" gap="xl">
15
+ <Flex column gap="xl">
16
+ <div>
17
+ <strong class="block mb-s">Base</strong>
18
+ <Card>
19
+ <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Adipisci eligendi quos inventore voluptas ab saepe fugit deleniti ipsam exercitationem impedit quod rem ipsum laborum, quis quam error ipsa corrupti. Dolorem!</p>
20
+ </Card>
21
+ </div>
22
+
23
+ <div>
24
+ <strong class="block mb-s">With header</strong>
25
+ <Card>
26
+ <template #header>
27
+ <h4>Hello</h4>
28
+ </template>
29
+ <template #header-end>
30
+ <Button icon="ph:x" plain size="s" />
31
+ </template>
32
+ <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Adipisci eligendi quos inventore voluptas ab saepe fugit deleniti ipsam exercitationem impedit quod rem ipsum laborum, quis quam error ipsa corrupti. Dolorem!</p>
33
+ </Card>
34
+ </div>
35
+
36
+ <div>
37
+ <strong class="block mb-s">With footer</strong>
38
+ <Card>
39
+ <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Adipisci eligendi quos inventore voluptas ab saepe fugit deleniti ipsam exercitationem impedit quod rem ipsum laborum, quis quam error ipsa corrupti. Dolorem!</p>
40
+
41
+ <template #footer>
42
+ <Flex gap="s" justify-end>
43
+ <Button>Cancel</Button>
44
+ <Button variant="success">
45
+ Save
46
+ </Button>
47
+ </Flex>
48
+ </template>
49
+ </Card>
50
+ </div>
51
+ </Flex>
52
+ <Flex column gap="xl">
53
+ <div>
54
+ <strong class="block mb-s">With header + separators (each separator can be individually disabled)</strong>
55
+ <Card separators>
56
+ <template #header>
57
+ <h4>Hello</h4>
58
+ </template>
59
+ <template #header-end>
60
+ <Button icon="ph:x" plain size="s" />
61
+ </template>
62
+ <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Adipisci eligendi quos inventore voluptas ab saepe fugit deleniti ipsam exercitationem impedit quod rem ipsum laborum, quis quam error ipsa corrupti. Dolorem!</p>
63
+ <template #footer>
64
+ <Flex gap="s" justify-start>
65
+ <Button variant="success">
66
+ Save
67
+ </Button>
68
+ <Button>Cancel</Button>
69
+ </Flex>
70
+ </template>
71
+ </Card>
72
+ </div>
73
+
74
+ <Card :header-separator="false" footer-separator>
75
+ <template #header>
76
+ <h4>Hello</h4>
77
+ </template>
78
+ <template #header-end>
79
+ <Button icon="ph:x" plain size="s" />
80
+ </template>
81
+ <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Adipisci eligendi quos inventore voluptas ab saepe fugit deleniti ipsam exercitationem impedit quod rem ipsum laborum, quis quam error ipsa corrupti. Dolorem!</p>
82
+ <template #footer>
83
+ <Flex gap="s" justify-end>
84
+ <Button>Cancel</Button>
85
+ <Button variant="success">
86
+ Save
87
+ </Button>
88
+ </Flex>
89
+ </template>
90
+ </Card>
91
+ </Flex>
92
+ </Grid>
93
+ </div>
94
+ </template>