@dolanske/vui 1.0.1 → 1.0.3

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 (194) hide show
  1. package/LICENSE +673 -673
  2. package/README.md +42 -42
  3. package/dist/components/Accordion/Accordion.vue.d.ts +2 -3
  4. package/dist/components/Accordion/AccordionGroup.vue.d.ts +2 -5
  5. package/dist/components/Alert/Alert.vue.d.ts +2 -3
  6. package/dist/components/Avatar/Avatar.vue.d.ts +2 -3
  7. package/dist/components/Badge/Badge.vue.d.ts +2 -3
  8. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +2 -3
  9. package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +2 -3
  10. package/dist/components/Button/Button.vue.d.ts +2 -3
  11. package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +2 -3
  12. package/dist/components/Calendar/Calendar.vue.d.ts +6 -6
  13. package/dist/components/Card/Card.vue.d.ts +3 -4
  14. package/dist/components/Checkbox/Checkbox.vue.d.ts +6 -7
  15. package/dist/components/CopyClipboard/CopyClipboard.vue.d.ts +1 -2
  16. package/dist/components/Divider/Divider.vue.d.ts +2 -3
  17. package/dist/components/Drawer/Drawer.vue.d.ts +5 -6
  18. package/dist/components/Dropdown/Dropdown.vue.d.ts +3 -66
  19. package/dist/components/Dropdown/DropdownItem.vue.d.ts +2 -3
  20. package/dist/components/Dropdown/DropdownTitle.vue.d.ts +6 -6
  21. package/dist/components/Flex/Flex.vue.d.ts +2 -3
  22. package/dist/components/Grid/Grid.vue.d.ts +2 -3
  23. package/dist/components/Input/Color.vue.d.ts +5 -5
  24. package/dist/components/Input/Counter.vue.d.ts +5 -5
  25. package/dist/components/Input/Dropzone.vue.d.ts +10 -95
  26. package/dist/components/Input/File.vue.d.ts +3 -4
  27. package/dist/components/Input/Input.vue.d.ts +6 -7
  28. package/dist/components/Input/Password.vue.d.ts +1 -1
  29. package/dist/components/Input/Textarea.vue.d.ts +6 -7
  30. package/dist/components/Kbd/Kbd.vue.d.ts +1 -1
  31. package/dist/components/Kbd/KbdGroup.vue.d.ts +1 -2
  32. package/dist/components/Modal/Confirm.vue.d.ts +5 -6
  33. package/dist/components/Modal/Modal.vue.d.ts +5 -6
  34. package/dist/components/OTP/OTP.vue.d.ts +6 -7
  35. package/dist/components/OTP/OTPItem.vue.d.ts +1 -1
  36. package/dist/components/Pagination/Pagination.vue.d.ts +2 -3
  37. package/dist/components/Popout/Popout.vue.d.ts +2 -3
  38. package/dist/components/Progress/Progress.vue.d.ts +5 -5
  39. package/dist/components/Radio/Radio.vue.d.ts +6 -7
  40. package/dist/components/Radio/RadioGroup.vue.d.ts +6 -7
  41. package/dist/components/Select/Select.vue.d.ts +8 -4
  42. package/dist/components/Sheet/Sheet.vue.d.ts +5 -6
  43. package/dist/components/Sidebar/Sidebar.vue.d.ts +6 -7
  44. package/dist/components/Skeleton/Skeleton.vue.d.ts +1 -1
  45. package/dist/components/Spinner/Spinner.vue.d.ts +1 -1
  46. package/dist/components/Switch/Switch.vue.d.ts +6 -7
  47. package/dist/components/Table/Cell.vue.d.ts +2 -5
  48. package/dist/components/Table/Head.vue.d.ts +2 -3
  49. package/dist/components/Table/Root.vue.d.ts +2 -3
  50. package/dist/components/Table/table.d.ts +2 -2
  51. package/dist/components/Tabs/Tab.vue.d.ts +2 -3
  52. package/dist/components/Tabs/Tabs.vue.d.ts +6 -7
  53. package/dist/components/Toast/toast.d.ts +6 -6
  54. package/dist/components/Tooltip/Tooltip.vue.d.ts +1 -2
  55. package/dist/internal/Backdrop/Backdrop.vue.d.ts +2 -3
  56. package/dist/{vui.css → style.css} +1 -1
  57. package/dist/vui.js +5318 -5449
  58. package/package.json +72 -72
  59. package/src/App.vue +95 -95
  60. package/src/components/Accordion/Accordion.vue +91 -91
  61. package/src/components/Accordion/AccordionGroup.vue +43 -43
  62. package/src/components/Accordion/accordion.scss +82 -82
  63. package/src/components/Alert/Alert.vue +59 -59
  64. package/src/components/Alert/alert.scss +161 -161
  65. package/src/components/Avatar/Avatar.vue +53 -53
  66. package/src/components/Avatar/avatar.scss +52 -52
  67. package/src/components/Badge/Badge.vue +21 -21
  68. package/src/components/Badge/badge.scss +206 -206
  69. package/src/components/Breadcrumbs/BreadcrumbItem.vue +26 -26
  70. package/src/components/Breadcrumbs/Breadcrumbs.vue +30 -32
  71. package/src/components/Breadcrumbs/breadcrumbs.scss +31 -31
  72. package/src/components/Button/Button.vue +85 -85
  73. package/src/components/Button/button.scss +279 -279
  74. package/src/components/ButtonGroup/ButtonGroup.vue +28 -28
  75. package/src/components/ButtonGroup/button-group.scss +51 -51
  76. package/src/components/Calendar/Calendar.vue +66 -66
  77. package/src/components/Calendar/calendar.scss +83 -83
  78. package/src/components/Card/Card.vue +48 -48
  79. package/src/components/Card/card.scss +53 -53
  80. package/src/components/Checkbox/Checkbox.vue +54 -54
  81. package/src/components/Checkbox/checkbox.scss +80 -80
  82. package/src/components/CopyClipboard/CopyClipboard.vue +91 -91
  83. package/src/components/CopyClipboard/copy-clipboard.scss +25 -25
  84. package/src/components/Divider/Divider.vue +44 -44
  85. package/src/components/Divider/divider.scss +35 -35
  86. package/src/components/Drawer/Drawer.vue +97 -97
  87. package/src/components/Drawer/drawer.scss +37 -37
  88. package/src/components/Dropdown/Dropdown.vue +135 -135
  89. package/src/components/Dropdown/DropdownItem.vue +33 -33
  90. package/src/components/Dropdown/DropdownTitle.vue +14 -14
  91. package/src/components/Dropdown/dropdown-item.scss +84 -84
  92. package/src/components/Dropdown/dropdown.scss +53 -53
  93. package/src/components/Flex/Flex.vue +113 -113
  94. package/src/components/Grid/Grid.vue +80 -80
  95. package/src/components/Input/Color.vue +26 -26
  96. package/src/components/Input/Counter.vue +66 -66
  97. package/src/components/Input/Dropzone.vue +65 -65
  98. package/src/components/Input/File.vue +15 -15
  99. package/src/components/Input/Input.vue +123 -123
  100. package/src/components/Input/Password.vue +35 -35
  101. package/src/components/Input/Textarea.vue +78 -78
  102. package/src/components/Input/input.scss +302 -302
  103. package/src/components/Kbd/Kbd.vue +48 -48
  104. package/src/components/Kbd/KbdGroup.vue +27 -27
  105. package/src/components/Kbd/kbd.scss +19 -19
  106. package/src/components/Modal/Confirm.vue +56 -56
  107. package/src/components/Modal/Modal.vue +99 -99
  108. package/src/components/Modal/modal.scss +54 -54
  109. package/src/components/OTP/OTP.vue +133 -133
  110. package/src/components/OTP/OTPItem.vue +37 -37
  111. package/src/components/OTP/otp.scss +84 -84
  112. package/src/components/Pagination/Pagination.vue +77 -77
  113. package/src/components/Pagination/pagination.ts +78 -78
  114. package/src/components/Popout/Popout.vue +52 -52
  115. package/src/components/Popout/popout.scss +15 -15
  116. package/src/components/Progress/Progress.vue +103 -103
  117. package/src/components/Progress/progress.scss +47 -47
  118. package/src/components/Radio/Radio.vue +38 -38
  119. package/src/components/Radio/RadioGroup.vue +40 -40
  120. package/src/components/Radio/radio.scss +78 -78
  121. package/src/components/Select/Select.vue +211 -211
  122. package/src/components/Select/select.scss +77 -77
  123. package/src/components/Sheet/Sheet.vue +98 -98
  124. package/src/components/Sheet/sheet.scss +69 -69
  125. package/src/components/Sidebar/Sidebar.vue +115 -115
  126. package/src/components/Sidebar/sidebar.scss +124 -124
  127. package/src/components/Skeleton/Skeleton.vue +43 -43
  128. package/src/components/Skeleton/skeleton.scss +14 -14
  129. package/src/components/Spinner/Spinner.vue +42 -42
  130. package/src/components/Spinner/spinner.scss +47 -47
  131. package/src/components/Switch/Switch.vue +31 -31
  132. package/src/components/Switch/switch.scss +93 -93
  133. package/src/components/Table/Cell.vue +23 -23
  134. package/src/components/Table/Head.vue +59 -59
  135. package/src/components/Table/Root.vue +66 -66
  136. package/src/components/Table/SelectAll.vue +23 -23
  137. package/src/components/Table/SelectRow.vue +30 -30
  138. package/src/components/Table/index.ts +7 -7
  139. package/src/components/Table/table.scss +154 -154
  140. package/src/components/Table/table.ts +248 -248
  141. package/src/components/Tabs/Tab.vue +25 -25
  142. package/src/components/Tabs/Tabs.vue +89 -89
  143. package/src/components/Tabs/tabs.scss +87 -87
  144. package/src/components/Toast/Toasts.vue +52 -52
  145. package/src/components/Toast/toast.scss +45 -45
  146. package/src/components/Toast/toast.ts +75 -75
  147. package/src/components/Tooltip/Tooltip.vue +86 -86
  148. package/src/components/Tooltip/tooltip.scss +8 -8
  149. package/src/examples/ExampleAccordions.vue +58 -58
  150. package/src/examples/ExampleAlerts.vue +78 -78
  151. package/src/examples/ExampleAvatars.vue +44 -44
  152. package/src/examples/ExampleBadges.vue +48 -48
  153. package/src/examples/ExampleBreadcrumbs.vue +46 -46
  154. package/src/examples/ExampleButtons.vue +140 -140
  155. package/src/examples/ExampleCalendars.vue +40 -40
  156. package/src/examples/ExampleCards.vue +94 -94
  157. package/src/examples/ExampleCheckboxes.vue +123 -123
  158. package/src/examples/ExampleCopyClipboard.vue +47 -47
  159. package/src/examples/ExampleDividers.vue +39 -39
  160. package/src/examples/ExampleDrawers.vue +67 -67
  161. package/src/examples/ExampleDropdowns.vue +114 -114
  162. package/src/examples/ExampleFlexGrid.vue +122 -122
  163. package/src/examples/ExampleInputs.vue +234 -234
  164. package/src/examples/ExampleKBD.vue +65 -65
  165. package/src/examples/ExampleModals.vue +143 -143
  166. package/src/examples/ExamplePalette.vue +159 -159
  167. package/src/examples/ExamplePopouts.vue +41 -41
  168. package/src/examples/ExampleSheets.vue +77 -77
  169. package/src/examples/ExampleSidebars.vue +270 -270
  170. package/src/examples/ExampleSkeletons.vue +26 -26
  171. package/src/examples/ExampleSpinners.vue +78 -78
  172. package/src/examples/ExampleTables.vue +195 -195
  173. package/src/examples/ExampleTabs.vue +119 -119
  174. package/src/examples/ExampleToasts.vue +96 -96
  175. package/src/examples/ExampleTooltips.vue +70 -70
  176. package/src/examples/shared/ExampleColor.vue +28 -28
  177. package/src/index.scss +1 -1
  178. package/src/index.ts +116 -116
  179. package/src/internal/Backdrop/Backdrop.vue +22 -22
  180. package/src/internal/Backdrop/backdrop.scss +34 -34
  181. package/src/main.ts +5 -5
  182. package/src/shared/helpers.ts +117 -117
  183. package/src/shared/theme.ts +22 -22
  184. package/src/shared/types.ts +29 -29
  185. package/src/style/animation.scss +22 -22
  186. package/src/style/core.scss +125 -125
  187. package/src/style/layout.scss +233 -233
  188. package/src/style/media-query.scss +29 -29
  189. package/src/style/reset.scss +135 -135
  190. package/src/style/text.scss +124 -92
  191. package/src/style/theme.scss +195 -195
  192. package/src/style/tooltip.scss +146 -146
  193. package/src/style/typography.scss +415 -415
  194. package/src/style/utils.scss +36 -36
@@ -1,143 +1,143 @@
1
- <script setup lang='ts'>
2
- import type { Sizes } from '../shared/types'
3
- import { ref } from 'vue'
4
- import Button from '../components/Button/Button.vue'
5
- import Flex from '../components/Flex/Flex.vue'
6
- import Modal from '../components/Modal/Modal.vue'
7
-
8
- const open = ref(false)
9
- const open2 = ref(false)
10
- const open3 = ref(false)
11
- const open4 = ref(false)
12
- const open5 = ref(false)
13
-
14
- const size = ref<Sizes | 'full'>('s')
15
- function setSize(s: any) {
16
- size.value = s
17
- open2.value = true
18
- }
19
- </script>
20
-
21
- <template>
22
- <div class="mb-xxl">
23
- <h3 class="mb-l">
24
- Modals
25
- </h3>
26
-
27
- <table>
28
- <tbody>
29
- <tr>
30
- <th>Base</th>
31
- <td>
32
- <Button @click="open = !open">
33
- Open
34
- </Button>
35
- <Modal v-model="open">
36
- <template #header>
37
- <h4>Modal </h4>
38
- </template>
39
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ad harum id, distinctio voluptatum repellat eveniet repellendus saepe velit rem illo facere aspernatur iste nam, quasi dolores expedita consectetur enim autem?</p>
40
- <template #footer="{ close }">
41
- <Button @click="close">
42
- Close
43
- </Button>
44
- </template>
45
- </Modal>
46
- </td>
47
- </tr>
48
- <tr>
49
- <th>Sizes</th>
50
- <td>
51
- <Flex>
52
- <Button square @click="setSize('s')">
53
- S
54
- </Button>
55
- <Button square @click="setSize('l')">
56
- L
57
- </Button>
58
- <Button square @click="setSize('full')">
59
- Full
60
- </Button>
61
- </Flex>
62
- <Modal v-model="open2" :size>
63
- <template #header>
64
- <h4>Modal </h4>
65
- </template>
66
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ad harum id, distinctio voluptatum repellat eveniet repellendus saepe velit rem illo facere aspernatur iste nam, quasi dolores expedita consectetur enim autem?</p>
67
- <template #footer="{ close }">
68
- <Button @click="close">
69
- Close
70
- </Button>
71
- </template>
72
- </Modal>
73
- </td>
74
- </tr>
75
- <tr>
76
- <th>Centered + separators + can't dismiss</th>
77
- <td>
78
- <Button @click="open3 = !open3">
79
- Open
80
- </Button>
81
- <Modal v-model="open3" centered :card="{ separators: true }" :can-dismiss="false">
82
- <template #header>
83
- <h4>What is this?</h4>
84
- </template>
85
- <p>Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop.</p>
86
- <template #footer="{ close }">
87
- <Button @click="close">
88
- Close
89
- </Button>
90
- </template>
91
- </Modal>
92
- </td>
93
- </tr>
94
- <tr>
95
- <th>
96
- Scrollable
97
- </th>
98
- <td>
99
- <Button @click="open4 = !open4">
100
- Open
101
- </Button>
102
- <Modal v-model="open4" :card="{ separators: true }" scrollable>
103
- <template #header>
104
- <h4>What is this?</h4>
105
- </template>
106
- <p class="text-xxxxl">
107
- Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas nisi eos dolores ipsa perspiciatis ullam voluptates quos. Recusandae quod atque, laudantium quis, ad quaerat cumque vero quibusdam facilis, blanditiis eius.
108
- </p>
109
- <template #footer="{ close }">
110
- <Button @click="close">
111
- Close
112
- </Button>
113
- </template>
114
- </Modal>
115
- </td>
116
- </tr>
117
- <tr>
118
- <th>
119
- Fullscreen
120
- </th>
121
- <td>
122
- <Button @click="open5 = !open5">
123
- Open
124
- </Button>
125
- <Modal v-model="open5" size="screen" :card="{ separators: true }" scrollable>
126
- <template #header>
127
- <h4>What is this?</h4>
128
- </template>
129
- <p class="text-xxxxl">
130
- Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas nisi eos dolores ipsa perspiciatis ullam voluptates quos. Recusandae quod atque, laudantium quis, ad quaerat cumque vero quibusdam facilis, blanditiis eius. Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis sed, impedit officia ad earum optio molestiae nihil mollitia quas enim neque repudiandae minus? Odio fugit voluptates enim et iste odit? Lorem, ipsum dolor sit amet consectetur adipisicing elit. In mollitia harum consectetur ad soluta laudantium? In earum animi harum impedit modi dolores, quod ex, ipsa ipsum est perferendis laudantium aut? Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat, cupiditate autem aut nisi quas voluptatem dolorem, eaque odit voluptates laboriosam consequuntur dolore alias a provident corporis nemo. Blanditiis, vel! Maiores!
131
- </p>
132
- <template #footer="{ close }">
133
- <Button @click="close">
134
- Close
135
- </Button>
136
- </template>
137
- </Modal>
138
- </td>
139
- </tr>
140
- </tbody>
141
- </table>
142
- </div>
143
- </template>
1
+ <script setup lang='ts'>
2
+ import type { Sizes } from '../shared/types'
3
+ import { ref } from 'vue'
4
+ import Button from '../components/Button/Button.vue'
5
+ import Flex from '../components/Flex/Flex.vue'
6
+ import Modal from '../components/Modal/Modal.vue'
7
+
8
+ const open = ref(false)
9
+ const open2 = ref(false)
10
+ const open3 = ref(false)
11
+ const open4 = ref(false)
12
+ const open5 = ref(false)
13
+
14
+ const size = ref<Sizes | 'full'>('s')
15
+ function setSize(s: any) {
16
+ size.value = s
17
+ open2.value = true
18
+ }
19
+ </script>
20
+
21
+ <template>
22
+ <div class="mb-xxl">
23
+ <h3 class="mb-l">
24
+ Modals
25
+ </h3>
26
+
27
+ <table>
28
+ <tbody>
29
+ <tr>
30
+ <th>Base</th>
31
+ <td>
32
+ <Button @click="open = !open">
33
+ Open
34
+ </Button>
35
+ <Modal v-model="open">
36
+ <template #header>
37
+ <h4>Modal </h4>
38
+ </template>
39
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ad harum id, distinctio voluptatum repellat eveniet repellendus saepe velit rem illo facere aspernatur iste nam, quasi dolores expedita consectetur enim autem?</p>
40
+ <template #footer="{ close }">
41
+ <Button @click="close">
42
+ Close
43
+ </Button>
44
+ </template>
45
+ </Modal>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <th>Sizes</th>
50
+ <td>
51
+ <Flex>
52
+ <Button square @click="setSize('s')">
53
+ S
54
+ </Button>
55
+ <Button square @click="setSize('l')">
56
+ L
57
+ </Button>
58
+ <Button square @click="setSize('full')">
59
+ Full
60
+ </Button>
61
+ </Flex>
62
+ <Modal v-model="open2" :size>
63
+ <template #header>
64
+ <h4>Modal </h4>
65
+ </template>
66
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ad harum id, distinctio voluptatum repellat eveniet repellendus saepe velit rem illo facere aspernatur iste nam, quasi dolores expedita consectetur enim autem?</p>
67
+ <template #footer="{ close }">
68
+ <Button @click="close">
69
+ Close
70
+ </Button>
71
+ </template>
72
+ </Modal>
73
+ </td>
74
+ </tr>
75
+ <tr>
76
+ <th>Centered + separators + can't dismiss</th>
77
+ <td>
78
+ <Button @click="open3 = !open3">
79
+ Open
80
+ </Button>
81
+ <Modal v-model="open3" centered :card="{ separators: true }" :can-dismiss="false">
82
+ <template #header>
83
+ <h4>What is this?</h4>
84
+ </template>
85
+ <p>Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop.</p>
86
+ <template #footer="{ close }">
87
+ <Button @click="close">
88
+ Close
89
+ </Button>
90
+ </template>
91
+ </Modal>
92
+ </td>
93
+ </tr>
94
+ <tr>
95
+ <th>
96
+ Scrollable
97
+ </th>
98
+ <td>
99
+ <Button @click="open4 = !open4">
100
+ Open
101
+ </Button>
102
+ <Modal v-model="open4" :card="{ separators: true }" scrollable>
103
+ <template #header>
104
+ <h4>What is this?</h4>
105
+ </template>
106
+ <p class="text-xxxxl">
107
+ Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas nisi eos dolores ipsa perspiciatis ullam voluptates quos. Recusandae quod atque, laudantium quis, ad quaerat cumque vero quibusdam facilis, blanditiis eius.
108
+ </p>
109
+ <template #footer="{ close }">
110
+ <Button @click="close">
111
+ Close
112
+ </Button>
113
+ </template>
114
+ </Modal>
115
+ </td>
116
+ </tr>
117
+ <tr>
118
+ <th>
119
+ Fullscreen
120
+ </th>
121
+ <td>
122
+ <Button @click="open5 = !open5">
123
+ Open
124
+ </Button>
125
+ <Modal v-model="open5" size="screen" :card="{ separators: true }" scrollable>
126
+ <template #header>
127
+ <h4>What is this?</h4>
128
+ </template>
129
+ <p class="text-xxxxl">
130
+ Non dismissable modal means that it can only be closed via a provided button. Like a confirmation etc. No chance of closing it by clicking the x buttton, pressing escape or clicking the backdrop. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas nisi eos dolores ipsa perspiciatis ullam voluptates quos. Recusandae quod atque, laudantium quis, ad quaerat cumque vero quibusdam facilis, blanditiis eius. Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis sed, impedit officia ad earum optio molestiae nihil mollitia quas enim neque repudiandae minus? Odio fugit voluptates enim et iste odit? Lorem, ipsum dolor sit amet consectetur adipisicing elit. In mollitia harum consectetur ad soluta laudantium? In earum animi harum impedit modi dolores, quod ex, ipsa ipsum est perferendis laudantium aut? Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat, cupiditate autem aut nisi quas voluptatem dolorem, eaque odit voluptates laboriosam consequuntur dolore alias a provident corporis nemo. Blanditiis, vel! Maiores!
131
+ </p>
132
+ <template #footer="{ close }">
133
+ <Button @click="close">
134
+ Close
135
+ </Button>
136
+ </template>
137
+ </Modal>
138
+ </td>
139
+ </tr>
140
+ </tbody>
141
+ </table>
142
+ </div>
143
+ </template>
@@ -1,159 +1,159 @@
1
- <script setup lang='ts'>
2
- import { Icon } from '@iconify/vue'
3
- import Button from '../components/Button/Button.vue'
4
- import Flex from '../components/Flex/Flex.vue'
5
- import Grid from '../components/Grid/Grid.vue'
6
- import { setColorTheme, theme } from '../shared/theme'
7
- import ExampleColor from './shared/ExampleColor.vue'
8
-
9
- // function getPalette(type: 'light' | 'dark') {
10
- // return Array.from(document.styleSheets)
11
- // .flatMap((styleSheet: CSSStyleSheet) => Array.from(styleSheet.cssRules))
12
- // .filter(
13
- // (cssRule: CSSRule): cssRule is CSSStyleRule =>
14
- // cssRule instanceof CSSStyleRule && cssRule.selectorText === `:root`,
15
- // )
16
- // .flatMap((cssRule: CSSStyleRule) => Array.from(cssRule.style))
17
- // .filter((style: string) => style.startsWith(`--${type}`))
18
- // }
19
-
20
- // const light = getPalette('light')
21
- // const dark = getPalette('dark')
22
- </script>
23
-
24
- <template>
25
- <div>
26
- <h3 class="mb-l">
27
- Themes
28
- </h3>
29
-
30
- <Grid :columns="2">
31
- <Flex class="theme-wrap light" column gap="xxs">
32
- <Flex space-between class="mb-l" align-center expand>
33
- <h5>Light</h5>
34
- <Button :disabled="theme === 'light'" variant="gray" data-title-top="Switch theme" @click="setColorTheme('light')">
35
- <template #start>
36
- <Icon icon="ph:sun" />
37
- </template>
38
- Use
39
- </Button>
40
- </Flex>
41
- <ExampleColor name="Bg" color="--light-color-bg" />
42
- <ExampleColor name="Bg Medium" color="--light-color-bg-medium" />
43
- <ExampleColor name="Bg Raised" color="--light-color-bg-raised" />
44
- <ExampleColor name="Bg Lowered" color="--light-color-bg-lowered" />
45
- <div class="padder" />
46
- <ExampleColor name="Text" color="--light-color-text" />
47
- <ExampleColor name="Text Light" color="--light-color-text-light" />
48
- <ExampleColor name="Text Lighter" color="--light-color-text-lighter" />
49
- <ExampleColor name="Text Lightest" color="--light-color-text-lightest" />
50
- <ExampleColor name="Text Invert" color="--light-color-text-invert" />
51
- <div class="padder" />
52
- <ExampleColor name="Button Gray" color="--light-color-button-gray" />
53
- <ExampleColor name="Button Gray Hover" color="--light-color-button-gray-hover" />
54
- <div class="padder" />
55
- <ExampleColor name="Text Red" color="--light-color-text-red" />
56
- <ExampleColor name="Bg Red Lowered" color="--light-color-bg-red-lowered" />
57
- <ExampleColor name="Bg Red Raised" color="--light-color-bg-red-raised" />
58
- <div class="padder" />
59
- <ExampleColor name="Text Green" color="--light-color-text-green" />
60
- <ExampleColor name="Bg Green Lowered" color="--light-color-bg-green-lowered" />
61
- <ExampleColor name="Bg Green Raised" color="--light-color-bg-green-raised" />
62
- <div class="padder" />
63
- <ExampleColor name="Text Yellow" color="--light-color-text-yellow" />
64
- <ExampleColor name="Bg Yellow Lowered" color="--light-color-bg-yellow-lowered" />
65
- <ExampleColor name="Bg Yellow Raised" color="--light-color-bg-yellow-raised" />
66
- <div class="padder" />
67
- <ExampleColor name="Text Blue" color="--light-color-text-blue" />
68
- <ExampleColor name="Bg Blue Lowered" color="--light-color-bg-blue-lowered" />
69
- <ExampleColor name="Bg Blue Raised" color="--light-color-bg-blue-raised" />
70
- <div class="padder" />
71
- <ExampleColor name="Border" color="--light-color-border" />
72
- <ExampleColor name="Border Strong" color="--light-color-border-strong" />
73
- <ExampleColor name="Border Weak" color="--light-color-border-weak" />
74
- <div class="padder" />
75
- <ExampleColor name="Accent" color="--light-color-accent" />
76
- <ExampleColor name="Bg Accent Lowered" color="--light-color-bg-accent-lowered" />
77
- <ExampleColor name="Bg Accent Raised" color="--light-color-bg-accent-raised" />
78
- </Flex>
79
-
80
- <Flex class="theme-wrap dark" gap="xxs" column>
81
- <Flex space-between class="mb-l" align-center expand>
82
- <h5>Dark</h5>
83
- <Button :disabled="theme === 'dark'" variant="gray" data-title-top="Switch theme" @click="setColorTheme('dark')">
84
- <template #start>
85
- <Icon icon="ph:moon" />
86
- </template>
87
- Use
88
- </Button>
89
- </Flex>
90
- <ExampleColor name="Bg" color="--dark-color-bg" />
91
- <ExampleColor name="Bg Medium" color="--dark-color-bg-medium" />
92
- <ExampleColor name="Bg Raised" color="--dark-color-bg-raised" />
93
- <ExampleColor name="Bg Lowered" color="--dark-color-bg-lowered" />
94
- <div class="padder" />
95
- <ExampleColor name="Text" color="--dark-color-text" />
96
- <ExampleColor name="Text Light" color="--dark-color-text-light" />
97
- <ExampleColor name="Text Lighter" color="--dark-color-text-lighter" />
98
- <ExampleColor name="Text Lightest" color="--dark-color-text-lightest" />
99
- <ExampleColor name="Text Invert" color="--dark-color-text-invert" />
100
- <div class="padder" />
101
- <ExampleColor name="Button Gray" color="--dark-color-button-gray" />
102
- <ExampleColor name="Button Gray Hover" color="--dark-color-button-gray-hover" />
103
- <div class="padder" />
104
- <ExampleColor name="Text Red" color="--dark-color-text-red" />
105
- <ExampleColor name="Bg Red Lowered" color="--dark-color-bg-red-lowered" />
106
- <ExampleColor name="Bg Red Raised" color="--dark-color-bg-red-raised" />
107
- <div class="padder" />
108
- <ExampleColor name="Text Green" color="--dark-color-text-green" />
109
- <ExampleColor name="Bg Green Lowered" color="--dark-color-bg-green-lowered" />
110
- <ExampleColor name="Bg Green Raised" color="--dark-color-bg-green-raised" />
111
- <div class="padder" />
112
- <ExampleColor name="Text Yellow" color="--dark-color-text-yellow" />
113
- <ExampleColor name="Bg Yellow Lowered" color="--dark-color-bg-yellow-lowered" />
114
- <ExampleColor name="Bg Yellow Raised" color="--dark-color-bg-yellow-raised" />
115
- <div class="padder" />
116
- <ExampleColor name="Text Blue" color="--dark-color-text-blue" />
117
- <ExampleColor name="Bg Blue Lowered" color="--dark-color-bg-blue-lowered" />
118
- <ExampleColor name="Bg Blue Raised" color="--dark-color-bg-blue-raised" />
119
- <div class="padder" />
120
- <ExampleColor name="Border" color="--dark-color-border" />
121
- <ExampleColor name="Border Strong" color="--dark-color-border-strong" />
122
- <ExampleColor name="Border Weak" color="--dark-color-border-weak" />
123
- <div class="padder" />
124
- <ExampleColor name="Accent" color="--dark-color-accent" />
125
- <ExampleColor name="Bg Accent Lowered" color="--dark-color-bg-accent-lowered" />
126
- <ExampleColor name="Bg Accent Raised" color="--dark-color-bg-accent-raised" />
127
- </Flex>
128
- </Grid>
129
- </div>
130
- </template>
131
-
132
- <style>
133
- .padder {
134
- height: 16px;
135
- }
136
-
137
- .theme-wrap {
138
- padding: var(--space-m);
139
- border-radius: var(--border-radius-m);
140
-
141
- &.light {
142
- background-color: white;
143
-
144
- h5,
145
- span {
146
- color: var(--light-color-text) !important;
147
- }
148
- }
149
-
150
- &.dark {
151
- background-color: black;
152
-
153
- h5,
154
- span {
155
- color: var(--dark-color-text) !important;
156
- }
157
- }
158
- }
159
- </style>
1
+ <script setup lang='ts'>
2
+ import { Icon } from '@iconify/vue'
3
+ import Button from '../components/Button/Button.vue'
4
+ import Flex from '../components/Flex/Flex.vue'
5
+ import Grid from '../components/Grid/Grid.vue'
6
+ import { setColorTheme, theme } from '../shared/theme'
7
+ import ExampleColor from './shared/ExampleColor.vue'
8
+
9
+ // function getPalette(type: 'light' | 'dark') {
10
+ // return Array.from(document.styleSheets)
11
+ // .flatMap((styleSheet: CSSStyleSheet) => Array.from(styleSheet.cssRules))
12
+ // .filter(
13
+ // (cssRule: CSSRule): cssRule is CSSStyleRule =>
14
+ // cssRule instanceof CSSStyleRule && cssRule.selectorText === `:root`,
15
+ // )
16
+ // .flatMap((cssRule: CSSStyleRule) => Array.from(cssRule.style))
17
+ // .filter((style: string) => style.startsWith(`--${type}`))
18
+ // }
19
+
20
+ // const light = getPalette('light')
21
+ // const dark = getPalette('dark')
22
+ </script>
23
+
24
+ <template>
25
+ <div>
26
+ <h3 class="mb-l">
27
+ Themes
28
+ </h3>
29
+
30
+ <Grid :columns="2">
31
+ <Flex class="theme-wrap light" column gap="xxs">
32
+ <Flex space-between class="mb-l" align-center expand>
33
+ <h5>Light</h5>
34
+ <Button :disabled="theme === 'light'" variant="gray" data-title-top="Switch theme" @click="setColorTheme('light')">
35
+ <template #start>
36
+ <Icon icon="ph:sun" />
37
+ </template>
38
+ Use
39
+ </Button>
40
+ </Flex>
41
+ <ExampleColor name="Bg" color="--light-color-bg" />
42
+ <ExampleColor name="Bg Medium" color="--light-color-bg-medium" />
43
+ <ExampleColor name="Bg Raised" color="--light-color-bg-raised" />
44
+ <ExampleColor name="Bg Lowered" color="--light-color-bg-lowered" />
45
+ <div class="padder" />
46
+ <ExampleColor name="Text" color="--light-color-text" />
47
+ <ExampleColor name="Text Light" color="--light-color-text-light" />
48
+ <ExampleColor name="Text Lighter" color="--light-color-text-lighter" />
49
+ <ExampleColor name="Text Lightest" color="--light-color-text-lightest" />
50
+ <ExampleColor name="Text Invert" color="--light-color-text-invert" />
51
+ <div class="padder" />
52
+ <ExampleColor name="Button Gray" color="--light-color-button-gray" />
53
+ <ExampleColor name="Button Gray Hover" color="--light-color-button-gray-hover" />
54
+ <div class="padder" />
55
+ <ExampleColor name="Text Red" color="--light-color-text-red" />
56
+ <ExampleColor name="Bg Red Lowered" color="--light-color-bg-red-lowered" />
57
+ <ExampleColor name="Bg Red Raised" color="--light-color-bg-red-raised" />
58
+ <div class="padder" />
59
+ <ExampleColor name="Text Green" color="--light-color-text-green" />
60
+ <ExampleColor name="Bg Green Lowered" color="--light-color-bg-green-lowered" />
61
+ <ExampleColor name="Bg Green Raised" color="--light-color-bg-green-raised" />
62
+ <div class="padder" />
63
+ <ExampleColor name="Text Yellow" color="--light-color-text-yellow" />
64
+ <ExampleColor name="Bg Yellow Lowered" color="--light-color-bg-yellow-lowered" />
65
+ <ExampleColor name="Bg Yellow Raised" color="--light-color-bg-yellow-raised" />
66
+ <div class="padder" />
67
+ <ExampleColor name="Text Blue" color="--light-color-text-blue" />
68
+ <ExampleColor name="Bg Blue Lowered" color="--light-color-bg-blue-lowered" />
69
+ <ExampleColor name="Bg Blue Raised" color="--light-color-bg-blue-raised" />
70
+ <div class="padder" />
71
+ <ExampleColor name="Border" color="--light-color-border" />
72
+ <ExampleColor name="Border Strong" color="--light-color-border-strong" />
73
+ <ExampleColor name="Border Weak" color="--light-color-border-weak" />
74
+ <div class="padder" />
75
+ <ExampleColor name="Accent" color="--light-color-accent" />
76
+ <ExampleColor name="Bg Accent Lowered" color="--light-color-bg-accent-lowered" />
77
+ <ExampleColor name="Bg Accent Raised" color="--light-color-bg-accent-raised" />
78
+ </Flex>
79
+
80
+ <Flex class="theme-wrap dark" gap="xxs" column>
81
+ <Flex space-between class="mb-l" align-center expand>
82
+ <h5>Dark</h5>
83
+ <Button :disabled="theme === 'dark'" variant="gray" data-title-top="Switch theme" @click="setColorTheme('dark')">
84
+ <template #start>
85
+ <Icon icon="ph:moon" />
86
+ </template>
87
+ Use
88
+ </Button>
89
+ </Flex>
90
+ <ExampleColor name="Bg" color="--dark-color-bg" />
91
+ <ExampleColor name="Bg Medium" color="--dark-color-bg-medium" />
92
+ <ExampleColor name="Bg Raised" color="--dark-color-bg-raised" />
93
+ <ExampleColor name="Bg Lowered" color="--dark-color-bg-lowered" />
94
+ <div class="padder" />
95
+ <ExampleColor name="Text" color="--dark-color-text" />
96
+ <ExampleColor name="Text Light" color="--dark-color-text-light" />
97
+ <ExampleColor name="Text Lighter" color="--dark-color-text-lighter" />
98
+ <ExampleColor name="Text Lightest" color="--dark-color-text-lightest" />
99
+ <ExampleColor name="Text Invert" color="--dark-color-text-invert" />
100
+ <div class="padder" />
101
+ <ExampleColor name="Button Gray" color="--dark-color-button-gray" />
102
+ <ExampleColor name="Button Gray Hover" color="--dark-color-button-gray-hover" />
103
+ <div class="padder" />
104
+ <ExampleColor name="Text Red" color="--dark-color-text-red" />
105
+ <ExampleColor name="Bg Red Lowered" color="--dark-color-bg-red-lowered" />
106
+ <ExampleColor name="Bg Red Raised" color="--dark-color-bg-red-raised" />
107
+ <div class="padder" />
108
+ <ExampleColor name="Text Green" color="--dark-color-text-green" />
109
+ <ExampleColor name="Bg Green Lowered" color="--dark-color-bg-green-lowered" />
110
+ <ExampleColor name="Bg Green Raised" color="--dark-color-bg-green-raised" />
111
+ <div class="padder" />
112
+ <ExampleColor name="Text Yellow" color="--dark-color-text-yellow" />
113
+ <ExampleColor name="Bg Yellow Lowered" color="--dark-color-bg-yellow-lowered" />
114
+ <ExampleColor name="Bg Yellow Raised" color="--dark-color-bg-yellow-raised" />
115
+ <div class="padder" />
116
+ <ExampleColor name="Text Blue" color="--dark-color-text-blue" />
117
+ <ExampleColor name="Bg Blue Lowered" color="--dark-color-bg-blue-lowered" />
118
+ <ExampleColor name="Bg Blue Raised" color="--dark-color-bg-blue-raised" />
119
+ <div class="padder" />
120
+ <ExampleColor name="Border" color="--dark-color-border" />
121
+ <ExampleColor name="Border Strong" color="--dark-color-border-strong" />
122
+ <ExampleColor name="Border Weak" color="--dark-color-border-weak" />
123
+ <div class="padder" />
124
+ <ExampleColor name="Accent" color="--dark-color-accent" />
125
+ <ExampleColor name="Bg Accent Lowered" color="--dark-color-bg-accent-lowered" />
126
+ <ExampleColor name="Bg Accent Raised" color="--dark-color-bg-accent-raised" />
127
+ </Flex>
128
+ </Grid>
129
+ </div>
130
+ </template>
131
+
132
+ <style>
133
+ .padder {
134
+ height: 16px;
135
+ }
136
+
137
+ .theme-wrap {
138
+ padding: var(--space-m);
139
+ border-radius: var(--border-radius-m);
140
+
141
+ &.light {
142
+ background-color: white;
143
+
144
+ h5,
145
+ span {
146
+ color: var(--light-color-text) !important;
147
+ }
148
+ }
149
+
150
+ &.dark {
151
+ background-color: black;
152
+
153
+ h5,
154
+ span {
155
+ color: var(--dark-color-text) !important;
156
+ }
157
+ }
158
+ }
159
+ </style>