ariadne_view_components 0.0.94.6 → 0.0.95

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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/app/assets/javascripts/ariadne_view_components.js +10 -10
  4. data/app/assets/javascripts/ariadne_view_components.js.br +0 -0
  5. data/app/assets/javascripts/ariadne_view_components.js.gz +0 -0
  6. data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
  7. data/app/assets/stylesheets/ariadne_view_components.css +1 -1
  8. data/app/assets/stylesheets/ariadne_view_components.css.br +0 -0
  9. data/app/assets/stylesheets/ariadne_view_components.css.gz +0 -0
  10. data/app/components/ariadne/behaviors/tooltipable.rb +62 -36
  11. data/app/components/ariadne/form/checkbox/component.html.erb +2 -2
  12. data/app/components/ariadne/form/checkbox/component.rb +17 -17
  13. data/app/components/ariadne/form/group/component.rb +11 -11
  14. data/app/components/ariadne/form/radio/component.html.erb +1 -1
  15. data/app/components/ariadne/form/radio/component.rb +9 -9
  16. data/app/components/ariadne/form/radio_button/component.html.erb +1 -1
  17. data/app/components/ariadne/form/radio_button/component.rb +11 -11
  18. data/app/components/ariadne/form/radio_button_group/component.html.erb +1 -1
  19. data/app/components/ariadne/form/radio_button_group/component.rb +9 -9
  20. data/app/components/ariadne/form/select/component.html.erb +1 -1
  21. data/app/components/ariadne/form/select/component.rb +45 -45
  22. data/app/components/ariadne/form/text_field/component.html.erb +2 -2
  23. data/app/components/ariadne/form/text_field/component.rb +55 -55
  24. data/app/components/ariadne/form/toggle/component.html.erb +1 -1
  25. data/app/components/ariadne/form/toggle/component.rb +30 -30
  26. data/app/components/ariadne/form/toggle_group/component.rb +7 -7
  27. data/app/components/ariadne/form/toggle_group/option/component.rb +7 -7
  28. data/app/components/ariadne/layout/grid/component.rb +6 -6
  29. data/app/components/ariadne/layout/grid/item/component.html.erb +2 -2
  30. data/app/components/ariadne/layout/grid/item/component.rb +6 -6
  31. data/app/components/ariadne/layout/label_block/component.html.erb +1 -1
  32. data/app/components/ariadne/layout/label_block/component.rb +2 -2
  33. data/app/components/ariadne/layout/narrow/component.html.erb +2 -2
  34. data/app/components/ariadne/layout/narrow/component.rb +8 -8
  35. data/app/components/ariadne/layout/nav_bar/component.html.erb +7 -7
  36. data/app/components/ariadne/layout/nav_bar/component.rb +26 -26
  37. data/app/components/ariadne/layout/section_block/component.html.erb +1 -1
  38. data/app/components/ariadne/layout/section_block/header/component.html.erb +2 -2
  39. data/app/components/ariadne/layout/two_panel/component.html.erb +4 -4
  40. data/app/components/ariadne/layout/two_panel/component.rb +12 -12
  41. data/app/components/ariadne/layout/wide/component.rb +6 -6
  42. data/app/components/ariadne/ui/accordion/component.html.erb +1 -1
  43. data/app/components/ariadne/ui/accordion/component.rb +4 -4
  44. data/app/components/ariadne/ui/accordion/item/component.html.erb +1 -1
  45. data/app/components/ariadne/ui/accordion/item/component.rb +12 -12
  46. data/app/components/ariadne/ui/avatar/component.rb +21 -21
  47. data/app/components/ariadne/ui/badge/component.rb +31 -31
  48. data/app/components/ariadne/ui/banner/component.html.erb +8 -8
  49. data/app/components/ariadne/ui/banner/component.rb +28 -28
  50. data/app/components/ariadne/ui/blankslate/component.html.erb +4 -4
  51. data/app/components/ariadne/ui/button/component.rb +80 -78
  52. data/app/components/ariadne/ui/card/body/component.rb +2 -2
  53. data/app/components/ariadne/ui/card/component.html.erb +1 -1
  54. data/app/components/ariadne/ui/card/component.rb +10 -10
  55. data/app/components/ariadne/ui/card/footer/component.rb +4 -4
  56. data/app/components/ariadne/ui/card/header/component.rb +8 -8
  57. data/app/components/ariadne/ui/clipboard_copy/component.html.erb +2 -2
  58. data/app/components/ariadne/ui/clipboard_copy/component.rb +20 -20
  59. data/app/components/ariadne/ui/color_dot/component.html.erb +1 -1
  60. data/app/components/ariadne/ui/color_dot/component.rb +13 -13
  61. data/app/components/ariadne/ui/combobox/component.html.erb +2 -2
  62. data/app/components/ariadne/ui/combobox/component.rb +12 -12
  63. data/app/components/ariadne/ui/dialog/component.html.erb +3 -3
  64. data/app/components/ariadne/ui/dialog/component.rb +21 -21
  65. data/app/components/ariadne/ui/dialog/footer/component.rb +5 -5
  66. data/app/components/ariadne/ui/heroicon/component.rb +5 -5
  67. data/app/components/ariadne/ui/image/component.rb +6 -6
  68. data/app/components/ariadne/ui/link/component.rb +35 -35
  69. data/app/components/ariadne/ui/list/component.html.erb +5 -5
  70. data/app/components/ariadne/ui/list/component.rb +23 -23
  71. data/app/components/ariadne/ui/list/component.ts +4 -4
  72. data/app/components/ariadne/ui/list/item/component.html.erb +1 -1
  73. data/app/components/ariadne/ui/list/item/component.rb +15 -15
  74. data/app/components/ariadne/ui/pagination/component.html.erb +1 -1
  75. data/app/components/ariadne/ui/pagination/component.rb +9 -9
  76. data/app/components/ariadne/ui/popover/component.rb +6 -6
  77. data/app/components/ariadne/ui/shortcut/component.html.erb +4 -4
  78. data/app/components/ariadne/ui/shortcut/component.rb +26 -22
  79. data/app/components/ariadne/ui/skeleton/component.rb +7 -7
  80. data/app/components/ariadne/ui/stats_panel/component.rb +6 -6
  81. data/app/components/ariadne/ui/stats_panel/item/component.html.erb +2 -2
  82. data/app/components/ariadne/ui/table/cell/component.rb +3 -3
  83. data/app/components/ariadne/ui/table/component.rb +12 -12
  84. data/app/components/ariadne/ui/table/footer/component.rb +8 -8
  85. data/app/components/ariadne/ui/table/header/component.rb +9 -9
  86. data/app/components/ariadne/ui/table/row/component.rb +4 -4
  87. data/app/components/ariadne/ui/typography/component.rb +42 -42
  88. data/app/frontend/controllers/tooltip_controller.ts +28 -11
  89. data/app/frontend/stylesheets/ariadne_view_components.css +10 -5
  90. data/app/frontend/stylesheets/scrollbar.css +7 -7
  91. data/app/frontend/stylesheets/theme.css +110 -74
  92. data/app/helpers/ariadne/color_helper.rb +104 -104
  93. data/lib/ariadne/view_components/version.rb +1 -1
  94. metadata +2 -2
@@ -24,10 +24,11 @@ module Ariadne
24
24
  style do
25
25
  base do
26
26
  [
27
- "ariadne-inline-flex",
28
- "ariadne-items-baseline",
29
- "ariadne-select-none",
30
- "*:ariadne-px-0",
27
+ "ariadne:inline-flex",
28
+ "ariadne:items-baseline",
29
+ "ariadne:gap-1.5",
30
+ "ariadne:select-none",
31
+ "ariadne:*:px-0",
31
32
  ]
32
33
  end
33
34
  end
@@ -35,42 +36,45 @@ module Ariadne
35
36
  style :key do
36
37
  base do
37
38
  [
38
- "ariadne-font-mono",
39
- "ariadne-px-2",
40
- "ariadne-py-1.5",
41
- "ariadne-text-xs",
42
- "ariadne-font-semibold",
43
- "ariadne-text-gray-800",
44
- "ariadne-bg-neutral-50",
45
- "ariadne-border",
46
- "ariadne-border-gray-200",
47
- "ariadne-rounded-lg",
48
- "ariadne-dark:bg-neutral-600",
49
- "ariadne-dark:text-gray-100",
50
- "ariadne-dark:border-gray-500",
39
+ "ariadne:font-mono",
40
+ "ariadne:text-center",
41
+ "ariadne:px-1.5",
42
+ "ariadne:py-0.5",
43
+ "ariadne:text-xs",
44
+ "ariadne:font-semibold",
45
+ "ariadne:text-muted-foreground",
46
+ "ariadne:bg-muted",
47
+ "ariadne:border",
48
+ "ariadne:border-border",
49
+ "ariadne:rounded-md",
50
+ "ariadne:shadow-sm",
51
+ "ariadne:min-w-[1.2em]",
52
+ "ariadne:inline-flex",
53
+ "ariadne:items-center",
54
+ "ariadne:justify-center",
51
55
  ]
52
56
  end
53
57
 
54
58
  variants do
55
59
  size do
56
60
  xs do
57
- ["ariadne-text-xs", "ariadne-px-1", "ariadne-rounded-sm"]
61
+ ["ariadne:text-xs", "ariadne:px-1", "ariadne:py-0.5", "ariadne:rounded-sm"]
58
62
  end
59
63
 
60
64
  sm do
61
- ["ariadne-text-sm", "ariadne-px-1.5", "ariadne-rounded"]
65
+ ["ariadne:text-xs", "ariadne:px-1.5", "ariadne:py-0.5", "ariadne:rounded-md"]
62
66
  end
63
67
 
64
68
  md do
65
- ["ariadne-text-base", "ariadne-px-1.5", "ariadne-rounded-md"]
69
+ ["ariadne:text-sm", "ariadne:px-1.5", "ariadne:py-0.5", "ariadne:rounded-md"]
66
70
  end
67
71
 
68
72
  lg do
69
- ["ariadne-text-base", "ariadne-px-2", "ariadne-rounded-lg"]
73
+ ["ariadne:text-sm", "ariadne:px-2", "ariadne:py-1", "ariadne:rounded-md"]
70
74
  end
71
75
 
72
76
  xl do
73
- ["ariadne-text-base", "ariadne-px-3", "ariadne-rounded-xl"]
77
+ ["ariadne:text-base", "ariadne:px-2.5", "ariadne:py-1", "ariadne:rounded-lg"]
74
78
  end
75
79
  end
76
80
  end
@@ -20,13 +20,13 @@ module Ariadne
20
20
  style do
21
21
  base do
22
22
  [
23
- "ariadne-animate-pulse",
24
- "ariadne-rounded-md",
25
- "ariadne-bg-muted",
26
- "ariadne-rounded-full",
27
- "ariadne-mb-4",
28
- "ariadne-bg-gray-200",
29
- "dark:ariadne-bg-gray-700",
23
+ "ariadne:animate-pulse",
24
+ "ariadne:rounded-md",
25
+ "ariadne:bg-muted",
26
+ "ariadne:rounded-full",
27
+ "ariadne:mb-4",
28
+ "ariadne:bg-gray-200",
29
+ "ariadne:dark:bg-gray-700",
30
30
  ]
31
31
  end
32
32
 
@@ -18,12 +18,12 @@ module Ariadne
18
18
  style do
19
19
  base do
20
20
  [
21
- "ariadne-flex",
22
- "ariadne-flex-wrap",
23
- "ariadne-space-x-2",
24
- "ariadne-divide-x",
25
- "ariadne-divide-slate-100",
26
- "dark:ariadne-divide-slate-800",
21
+ "ariadne:flex",
22
+ "ariadne:flex-wrap",
23
+ "ariadne:space-x-2",
24
+ "ariadne:divide-x",
25
+ "ariadne:divide-slate-100",
26
+ "ariadne:dark:divide-slate-800",
27
27
  ]
28
28
  end
29
29
 
@@ -1,4 +1,4 @@
1
- <span class="ariadne-flex ariadne-flex-col-reverse">
2
- <dt class="ariadne-text-zinc-600 dark:ariadne-text-zinc-400 ariadne-text-xs"><%= label %></dt>
1
+ <span class="ariadne:flex ariadne:flex-col-reverse">
2
+ <dt class="ariadne:text-zinc-600 ariadne:dark:text-zinc-400 ariadne:text-xs"><%= label %></dt>
3
3
  <dd class="<%= html_attrs[:class] %>"><%= content %></dd>
4
4
  </span>
@@ -25,9 +25,9 @@ module Ariadne
25
25
  style :cell do
26
26
  base do
27
27
  [
28
- "ariadne-p-4",
29
- "ariadne-text-left",
30
- "[&:has([role=checkbox])]:ariadne-pr-0",
28
+ "ariadne:p-4",
29
+ "ariadne:text-left",
30
+ "ariadne:[&:has([role=checkbox])]:pr-0",
31
31
  ]
32
32
  end
33
33
  end
@@ -14,11 +14,11 @@ module Ariadne
14
14
  style :table do
15
15
  base do
16
16
  [
17
- "ariadne-w-full",
18
- "ariadne-caption-bottom",
19
- "ariadne-text-sm",
20
- "ariadne-border-collapse",
21
- "ariadne-border-spacing-0",
17
+ "ariadne:w-full",
18
+ "ariadne:caption-bottom",
19
+ "ariadne:text-sm",
20
+ "ariadne:border-collapse",
21
+ "ariadne:border-spacing-0",
22
22
  ]
23
23
  end
24
24
  end
@@ -26,9 +26,9 @@ module Ariadne
26
26
  style :wrapper do
27
27
  base do
28
28
  [
29
- "ariadne-relative",
30
- "ariadne-w-full",
31
- "ariadne-overflow-auto",
29
+ "ariadne:relative",
30
+ "ariadne:w-full",
31
+ "ariadne:overflow-auto",
32
32
  ]
33
33
  end
34
34
  end
@@ -36,7 +36,7 @@ module Ariadne
36
36
  style :body do
37
37
  base do
38
38
  [
39
- "[&_tr:last-child]:ariadne-border-0",
39
+ "ariadne:[&_tr:last-child]:border-0",
40
40
  ]
41
41
  end
42
42
  end
@@ -44,9 +44,9 @@ module Ariadne
44
44
  style :caption do
45
45
  base do
46
46
  [
47
- "ariadne-mt-4",
48
- "ariadne-text-sm",
49
- "ariadne-text-muted-foreground",
47
+ "ariadne:mt-4",
48
+ "ariadne:text-sm",
49
+ "ariadne:text-muted-foreground",
50
50
  ]
51
51
  end
52
52
  end
@@ -16,8 +16,8 @@ module Ariadne
16
16
  style :footer do
17
17
  base do
18
18
  [
19
- "ariadne-border-t",
20
- "ariadne-bg-muted/50",
19
+ "ariadne:border-t",
20
+ "ariadne:bg-muted/50",
21
21
  "[&>tr]:ariadne-last:border-b-0",
22
22
  ]
23
23
  end
@@ -26,12 +26,12 @@ module Ariadne
26
26
  style :footer_cell do
27
27
  base do
28
28
  [
29
- "ariadne-h-12",
30
- "ariadne-px-4",
31
- "ariadne-text-left",
32
- "ariadne-align-middle",
33
- "ariadne-font-medium",
34
- "[&:has([role=checkbox])]:ariadne-pr-0",
29
+ "ariadne:h-12",
30
+ "ariadne:px-4",
31
+ "ariadne:text-left",
32
+ "ariadne:align-middle",
33
+ "ariadne:font-medium",
34
+ "ariadne:[&:has([role=checkbox])]:pr-0",
35
35
  ]
36
36
  end
37
37
  end
@@ -21,7 +21,7 @@ module Ariadne
21
21
  style :header do
22
22
  base do
23
23
  [
24
- "[&_tr]:ariadne-border-b",
24
+ "ariadne:[&_tr]:border-b",
25
25
  ]
26
26
  end
27
27
  end
@@ -29,14 +29,14 @@ module Ariadne
29
29
  style :header_cell do
30
30
  base do
31
31
  [
32
- "ariadne-h-12",
33
- "ariadne-px-4",
34
- "ariadne-text-left",
35
- "ariadne-align-middle",
36
- "ariadne-font-medium",
37
- "ariadne-text-muted-foreground",
38
- "[&:has([role=checkbox])]:ariadne-pr-0",
39
- "ariadne-whitespace-nowrap",
32
+ "ariadne:h-12",
33
+ "ariadne:px-4",
34
+ "ariadne:text-left",
35
+ "ariadne:align-middle",
36
+ "ariadne:font-medium",
37
+ "ariadne:text-muted-foreground",
38
+ "ariadne:[&:has([role=checkbox])]:pr-0",
39
+ "ariadne:whitespace-nowrap",
40
40
  ]
41
41
  end
42
42
  end
@@ -23,10 +23,10 @@ module Ariadne
23
23
  style :row do
24
24
  base do
25
25
  [
26
- "ariadne-border-b",
27
- "ariadne-transition-colors",
28
- "hover:ariadne-bg-muted/50",
29
- "data-[state=selected]:ariadne-bg-muted",
26
+ "ariadne:border-b",
27
+ "ariadne:transition-colors",
28
+ "ariadne:hover:bg-muted/50",
29
+ "ariadne:data-[state=selected]:bg-muted",
30
30
  ]
31
31
  end
32
32
  end
@@ -43,8 +43,8 @@ module Ariadne
43
43
  style do
44
44
  base do
45
45
  [
46
- "ariadne-text-content",
47
- "dark:ariadne-text-content-dark",
46
+ "ariadne:text-content",
47
+ "ariadne:dark:text-content-dark",
48
48
  ]
49
49
  end
50
50
 
@@ -52,19 +52,19 @@ module Ariadne
52
52
  size do
53
53
  sm do
54
54
  [
55
- "ariadne-text-sm",
55
+ "ariadne:text-sm",
56
56
  ]
57
57
  end
58
58
 
59
59
  base do
60
60
  [
61
- "ariadne-text-base",
61
+ "ariadne:text-base",
62
62
  ]
63
63
  end
64
64
 
65
65
  lg do
66
66
  [
67
- "ariadne-text-lg",
67
+ "ariadne:text-lg",
68
68
  ]
69
69
  end
70
70
  end
@@ -72,78 +72,78 @@ module Ariadne
72
72
  type do
73
73
  title do
74
74
  [
75
- "ariadne-scroll-m-20",
76
- "ariadne-text-4xl",
77
- "ariadne-font-extrabold",
78
- "ariadne-tracking-tight",
79
- "lg:ariadne-text-5xl",
75
+ "ariadne:scroll-m-20",
76
+ "ariadne:text-4xl",
77
+ "ariadne:font-extrabold",
78
+ "ariadne:tracking-tight",
79
+ "ariadne:lg:text-5xl",
80
80
  ]
81
81
  end
82
82
 
83
83
  heading do
84
84
  [
85
- "ariadne-scroll-m-20",
86
- "ariadne-pb-2",
87
- "ariadne-text-3xl",
88
- "ariadne-font-semibold",
89
- "ariadne-tracking-tight",
90
- "first:ariadne-mt-0",
85
+ "ariadne:scroll-m-20",
86
+ "ariadne:pb-2",
87
+ "ariadne:text-3xl",
88
+ "ariadne:font-semibold",
89
+ "ariadne:tracking-tight",
90
+ "ariadne:first:mt-0",
91
91
  ]
92
92
  end
93
93
 
94
94
  subheading do
95
95
  [
96
- "ariadne-scroll-m-20",
97
- "ariadne-text-2xl",
98
- "ariadne-font-semibold",
99
- "ariadne-tracking-tight",
96
+ "ariadne:scroll-m-20",
97
+ "ariadne:text-2xl",
98
+ "ariadne:font-semibold",
99
+ "ariadne:tracking-tight",
100
100
  ]
101
101
  end
102
102
 
103
103
  ann do
104
104
  [
105
- "ariadne-scroll-m-20",
106
- "ariadne-text-xl",
107
- "ariadne-font-semibold",
108
- "ariadne-tracking-tight",
105
+ "ariadne:scroll-m-20",
106
+ "ariadne:text-xl",
107
+ "ariadne:font-semibold",
108
+ "ariadne:tracking-tight",
109
109
  ]
110
110
  end
111
111
 
112
112
  lede do
113
113
  [
114
- "ariadne-text-xl",
115
- "ariadne-text-slate-500",
114
+ "ariadne:text-xl",
115
+ "ariadne:text-slate-500",
116
116
  ]
117
117
  end
118
118
 
119
119
  label do
120
120
  [
121
- "ariadne-justify-between",
122
- "ariadne-whitespace-nowrap",
123
- "ariadne-text-sm",
124
- "ariadne-font-medium",
125
- "ariadne-uppercase",
126
- "ariadne-text-zinc-600",
127
- "dark:ariadne-text-zinc-400",
121
+ "ariadne:justify-between",
122
+ "ariadne:whitespace-nowrap",
123
+ "ariadne:text-sm",
124
+ "ariadne:font-medium",
125
+ "ariadne:uppercase",
126
+ "ariadne:text-zinc-600",
127
+ "ariadne:dark:text-zinc-400",
128
128
  ]
129
129
  end
130
130
 
131
131
  code do
132
132
  [
133
- "ariadne-relative",
134
- "ariadne-rounded",
135
- "ariadne-bg-neutral-100",
136
- "ariadne-px-[0.3rem]",
137
- "ariadne-py-[0.2rem]",
138
- "ariadne-font-mono",
139
- "ariadne-text-sm",
140
- "ariadne-font-semibold",
133
+ "ariadne:relative",
134
+ "ariadne:rounded",
135
+ "ariadne:bg-neutral-100",
136
+ "ariadne:px-[0.3rem]",
137
+ "ariadne:py-[0.2rem]",
138
+ "ariadne:font-mono",
139
+ "ariadne:text-sm",
140
+ "ariadne:font-semibold",
141
141
  ]
142
142
  end
143
143
 
144
144
  muted do
145
145
  [
146
- "ariadne-text-muted-foreground",
146
+ "ariadne:text-muted-foreground",
147
147
  ]
148
148
  end
149
149
 
@@ -1,8 +1,8 @@
1
1
  import {controllerFactory} from '@utils/createController'
2
- import {computePosition, arrow, offset, flip, Placement} from '@floating-ui/dom'
2
+ import {computePosition, arrow, offset, flip, shift, Placement} from '@floating-ui/dom'
3
3
 
4
- const TRIANGLE_HEIGHT = 6
5
- const DEFAULT_OFFSET = 4;
4
+ const TRIANGLE_HEIGHT = 8
5
+ const DEFAULT_OFFSET = 8;
6
6
 
7
7
  export default class TooltipController extends controllerFactory<HTMLElement>()({
8
8
  targets: {
@@ -19,8 +19,9 @@ export default class TooltipController extends controllerFactory<HTMLElement>()(
19
19
  computePosition(this.activatorTarget, this.tooltipTarget, {
20
20
  placement,
21
21
  middleware: [
22
- flip({ padding: 12 }),
23
- offset(TRIANGLE_HEIGHT + DEFAULT_OFFSET),
22
+ offset(TRIANGLE_HEIGHT + DEFAULT_OFFSET),
23
+ flip({ padding: 8 }),
24
+ shift({ padding: 8 }),
24
25
  arrow({ element: this.arrowTarget })
25
26
  ],
26
27
  }).then(({x, y, placement, middlewareData}) => {
@@ -29,13 +30,18 @@ export default class TooltipController extends controllerFactory<HTMLElement>()(
29
30
  top: `${y}px`,
30
31
  })
31
32
 
33
+ // Set data-side attribute for styling & animations
34
+ const side = placement.split('-')[0]
35
+ this.tooltipTarget.setAttribute('data-side', side)
36
+ this.arrowTarget.setAttribute('data-side', side)
37
+
32
38
  const {x: arrowX, y: arrowY} = middlewareData.arrow || {}
33
39
  const staticSide = {
34
40
  top: 'bottom',
35
41
  right: 'left',
36
42
  bottom: 'top',
37
43
  left: 'right',
38
- }[placement.split('-')[0]] as string
44
+ }[side] as string
39
45
 
40
46
  const arrowStyles: Partial<CSSStyleDeclaration> = {
41
47
  left: arrowX != null ? `${arrowX}px` : '',
@@ -43,20 +49,31 @@ export default class TooltipController extends controllerFactory<HTMLElement>()(
43
49
  right: '',
44
50
  bottom: '',
45
51
  }
46
- arrowStyles[staticSide as 'top' | 'right' | 'bottom' | 'left'] = '-4px'
52
+
53
+ // The arrow is now a triangle created with borders, so we need to adjust its position
54
+ // to ensure it's properly aligned with the tooltip edge
55
+ if (staticSide === 'top') {
56
+ arrowStyles.bottom = '-8px'; // Move outside the tooltip
57
+ } else if (staticSide === 'bottom') {
58
+ arrowStyles.top = '-8px'; // Move outside the tooltip
59
+ } else if (staticSide === 'left') {
60
+ arrowStyles.right = '-8px'; // Move outside the tooltip
61
+ } else if (staticSide === 'right') {
62
+ arrowStyles.left = '-8px'; // Move outside the tooltip
63
+ }
47
64
 
48
65
  Object.assign(this.arrowTarget.style, arrowStyles)
49
66
  })
50
67
  }
51
68
 
52
69
  showTooltip(_event: Event) {
53
- this.wrapperTarget.classList.add('ariadne-block')
54
- this.wrapperTarget.classList.remove('ariadne-hidden')
70
+ this.wrapperTarget.classList.add('ariadne:block')
71
+ this.wrapperTarget.classList.remove('ariadne:hidden')
55
72
  this.update()
56
73
  }
57
74
 
58
75
  hideTooltip(_event: Event) {
59
- this.wrapperTarget.classList.add('ariadne-hidden')
60
- this.wrapperTarget.classList.remove('ariadne-block')
76
+ this.wrapperTarget.classList.add('ariadne:hidden')
77
+ this.wrapperTarget.classList.remove('ariadne:block')
61
78
  }
62
79
  }
@@ -1,9 +1,14 @@
1
- @import 'scrollbar.css';
2
- @import 'theme.css';
1
+ @import './scrollbar.css' layer(base);
3
2
 
4
- @tailwind base;
5
- @tailwind components;
6
- @tailwind utilities;
3
+ @import 'tailwindcss' prefix(ariadne);
4
+
5
+ @import '@evilmartians/harmony/tailwind.css';
6
+
7
+ @import './theme.css' layer(base);
8
+
9
+ @plugin "@tailwindcss/typography";
10
+
11
+ @custom-variant dark (&:where([data-ariadne-color-mode="dark"], [data-ariadne-color-mode="dark"] *));
7
12
 
8
13
  /* Fix summary element usage in Safari only */
9
14
  summary::-webkit-details-marker {
@@ -2,27 +2,27 @@
2
2
  scrollbar-color: theme('colors.gray.500/20') transparent;
3
3
 
4
4
  *::-webkit-scrollbar {
5
- @apply ariadne-h-4 ariadne-w-2;
5
+ @apply ariadne:h-4 ariadne:w-2;
6
6
  }
7
7
 
8
8
  *::-webkit-scrollbar:horizontal {
9
- @apply ariadne-h-2 ariadne-w-4;
9
+ @apply ariadne:h-2 ariadne:w-4;
10
10
  }
11
11
 
12
12
  *::-webkit-scrollbar-track {
13
- @apply ariadne-bg-transparent;
13
+ @apply ariadne:bg-transparent;
14
14
  }
15
15
 
16
16
  *::-webkit-scrollbar-thumb {
17
- @apply ariadne-bg-gray-500/20 hover:ariadne-bg-gray-500/40;
18
- @apply ariadne-transition-opacity;
17
+ @apply ariadne:bg-gray-500/20 ariadne:hover:bg-gray-500/40;
18
+ @apply ariadne:transition-opacity;
19
19
  }
20
20
  }
21
21
 
22
22
  .scrollbar-trigger *::-webkit-scrollbar-thumb {
23
- @apply md:ariadne-invisible;
23
+ @apply ariadne:md:invisible;
24
24
  }
25
25
 
26
26
  .scrollbar-trigger:hover *::-webkit-scrollbar-thumb {
27
- @apply md:ariadne-visible;
27
+ @apply ariadne:md:visible;
28
28
  }