@rip-lang/ui 0.3.44 → 0.3.46
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.
- package/components/accordion.rip +2 -2
- package/components/autocomplete.rip +1 -1
- package/components/breadcrumb.rip +1 -0
- package/components/collapsible.rip +1 -1
- package/components/combobox.rip +2 -2
- package/components/editable-value.rip +4 -2
- package/components/menu.rip +1 -1
- package/components/native-select.rip +1 -0
- package/components/popover.rip +2 -0
- package/components/select.rip +1 -1
- package/package.json +2 -2
package/components/accordion.rip
CHANGED
|
@@ -48,7 +48,7 @@ export Accordion = component
|
|
|
48
48
|
trigger.id = triggerId
|
|
49
49
|
trigger.setAttribute 'aria-expanded', isOpen
|
|
50
50
|
trigger.setAttribute 'aria-controls', panelId
|
|
51
|
-
trigger.setAttribute 'aria-disabled',
|
|
51
|
+
if isDisabled then trigger.setAttribute 'aria-disabled', true else trigger.removeAttribute 'aria-disabled'
|
|
52
52
|
trigger.tabIndex = if isDisabled then -1 else 0
|
|
53
53
|
if content
|
|
54
54
|
content.id = panelId
|
|
@@ -80,7 +80,7 @@ export Accordion = component
|
|
|
80
80
|
first: => @_focusTrigger(0)
|
|
81
81
|
last: => @_focusTrigger(-1)
|
|
82
82
|
select: => @toggle(id) unless disabled
|
|
83
|
-
}
|
|
83
|
+
}, 'vertical'
|
|
84
84
|
|
|
85
85
|
_triggers: ->
|
|
86
86
|
return [] unless @_content
|
|
@@ -93,7 +93,7 @@ export Autocomplete = component
|
|
|
93
93
|
dismiss: => @close()
|
|
94
94
|
tab: => @close()
|
|
95
95
|
|
|
96
|
-
~> ARIA.popupDismiss open, (=> @_list), (=> @close()), [=> @_input]
|
|
96
|
+
~> ARIA.popupDismiss open, (=> @_list), (=> @close()), [=> @_input], (=> @_position())
|
|
97
97
|
|
|
98
98
|
mounted: ->
|
|
99
99
|
@_hlIdx = -1
|
|
@@ -31,6 +31,7 @@ export Breadcrumb = component
|
|
|
31
31
|
return unless _ready
|
|
32
32
|
items = _items
|
|
33
33
|
return unless items.length
|
|
34
|
+
@_content?.style.setProperty '--breadcrumb-separator', JSON.stringify(@separator)
|
|
34
35
|
items.forEach (el, idx) =>
|
|
35
36
|
isLast = idx is items.length - 1
|
|
36
37
|
if isLast
|
|
@@ -36,7 +36,7 @@ export Collapsible = component
|
|
|
36
36
|
content = @_root?.querySelector('[data-content]')
|
|
37
37
|
if trigger
|
|
38
38
|
trigger.setAttribute 'aria-expanded', !!@open
|
|
39
|
-
trigger.setAttribute 'aria-disabled', true
|
|
39
|
+
if @disabled then trigger.setAttribute 'aria-disabled', true else trigger.removeAttribute 'aria-disabled'
|
|
40
40
|
trigger.tabIndex = if @disabled then -1 else 0
|
|
41
41
|
if content
|
|
42
42
|
content.hidden = not @open
|
package/components/combobox.rip
CHANGED
|
@@ -86,14 +86,14 @@ export Combobox = component
|
|
|
86
86
|
len = @getItems().length
|
|
87
87
|
ARIA.listNav e,
|
|
88
88
|
next: => @openMenu() unless open; highlightedIndex = @_nextEnabled(highlightedIndex, 1); @_scrollToItem()
|
|
89
|
-
prev: => highlightedIndex = @_nextEnabled(highlightedIndex, -1); @_scrollToItem()
|
|
89
|
+
prev: => @openMenu() unless open; highlightedIndex = @_nextEnabled(highlightedIndex, -1); @_scrollToItem()
|
|
90
90
|
first: => highlightedIndex = 0; @_scrollToItem()
|
|
91
91
|
last: => highlightedIndex = len - 1; @_scrollToItem()
|
|
92
92
|
select: => if highlightedIndex >= 0 then @selectIndex(highlightedIndex) else if len is 1 then @selectIndex(0)
|
|
93
93
|
dismiss: => if open then @close() else @query = ''
|
|
94
94
|
tab: => @close()
|
|
95
95
|
|
|
96
|
-
~> ARIA.popupDismiss open, (=> @_list), (=> @close()), [=> @_content]
|
|
96
|
+
~> ARIA.popupDismiss open, (=> @_list), (=> @close()), [=> @_content], (=> @_position())
|
|
97
97
|
|
|
98
98
|
render
|
|
99
99
|
. ref: "_content", $open: open?!
|
|
@@ -25,6 +25,7 @@ export EditableValue = component
|
|
|
25
25
|
return if saving
|
|
26
26
|
saving = true
|
|
27
27
|
@emit 'save'
|
|
28
|
+
@close()
|
|
28
29
|
|
|
29
30
|
_onCancel: ->
|
|
30
31
|
editing = false
|
|
@@ -50,11 +51,12 @@ export EditableValue = component
|
|
|
50
51
|
editor.querySelector('input, textarea, select')?.focus()
|
|
51
52
|
|
|
52
53
|
~>
|
|
54
|
+
_editing = editing # track before any early return
|
|
53
55
|
display = @_root?.querySelector('[data-display]')
|
|
54
56
|
editor = @_root?.querySelector('[data-editor]')
|
|
55
57
|
return unless display and editor
|
|
56
|
-
editor.hidden = not
|
|
57
|
-
if
|
|
58
|
+
editor.hidden = not _editing
|
|
59
|
+
if _editing
|
|
58
60
|
editor.setAttribute 'data-open', ''
|
|
59
61
|
onDown = (e) =>
|
|
60
62
|
unless @_root?.contains(e.target)
|
package/components/menu.rip
CHANGED
|
@@ -110,7 +110,7 @@ export Menu = component
|
|
|
110
110
|
tab: => @close()
|
|
111
111
|
char: => @_typeahead(e.key)
|
|
112
112
|
|
|
113
|
-
~> ARIA.popupDismiss open, (=> @_list), (=> @close()), [=> @_trigger]
|
|
113
|
+
~> ARIA.popupDismiss open, (=> @_list), (=> @close()), [=> @_trigger], (=> @_position())
|
|
114
114
|
|
|
115
115
|
render
|
|
116
116
|
.
|
package/components/popover.rip
CHANGED
|
@@ -99,6 +99,7 @@ export Popover = component
|
|
|
99
99
|
floating.style.left = "#{x}px"
|
|
100
100
|
floating.style.top = "#{y}px"
|
|
101
101
|
floating.style.zIndex = '50'
|
|
102
|
+
floating.style.visibility = 'visible'
|
|
102
103
|
|
|
103
104
|
~>
|
|
104
105
|
return unless _ready
|
|
@@ -109,6 +110,7 @@ export Popover = component
|
|
|
109
110
|
if floating
|
|
110
111
|
floating.hidden = not open
|
|
111
112
|
if open
|
|
113
|
+
floating.style.visibility = 'hidden'
|
|
112
114
|
floating.setAttribute 'data-open', ''
|
|
113
115
|
floating.setAttribute 'data-placement', @placement
|
|
114
116
|
heading = floating.querySelector('h1,h2,h3,h4,h5,h6')
|
package/components/select.rip
CHANGED
|
@@ -117,7 +117,7 @@ export Select = component
|
|
|
117
117
|
@_list.style.top = "#{tr.top - fl.height - 4}px"
|
|
118
118
|
@_list.style.visibility = 'visible'
|
|
119
119
|
|
|
120
|
-
~> ARIA.popupDismiss open, (=> @_list), (=> @close()), [=> @_trigger]
|
|
120
|
+
~> ARIA.popupDismiss open, (=> @_list), (=> @close()), [=> @_trigger], (=> @_position())
|
|
121
121
|
|
|
122
122
|
render
|
|
123
123
|
.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rip-lang/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.46",
|
|
4
4
|
"author": "Steve Shreeve <steve.shreeve@gmail.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"type": "module",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"rip-lang": ">=3.13.
|
|
38
|
+
"rip-lang": ">=3.13.99"
|
|
39
39
|
}
|
|
40
40
|
}
|