@onereach/ui-components 2.62.3-beta.1902.0 → 2.62.3-beta.1904.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 (250) hide show
  1. package/dist/v2/OrCardCollection-89a315ed.js +227 -0
  2. package/dist/v2/{OrConfirm-f3aed6d3.js → OrConfirm-3896bd11.js} +1 -1
  3. package/dist/v2/{OrIconButton-94c69467.js → OrIconButton-1b34f3fa.js} +1 -1
  4. package/dist/v2/{OrInlineInput-50da2b1f.js → OrInlineInput-c1d6fb73.js} +6 -6
  5. package/dist/v2/{OrInlineTextarea-94253b64.js → OrInlineTextarea-7ec4c40d.js} +6 -6
  6. package/dist/v2/{OrInput-040147f3.js → OrInput-0508c3fb.js} +6 -6
  7. package/dist/v2/{OrModal-e4439825.js → OrModal-1ed53441.js} +1 -1
  8. package/dist/v2/{OrNotification-be6132e6.js → OrNotification-e2d510b3.js} +1 -1
  9. package/dist/v2/{OrSearch-375ad422.js → OrSearch-feca9f48.js} +1 -1
  10. package/dist/v2/{OrSelect-846e9a87.js → OrSelect-bb539517.js} +4 -4
  11. package/dist/v2/OrSortHeader-a6004b24.js +133 -0
  12. package/dist/v2/{OrTag-02320f5f.js → OrTag-c42c3f9c.js} +1 -1
  13. package/dist/v2/{OrTextarea-8773d494.js → OrTextarea-cc70afc9.js} +5 -5
  14. package/dist/v2/{OrTooltip-afe7030b.js → OrTooltip-caeac590.js} +3 -33
  15. package/dist/v2/components/index.d.ts +2 -0
  16. package/dist/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +17 -0
  17. package/dist/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +98 -0
  18. package/dist/v2/components/or-card-collection-v3/index.d.ts +3 -0
  19. package/dist/v2/components/or-card-collection-v3/props.d.ts +4 -0
  20. package/dist/v2/components/or-card-collection-v3/styles.d.ts +6 -0
  21. package/dist/v2/components/or-card-collection-v3/types.d.ts +7 -0
  22. package/dist/v2/components/or-sort-header-v3/OrSortHeader.stories3.d.ts +12 -0
  23. package/dist/v2/components/or-sort-header-v3/OrSortHeader.vue.d.ts +57 -0
  24. package/dist/v2/components/or-sort-header-v3/index.d.ts +2 -0
  25. package/dist/v2/components/or-sort-header-v3/styles.d.ts +1 -0
  26. package/dist/v2/components/or-sort-header-v3/types.d.ts +4 -0
  27. package/dist/v2/components/or-tooltip-v3/styles.d.ts +0 -2
  28. package/dist/v2/index.js +15 -13
  29. package/dist/v2/index11.js +20 -1
  30. package/dist/v2/index12.js +3 -12
  31. package/dist/v2/index13.js +3 -2
  32. package/dist/v2/index14.js +11 -5
  33. package/dist/v2/index15.js +5 -14
  34. package/dist/v2/index16.js +4 -19
  35. package/dist/v2/index17.js +28 -4
  36. package/dist/v2/index18.js +3 -7
  37. package/dist/v2/index19.js +5 -23
  38. package/dist/v2/index2.js +15 -13
  39. package/dist/v2/index20.js +25 -21
  40. package/dist/v2/index21.js +21 -18
  41. package/dist/v2/index22.js +20 -2
  42. package/dist/v2/index23.js +2 -4
  43. package/dist/v2/index24.js +2 -1
  44. package/dist/v2/index25.js +1 -2
  45. package/dist/v2/index26.js +2 -2
  46. package/dist/v2/index27.js +4 -7
  47. package/dist/v2/index28.js +6 -2
  48. package/dist/v2/index29.js +3 -3
  49. package/dist/v2/index30.js +3 -10
  50. package/dist/v2/index31.js +9 -12
  51. package/dist/v2/index32.js +11 -1
  52. package/dist/v2/index33.js +1 -1
  53. package/dist/v2/index34.js +1 -16
  54. package/dist/v2/index35.js +17 -17
  55. package/dist/v2/index36.js +17 -17
  56. package/dist/v2/index37.js +16 -1
  57. package/dist/v2/index38.js +1 -17
  58. package/dist/v2/index39.js +18 -22
  59. package/dist/v2/index40.js +22 -2
  60. package/dist/v2/index41.js +3 -3
  61. package/dist/v2/index42.js +1 -1
  62. package/dist/v2/index43.js +3 -20
  63. package/dist/v2/index44.js +1 -7
  64. package/dist/v2/index45.js +24 -1
  65. package/dist/v2/index46.js +3 -3
  66. package/dist/v2/index47.js +1 -2
  67. package/dist/v2/index48.js +2 -9
  68. package/dist/v2/index49.js +10 -17
  69. package/dist/v2/index50.js +17 -13
  70. package/dist/v2/index51.js +13 -14
  71. package/dist/v2/index52.js +14 -13
  72. package/dist/v2/index53.js +12 -15
  73. package/dist/v2/index54.js +16 -1
  74. package/dist/v2/index55.js +2 -6
  75. package/dist/v2/index56.js +1 -5
  76. package/dist/v2/index57.js +10 -3
  77. package/dist/v2/index58.js +2 -4
  78. package/dist/v2/index59.js +5 -3
  79. package/dist/v2/index60.js +2 -1
  80. package/dist/v2/index61.js +2 -5
  81. package/dist/v2/index62.js +3 -18
  82. package/dist/v2/index63.js +18 -15
  83. package/dist/v2/index64.js +15 -23
  84. package/dist/v2/index65.js +25 -4
  85. package/dist/v2/index66.js +2 -1
  86. package/dist/v2/index67.js +3 -4
  87. package/dist/v2/index68.js +3 -4
  88. package/dist/v2/index69.js +3 -10
  89. package/dist/v2/index70.js +3 -6
  90. package/dist/v2/index71.js +4 -4
  91. package/dist/v2/index72.js +15 -6
  92. package/dist/v2/index73.js +2 -2
  93. package/dist/v2/index74.js +6 -3
  94. package/dist/v2/index75.js +4 -3
  95. package/dist/v2/index76.js +1 -2
  96. package/dist/v2/index77.js +2 -14
  97. package/dist/v2/index78.js +2 -10
  98. package/dist/v2/index79.js +5 -4
  99. package/dist/v2/index80.js +12 -2
  100. package/dist/v2/index81.js +14 -2
  101. package/dist/v2/index82.js +2 -3
  102. package/dist/v2/index83.js +2 -8
  103. package/dist/v2/index84.js +2 -20
  104. package/dist/v2/index85.js +8 -18
  105. package/dist/v2/index86.js +21 -1
  106. package/dist/v2/index87.js +17 -16
  107. package/dist/v2/index88.js +1 -1
  108. package/dist/v2/index89.js +17 -9
  109. package/dist/v2/index90.js +2 -12
  110. package/dist/v2/index91.js +10 -6
  111. package/dist/v2/index92.js +11 -1
  112. package/dist/v2/index93.js +7 -0
  113. package/dist/v2/index94.js +3 -0
  114. package/dist/v2/{types-dd4c7282.js → types-8ea6482d.js} +1 -1
  115. package/dist/v3/OrCardCollection-85a00f6c.js +198 -0
  116. package/dist/v3/{OrConfirm-58aa4260.js → OrConfirm-9990d64a.js} +1 -1
  117. package/dist/v3/{OrIconButton-eef9eb43.js → OrIconButton-f9226adf.js} +1 -1
  118. package/dist/v3/{OrInlineInput-0c87838c.js → OrInlineInput-bc5fa87a.js} +6 -4
  119. package/dist/v3/{OrInlineTextarea-d50f03b7.js → OrInlineTextarea-c433b451.js} +6 -4
  120. package/dist/v3/{OrInput-d34c8571.js → OrInput-2b05a69c.js} +6 -4
  121. package/dist/v3/{OrModal-179f5a1a.js → OrModal-0713f927.js} +1 -1
  122. package/dist/v3/{OrNotification-4a0dc24a.js → OrNotification-7ef1b4e7.js} +1 -1
  123. package/dist/v3/{OrSearch-95d4e098.js → OrSearch-1272c3df.js} +1 -1
  124. package/dist/v3/{OrSelect-32f188bd.js → OrSelect-529b4567.js} +7 -5
  125. package/dist/v3/OrSortHeader-5eba50cd.js +104 -0
  126. package/dist/v3/{OrTag-d1f3a0d0.js → OrTag-60585386.js} +1 -1
  127. package/dist/v3/{OrTextarea-09aa33dc.js → OrTextarea-98895b2a.js} +6 -4
  128. package/dist/v3/{OrTooltip-36c6728c.js → OrTooltip-30e05f9e.js} +3 -33
  129. package/dist/v3/components/index.d.ts +2 -0
  130. package/dist/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +17 -0
  131. package/dist/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +98 -0
  132. package/dist/v3/components/or-card-collection-v3/index.d.ts +3 -0
  133. package/dist/v3/components/or-card-collection-v3/props.d.ts +4 -0
  134. package/dist/v3/components/or-card-collection-v3/styles.d.ts +6 -0
  135. package/dist/v3/components/or-card-collection-v3/types.d.ts +7 -0
  136. package/dist/v3/components/or-sort-header-v3/OrSortHeader.stories3.d.ts +12 -0
  137. package/dist/v3/components/or-sort-header-v3/OrSortHeader.vue.d.ts +57 -0
  138. package/dist/v3/components/or-sort-header-v3/index.d.ts +2 -0
  139. package/dist/v3/components/or-sort-header-v3/styles.d.ts +1 -0
  140. package/dist/v3/components/or-sort-header-v3/types.d.ts +4 -0
  141. package/dist/v3/components/or-tooltip-v3/styles.d.ts +0 -2
  142. package/dist/v3/index.js +15 -13
  143. package/dist/v3/index11.js +19 -1
  144. package/dist/v3/index12.js +3 -11
  145. package/dist/v3/index13.js +3 -2
  146. package/dist/v3/index14.js +9 -4
  147. package/dist/v3/index15.js +4 -11
  148. package/dist/v3/index16.js +3 -17
  149. package/dist/v3/index17.js +25 -4
  150. package/dist/v3/index18.js +3 -6
  151. package/dist/v3/index19.js +5 -20
  152. package/dist/v3/index2.js +15 -13
  153. package/dist/v3/index20.js +21 -20
  154. package/dist/v3/index21.js +20 -15
  155. package/dist/v3/index22.js +16 -1
  156. package/dist/v3/index23.js +2 -4
  157. package/dist/v3/index24.js +2 -1
  158. package/dist/v3/index25.js +1 -2
  159. package/dist/v3/index26.js +2 -2
  160. package/dist/v3/index27.js +4 -6
  161. package/dist/v3/index28.js +5 -2
  162. package/dist/v3/index29.js +3 -3
  163. package/dist/v3/index30.js +3 -9
  164. package/dist/v3/index31.js +8 -11
  165. package/dist/v3/index32.js +10 -1
  166. package/dist/v3/index33.js +1 -1
  167. package/dist/v3/index34.js +1 -15
  168. package/dist/v3/index35.js +16 -14
  169. package/dist/v3/index36.js +14 -16
  170. package/dist/v3/index37.js +16 -2
  171. package/dist/v3/index38.js +2 -17
  172. package/dist/v3/index39.js +17 -17
  173. package/dist/v3/index40.js +16 -1
  174. package/dist/v3/index41.js +3 -3
  175. package/dist/v3/index42.js +1 -1
  176. package/dist/v3/index43.js +3 -16
  177. package/dist/v3/index44.js +1 -7
  178. package/dist/v3/index45.js +20 -1
  179. package/dist/v3/index46.js +3 -3
  180. package/dist/v3/index47.js +1 -2
  181. package/dist/v3/index48.js +2 -8
  182. package/dist/v3/index49.js +9 -14
  183. package/dist/v3/index50.js +14 -12
  184. package/dist/v3/index51.js +12 -11
  185. package/dist/v3/index52.js +11 -12
  186. package/dist/v3/index53.js +11 -11
  187. package/dist/v3/index54.js +12 -1
  188. package/dist/v3/index55.js +2 -5
  189. package/dist/v3/index56.js +1 -5
  190. package/dist/v3/index57.js +9 -3
  191. package/dist/v3/index58.js +2 -4
  192. package/dist/v3/index59.js +5 -3
  193. package/dist/v3/index60.js +2 -1
  194. package/dist/v3/index61.js +1 -4
  195. package/dist/v3/index62.js +3 -17
  196. package/dist/v3/index63.js +17 -14
  197. package/dist/v3/index64.js +13 -21
  198. package/dist/v3/index65.js +23 -3
  199. package/dist/v3/index66.js +2 -1
  200. package/dist/v3/index67.js +3 -4
  201. package/dist/v3/index68.js +3 -4
  202. package/dist/v3/index69.js +3 -9
  203. package/dist/v3/index70.js +3 -4
  204. package/dist/v3/index71.js +4 -4
  205. package/dist/v3/index72.js +11 -5
  206. package/dist/v3/index73.js +2 -2
  207. package/dist/v3/index74.js +5 -2
  208. package/dist/v3/index75.js +4 -3
  209. package/dist/v3/index76.js +1 -2
  210. package/dist/v3/index77.js +2 -13
  211. package/dist/v3/index78.js +2 -9
  212. package/dist/v3/index79.js +5 -4
  213. package/dist/v3/index80.js +11 -1
  214. package/dist/v3/index81.js +13 -1
  215. package/dist/v3/index82.js +1 -3
  216. package/dist/v3/index83.js +1 -8
  217. package/dist/v3/index84.js +2 -17
  218. package/dist/v3/index85.js +7 -14
  219. package/dist/v3/index86.js +18 -1
  220. package/dist/v3/index87.js +14 -15
  221. package/dist/v3/index88.js +1 -1
  222. package/dist/v3/index89.js +15 -6
  223. package/dist/v3/index90.js +2 -11
  224. package/dist/v3/index91.js +8 -6
  225. package/dist/v3/index92.js +10 -1
  226. package/dist/v3/index93.js +7 -0
  227. package/dist/v3/index94.js +3 -0
  228. package/dist/v3/{types-8ff779b1.js → types-e4403486.js} +1 -1
  229. package/package.json +1 -1
  230. package/src/components/index.ts +2 -0
  231. package/src/components/or-card-collection-v3/OrCardCollection.docs.mdx +3 -0
  232. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +162 -0
  233. package/src/components/or-card-collection-v3/OrCardCollection.vue +210 -0
  234. package/src/components/or-card-collection-v3/index.ts +3 -0
  235. package/src/components/or-card-collection-v3/props.ts +4 -0
  236. package/src/components/or-card-collection-v3/styles.ts +53 -0
  237. package/src/components/or-card-collection-v3/types.ts +8 -0
  238. package/src/components/or-inline-input-v3/OrInlineInput.vue +12 -10
  239. package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +12 -10
  240. package/src/components/or-input-v3/OrInput.vue +12 -10
  241. package/src/components/or-select-v3/OrSelect.vue +5 -3
  242. package/src/components/or-sort-header-v3/OrSortHeader.docs.mdx +3 -0
  243. package/src/components/or-sort-header-v3/OrSortHeader.stories3.ts +132 -0
  244. package/src/components/or-sort-header-v3/OrSortHeader.vue +111 -0
  245. package/src/components/or-sort-header-v3/index.ts +2 -0
  246. package/src/components/or-sort-header-v3/styles.ts +23 -0
  247. package/src/components/or-sort-header-v3/types.ts +4 -0
  248. package/src/components/or-textarea-v3/OrTextarea.vue +12 -10
  249. package/src/components/or-tooltip-v3/OrTooltip.vue +2 -3
  250. package/src/components/or-tooltip-v3/styles.ts +0 -55
@@ -0,0 +1,111 @@
1
+ <template>
2
+ <div
3
+ ref="root"
4
+ v-bind="$attrs"
5
+ :class="rootStyles"
6
+ :activated="activated ? '' : null"
7
+ @click.stop="toggleDirection()"
8
+ >
9
+ <slot />
10
+
11
+ <template v-if="activated">
12
+ <OrIcon
13
+ :class="{ 'rotate-180': proxyModelValue.direction === 'asc' }"
14
+ :icon="'arrow_downward'"
15
+ />
16
+ </template>
17
+ </div>
18
+ </template>
19
+
20
+ <script lang="ts">
21
+ import { computed, defineComponent, PropType, ref } from 'vue-demi';
22
+ import { useClassAttribute } from '../../hooks';
23
+ import { OrIconV3 as OrIcon } from '../or-icon-v3';
24
+ import { SortHeaderRoot } from './styles';
25
+ import { SortHeaderModel } from './types';
26
+
27
+ export default defineComponent({
28
+ name: 'OrSortHeader',
29
+
30
+ components: {
31
+ OrIcon,
32
+ },
33
+
34
+ inheritAttrs: false,
35
+
36
+ props: {
37
+ modelValue: {
38
+ type: Object as PropType<SortHeaderModel>,
39
+ default: undefined,
40
+ },
41
+
42
+ value: { // TODO: Remove Vue 2 fallback
43
+ type: Object as PropType<SortHeaderModel>,
44
+ default: undefined,
45
+ },
46
+
47
+ inputValue: { // TODO: Rename to `value` after complete migration to Vue 3
48
+ type: String,
49
+ required: true,
50
+ },
51
+ },
52
+
53
+ emits: [
54
+ 'update:modelValue',
55
+
56
+ 'input',
57
+ 'focus',
58
+ 'blur',
59
+ ],
60
+
61
+ expose: [
62
+ 'root',
63
+ ],
64
+
65
+ setup(props, context) {
66
+ // Refs
67
+ const root = ref<HTMLElement>();
68
+
69
+ // Styles
70
+ const classAttribute = useClassAttribute();
71
+
72
+ const rootStyles = computed(() => [
73
+ 'or-sort-header',
74
+ ...SortHeaderRoot,
75
+ classAttribute.value,
76
+ ]);
77
+
78
+ // State
79
+ const proxyModelValue = computed({
80
+ get: () => {
81
+ return props.modelValue ?? props.value; // TODO: Remove Vue 2 fallback
82
+ },
83
+
84
+ set: (value) => {
85
+ context.emit('input', value);
86
+ context.emit('update:modelValue', value);
87
+ },
88
+ });
89
+
90
+ const activated = computed(() => {
91
+ return proxyModelValue.value?.column === props.inputValue;
92
+ });
93
+
94
+ // Methods
95
+ function toggleDirection(): void {
96
+ proxyModelValue.value = {
97
+ column: props.inputValue,
98
+ direction: proxyModelValue.value?.direction === 'asc' ? 'desc' : 'asc',
99
+ };
100
+ }
101
+
102
+ return {
103
+ root,
104
+ rootStyles,
105
+ proxyModelValue,
106
+ activated,
107
+ toggleDirection,
108
+ };
109
+ },
110
+ });
111
+ </script>
@@ -0,0 +1,2 @@
1
+ export { default as OrSortHeaderV3 } from './OrSortHeader.vue';
2
+ export * from './types';
@@ -0,0 +1,23 @@
1
+ export const SortHeaderRoot: string[] = [
2
+ // Layout
3
+ 'inline-flex',
4
+ 'justify-normal',
5
+ 'items-center',
6
+
7
+ // Interactivity
8
+ 'interactivity-auto',
9
+
10
+ // Typography
11
+ 'typography-caption-regular',
12
+
13
+ // Typography (activated)
14
+ 'activated:typography-caption-semibold',
15
+
16
+ // Theme
17
+ 'theme-foreground-outline',
18
+ 'dark:theme-foreground-outline-dark',
19
+
20
+ // Theme (activated)
21
+ 'activated:theme-foreground-default',
22
+ 'dark:activated:theme-foreground-default-dark',
23
+ ];
@@ -0,0 +1,4 @@
1
+ export interface SortHeaderModel {
2
+ column: string;
3
+ direction: 'asc' | 'desc';
4
+ }
@@ -40,16 +40,18 @@
40
40
  </OrInputBox>
41
41
 
42
42
  <template v-if="!invalid">
43
- <OrHint :disabled="disabled">
44
- {{ hint }}
45
-
46
- <template
47
- v-if="maxLength"
48
- v-slot:addon
49
- >
50
- {{ currentLength }} / {{ maxLength }}
51
- </template>
52
- </OrHint>
43
+ <template v-if="hint || maxLength">
44
+ <OrHint :disabled="disabled">
45
+ {{ hint }}
46
+
47
+ <template
48
+ v-if="maxLength"
49
+ v-slot:addon
50
+ >
51
+ {{ currentLength }} / {{ maxLength }}
52
+ </template>
53
+ </OrHint>
54
+ </template>
53
55
  </template>
54
56
 
55
57
  <template v-else>
@@ -30,7 +30,7 @@ import { computed, defineComponent, PropType, ref, watch } from 'vue-demi';
30
30
  import { useClassAttribute } from '../../hooks';
31
31
  import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
32
32
  import { TooltipPlacement } from './props';
33
- import { TooltipBody, TooltipBodyPlacements, TooltipRoot } from './styles';
33
+ import { TooltipBody, TooltipRoot } from './styles';
34
34
 
35
35
  export default defineComponent({
36
36
  name: 'OrTooltip',
@@ -63,7 +63,7 @@ export default defineComponent({
63
63
  'close',
64
64
  ],
65
65
 
66
- setup(props) {
66
+ setup() {
67
67
  // Refs
68
68
  const root = ref<HTMLElement>();
69
69
 
@@ -81,7 +81,6 @@ export default defineComponent({
81
81
 
82
82
  const bodyStyles = computed(() => [
83
83
  ...TooltipBody,
84
- ...TooltipBodyPlacements[props.placement],
85
84
  ]);
86
85
 
87
86
  // Methods
@@ -1,5 +1,3 @@
1
- import { TooltipPlacement } from './props';
2
-
3
1
  export const TooltipRoot: string[] = [
4
2
  // Layout
5
3
  'inline-block',
@@ -11,9 +9,6 @@ export const TooltipBody: string[] = [
11
9
  'rounded-sm',
12
10
 
13
11
  // Sizing
14
- 'mx-sm',
15
- 'my-sm',
16
-
17
12
  'px-sm',
18
13
  'py-xs',
19
14
 
@@ -27,53 +22,3 @@ export const TooltipBody: string[] = [
27
22
  'text-inverse-on-surface',
28
23
  'dark:text-inverse-on-surface-dark',
29
24
  ];
30
-
31
- export const TooltipBodyPlacements: Record<TooltipPlacement, string[]> = {
32
- 'top': [],
33
-
34
- 'top-start': [
35
- // Sizing
36
- 'ml-none',
37
- ],
38
-
39
- 'top-end': [
40
- // Sizing
41
- 'mr-none',
42
- ],
43
-
44
- 'bottom': [],
45
-
46
- 'bottom-start': [
47
- // Sizing
48
- 'ml-none',
49
- ],
50
-
51
- 'bottom-end': [
52
- // Sizing
53
- 'mr-none',
54
- ],
55
-
56
- 'left': [],
57
-
58
- 'left-start': [
59
- // Sizing
60
- 'mt-none',
61
- ],
62
-
63
- 'left-end': [
64
- // Sizing
65
- 'mb-none',
66
- ],
67
-
68
- 'right': [],
69
-
70
- 'right-start': [
71
- // Sizing
72
- 'mt-none',
73
- ],
74
-
75
- 'right-end': [
76
- // Sizing
77
- 'mb-none',
78
- ],
79
- };