ariadne_view_components 0.0.17 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/app/assets/builds/ariadne_view_components.css +20 -132
- data/app/assets/javascripts/ariadne_view_components.js +2 -2
- data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
- data/app/assets/javascripts/rich-text-area-component.d.ts +2 -0
- data/app/components/ariadne/base_button.rb +2 -2
- data/app/components/ariadne/comment_component.html.erb +31 -37
- data/app/components/ariadne/comment_component.rb +9 -7
- data/app/components/ariadne/component.rb +4 -0
- data/app/components/ariadne/inline_flex_component.rb +2 -2
- data/app/components/ariadne/panel_bar_component.html.erb +1 -1
- data/app/components/ariadne/panel_bar_component.rb +1 -0
- data/app/components/ariadne/rich-text-area-component.d.ts +2 -0
- data/app/components/ariadne/rich-text-area-component.js +18 -9
- data/app/components/ariadne/rich-text-area-component.ts +23 -10
- data/app/components/ariadne/rich_text_area_component.html.erb +1 -1
- data/app/components/ariadne/slideover-component.js +0 -10
- data/app/components/ariadne/slideover-component.ts +0 -9
- data/app/components/ariadne/slideover_component.html.erb +6 -8
- data/app/components/ariadne/slideover_component.rb +9 -24
- data/app/components/ariadne/tab_component.rb +0 -1
- data/app/components/ariadne/tab_container_component.erb +2 -4
- data/app/components/ariadne/tab_container_component.rb +2 -1
- data/app/lib/ariadne/action_view_extensions/form_helper.rb +1 -1
- data/lib/ariadne/view_components/version.rb +1 -1
- data/static/arguments.yml +2 -6
- data/static/classes.yml +7 -13
- data/static/constants.json +10 -10
- metadata +2 -5
- data/app/components/ariadne/comment-component.d.ts +0 -0
- data/app/components/ariadne/comment-component.js +0 -33
- data/app/components/ariadne/comment-component.ts +0 -37
data/static/constants.json
CHANGED
@@ -37,8 +37,8 @@
|
|
37
37
|
]
|
38
38
|
},
|
39
39
|
"Ariadne::BaseButton": {
|
40
|
-
"DEFAULT_CLASSES": "ariadne-
|
41
|
-
"DEFAULT_NUDE_CLASSES": "
|
40
|
+
"DEFAULT_CLASSES": "ariadne-items-center ariadne-border ariadne-shadow-sm focus:ariadne-outline-none focus:ariadne-ring-2 focus:ariadne-ring-offset-2",
|
41
|
+
"DEFAULT_NUDE_CLASSES": "focus:ariadne-outline-none focus:ariadne-ring-2 focus:ariadne-ring-offset-2",
|
42
42
|
"DEFAULT_SIZE": "md",
|
43
43
|
"DEFAULT_TAG": "button",
|
44
44
|
"DEFAULT_TYPE": "button",
|
@@ -102,7 +102,7 @@
|
|
102
102
|
"DEFAULT_SCHEME": "default",
|
103
103
|
"LINK_SCHEME": "link",
|
104
104
|
"SCHEME_CLASS_MAPPINGS": {
|
105
|
-
"link": "ariadne-underline ariadne-decoration-double",
|
105
|
+
"link": "ariadne-cursor-pointer ariadne-font-semibold ariadne-underline ariadne-decoration-double",
|
106
106
|
"none": "",
|
107
107
|
"default": "ariadne-text-purple-800 ariadne-bg-purple-50 hover:ariadne-bg-purple-100 ariadne-border-purple-300 focus:ariadne-ring-offset-purple-50 focus:ariadne-ring-purple-600",
|
108
108
|
"info": "ariadne-text-blue-800 ariadne-bg-blue-50 hover:ariadne-bg-blue-100 ariadne-border-blue-300 focus:ariadne-ring-offset-blue-50 focus:ariadne-ring-blue-600",
|
@@ -132,7 +132,7 @@
|
|
132
132
|
"data-action": "click->clipboard-copy-component#copy mouseover->tooltip-component#show mouseout->tooltip-component#hide",
|
133
133
|
"data-tooltip-component-target": "trigger"
|
134
134
|
},
|
135
|
-
"DEFAULT_CLASSES": "ariadne-underline ariadne-decoration-double",
|
135
|
+
"DEFAULT_CLASSES": "ariadne-cursor-pointer ariadne-font-semibold ariadne-underline ariadne-decoration-double",
|
136
136
|
"DEFAULT_TAG": "clipboard-copy"
|
137
137
|
},
|
138
138
|
"Ariadne::CommentComponent": {
|
@@ -283,7 +283,7 @@
|
|
283
283
|
"DEFAULT_ITEM_CLASSES": "ariadne-flex ariadne-flex-col ariadne-text-center ariadne-rounded-lg ariadne-shadow text-black-700 ariadne-border-black"
|
284
284
|
},
|
285
285
|
"Ariadne::HeaderComponent": {
|
286
|
-
"DEFAULT_CLASSES": "ariadne-sticky ariadne-top-0 ariadne-z-50 ariadne-px-4 ariadne-h-16 ariadne-bg-white ariadne-shadow-sm shadow-slate-900/5 ariadne-transition ariadne-duration-500",
|
286
|
+
"DEFAULT_CLASSES": "ariadne-sticky ariadne-top-0 ariadne-z-50 ariadne-px-4 ariadne-pt-4 ariadne-h-16 ariadne-bg-white ariadne-shadow-sm shadow-slate-900/5 ariadne-transition ariadne-duration-500",
|
287
287
|
"DEFAULT_IMAGE_LOGO_CLASSES": "ariadne-h-10 ariadne-w-auto",
|
288
288
|
"DEFAULT_NAV_LINK_CLASSES": "ariadne-inline-block ariadne-rounded-lg ariadne-py-1 ariadne-px-2 ariadne-text-sm text-slate-700 hover:bg-slate-100 hover:text-slate-900",
|
289
289
|
"DEFAULT_PROFILE_LINK_CLASSES": "group ariadne-inline-flex ariadne-items-center ariadne-justify-center ariadne-rounded-full ariadne-py-2 ariadne-px-4 ariadne-text-sm ariadne-font-semibold focus:ariadne-outline-none focus-visible:ariadne-outline-2 focus-visible:outline-offset-2",
|
@@ -404,9 +404,9 @@
|
|
404
404
|
},
|
405
405
|
"Ariadne::InlineFlexComponent": {
|
406
406
|
"DEFAULT_CLASSES": "ariadne-inline-flex ariadne-items-baseline",
|
407
|
-
"DEFAULT_LABEL_CLASSES": "ariadne-pl-2 ariadne-text-sm ariadne-font-medium
|
407
|
+
"DEFAULT_LABEL_CLASSES": "ariadne-pl-2 ariadne-text-sm ariadne-font-medium",
|
408
408
|
"DEFAULT_TAG": "span",
|
409
|
-
"DEFAULT_TEXT_CLASSES": "ariadne-pl-2 ariadne-text-sm ariadne-font-medium
|
409
|
+
"DEFAULT_TEXT_CLASSES": "ariadne-pl-2 ariadne-text-sm ariadne-font-medium",
|
410
410
|
"DEFAULT_TEXT_CLOSED_CLASSES": "ariadne-text-state-closed",
|
411
411
|
"DEFAULT_TEXT_OPEN_CLASSES": "ariadne-text-state-open",
|
412
412
|
"STATE_CLOSED_SVG": "<svg viewBox=\"0 0 24 24\" width=\"12\" height=\"12\" class=\"ariadne-stroke-state-closed ariadne-fill-state-closed \" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n</svg>\n",
|
@@ -417,7 +417,7 @@
|
|
417
417
|
]
|
418
418
|
},
|
419
419
|
"Ariadne::LinkComponent": {
|
420
|
-
"DEFAULT_ACTIONABLE_CLASSES": "ariadne-underline ariadne-decoration-double",
|
420
|
+
"DEFAULT_ACTIONABLE_CLASSES": "ariadne-cursor-pointer ariadne-font-semibold ariadne-underline ariadne-decoration-double",
|
421
421
|
"DEFAULT_CLASSES": "ariadne-cursor-pointer hover:ariadne-text-button-text-color focus:ariadne-outline-none focus:ariadne-ring-2 focus:ariadne-ring-offset-2 focus:ariadne-ring-purple-500",
|
422
422
|
"DEFAULT_TAG": "a",
|
423
423
|
"TAG_OPTIONS": [
|
@@ -465,7 +465,7 @@
|
|
465
465
|
},
|
466
466
|
"Ariadne::SlideoverComponent": {
|
467
467
|
"DEFAULT_BUTTON_CLASSES": "ariadne-inline-flex ariadne-items-center ariadne-shadow-sm ariadne-px-4 ariadne-py-1.5 ariadne-pb-2 ariadne-text-sm ariadne-leading-5 ariadne-font-medium ariadne-rounded-full ariadne-text-purple-800 ariadne-bg-purple-50 hover:ariadne-bg-purple-100 ariadne-border-purple-300 focus:ariadne-ring-offset-purple-50 focus:ariadne-ring-purple-600",
|
468
|
-
"DEFAULT_CLASSES": "",
|
468
|
+
"DEFAULT_CLASSES": "ariadne-flex ariadne-flex-col",
|
469
469
|
"DEFAULT_TAG": "div",
|
470
470
|
"DIRECTION_X_LEFT": "xl",
|
471
471
|
"DIRECTION_Y_DOWN": "yd",
|
@@ -487,7 +487,7 @@
|
|
487
487
|
},
|
488
488
|
"Ariadne::TabContainerComponent": {
|
489
489
|
"DEFAULT_CLASSES": "",
|
490
|
-
"DEFAULT_SELECTED_CLASSES": "ariadne-border-indigo-500 ariadne-text-indigo-600",
|
490
|
+
"DEFAULT_SELECTED_CLASSES": "ariadne-bg-white ariadne-border-indigo-500 ariadne-text-indigo-600",
|
491
491
|
"DEFAULT_TAG": "tab-container",
|
492
492
|
"DEFAULT_UNSELECTED_CLASSES": "ariadne-text-gray-500 hover:ariadne-text-gray-700 hover:ariadne-border-gray-300"
|
493
493
|
},
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ariadne_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tailwind_merge
|
@@ -153,9 +153,6 @@ files:
|
|
153
153
|
- app/components/ariadne/clipboard_copy_component.html.erb
|
154
154
|
- app/components/ariadne/clipboard_copy_component.js
|
155
155
|
- app/components/ariadne/clipboard_copy_component.rb
|
156
|
-
- app/components/ariadne/comment-component.d.ts
|
157
|
-
- app/components/ariadne/comment-component.js
|
158
|
-
- app/components/ariadne/comment-component.ts
|
159
156
|
- app/components/ariadne/comment_component.html.erb
|
160
157
|
- app/components/ariadne/comment_component.rb
|
161
158
|
- app/components/ariadne/component.rb
|
File without changes
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// import {Controller} from '@hotwired/stimulus'
|
3
|
-
// export default class CommentComponent extends Controller {
|
4
|
-
// static targets = ['tab', 'tabBarComponent']
|
5
|
-
// declare readonly commentComponentTarget: HTMLDivElement
|
6
|
-
// declare readonly tabBarComponentTarget: HTMLElement // technically a `nav but typescript can't find it?
|
7
|
-
// declare readonly tabTargets: [HTMLButtonElement]
|
8
|
-
// // keep in sync with comment_component.rb
|
9
|
-
// SELECTED_TAB_CLASSES = ['ariadne-border-indigo-500', 'ariadne-text-indigo-600']
|
10
|
-
// PUBLIC_BACKGROUND_COLOR = 'ariadne-bg-white'
|
11
|
-
// INTERNAL_BACKGROUND_COLOR = 'ariadne-bg-internal-message'
|
12
|
-
// toggleTab() {
|
13
|
-
// for (const tab of this.tabTargets) {
|
14
|
-
// if (tab.hasAttribute('aria-selected')) {
|
15
|
-
// tab.classList.remove(...this.SELECTED_TAB_CLASSES)
|
16
|
-
// this.toggleBackgrounds(tab, false)
|
17
|
-
// tab.removeAttribute('aria-selected')
|
18
|
-
// } else {
|
19
|
-
// tab.setAttribute('aria-selected', 'true')
|
20
|
-
// tab.classList.add(...this.SELECTED_TAB_CLASSES)
|
21
|
-
// this.toggleBackgrounds(tab, true)
|
22
|
-
// }
|
23
|
-
// }
|
24
|
-
// }
|
25
|
-
// toggleBackgrounds(tab: HTMLButtonElement, publicComment: boolean) {
|
26
|
-
// if (publicComment) {
|
27
|
-
// this.tabBarComponentTarget.classList.add(this.PUBLIC_BACKGROUND_COLOR)
|
28
|
-
// this.tabBarComponentTarget.classList.remove(this.INTERNAL_BACKGROUND_COLOR)
|
29
|
-
// this.tabBarComponentTarget.classList.remove(this.PUBLIC_BACKGROUND_COLOR)
|
30
|
-
// this.tabBarComponentTarget.classList.add(this.INTERNAL_BACKGROUND_COLOR)
|
31
|
-
// }
|
32
|
-
// }
|
33
|
-
// }
|
@@ -1,37 +0,0 @@
|
|
1
|
-
// import {Controller} from '@hotwired/stimulus'
|
2
|
-
|
3
|
-
// export default class CommentComponent extends Controller {
|
4
|
-
// static targets = ['tab', 'tabBarComponent']
|
5
|
-
|
6
|
-
// declare readonly commentComponentTarget: HTMLDivElement
|
7
|
-
// declare readonly tabBarComponentTarget: HTMLElement // technically a `nav but typescript can't find it?
|
8
|
-
// declare readonly tabTargets: [HTMLButtonElement]
|
9
|
-
|
10
|
-
// // keep in sync with comment_component.rb
|
11
|
-
// SELECTED_TAB_CLASSES = ['ariadne-border-indigo-500', 'ariadne-text-indigo-600']
|
12
|
-
// PUBLIC_BACKGROUND_COLOR = 'ariadne-bg-white'
|
13
|
-
// INTERNAL_BACKGROUND_COLOR = 'ariadne-bg-internal-message'
|
14
|
-
|
15
|
-
// toggleTab() {
|
16
|
-
// for (const tab of this.tabTargets) {
|
17
|
-
// if (tab.hasAttribute('aria-selected')) {
|
18
|
-
// tab.classList.remove(...this.SELECTED_TAB_CLASSES)
|
19
|
-
// this.toggleBackgrounds(tab, false)
|
20
|
-
// tab.removeAttribute('aria-selected')
|
21
|
-
// } else {
|
22
|
-
// tab.setAttribute('aria-selected', 'true')
|
23
|
-
// tab.classList.add(...this.SELECTED_TAB_CLASSES)
|
24
|
-
// this.toggleBackgrounds(tab, true)
|
25
|
-
// }
|
26
|
-
// }
|
27
|
-
// }
|
28
|
-
// toggleBackgrounds(tab: HTMLButtonElement, publicComment: boolean) {
|
29
|
-
// if (publicComment) {
|
30
|
-
// this.tabBarComponentTarget.classList.add(this.PUBLIC_BACKGROUND_COLOR)
|
31
|
-
// this.tabBarComponentTarget.classList.remove(this.INTERNAL_BACKGROUND_COLOR)
|
32
|
-
|
33
|
-
// this.tabBarComponentTarget.classList.remove(this.PUBLIC_BACKGROUND_COLOR)
|
34
|
-
// this.tabBarComponentTarget.classList.add(this.INTERNAL_BACKGROUND_COLOR)
|
35
|
-
// }
|
36
|
-
// }
|
37
|
-
// }
|