@rettangoli/ui 1.6.1 → 1.7.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.
@@ -0,0 +1,61 @@
1
+ refs:
2
+ trigger:
3
+ eventListeners:
4
+ click:
5
+ handler: handleTriggerClick
6
+ keydown:
7
+ handler: handleTriggerKeyDown
8
+ popover:
9
+ eventListeners:
10
+ close:
11
+ handler: handlePopoverClose
12
+ option*:
13
+ eventListeners:
14
+ click:
15
+ handler: handleOptionClick
16
+ keydown:
17
+ handler: handleOptionKeyDown
18
+ submitButton:
19
+ eventListeners:
20
+ click:
21
+ handler: handleSubmitClick
22
+ addOptionButton:
23
+ eventListeners:
24
+ click:
25
+ handler: handleAddOptionClick
26
+ styles:
27
+ .icon-placeholder:
28
+ width: 16px
29
+ height: 16px
30
+ flex-shrink: 0
31
+ template:
32
+ - 'rtgl-view#trigger d=h av=c g=sm cur=${triggerCursor} ${containerAttrString} data-testid="tag-select-trigger" role="button" tabindex=${triggerTabIndex} aria-disabled=${isDisabled} style="min-height: 24px;"':
33
+ - rtgl-view d=h av=c wrap g=sm w=1fg:
34
+ - $if !hasSelectedTags:
35
+ - 'rtgl-tag v=mu style="${placeholderTagStyle}"':
36
+ ${placeholder}
37
+ - $for tag, i in selectedTags:
38
+ - 'rtgl-tag#tag${tag.selectionIndex} data-selection-index=${tag.selectionIndex} pre=${tag.icon} data-testid=${tag.testId} v=mu style="${triggerTagStyle}"':
39
+ ${tag.label}
40
+ - 'div#${popoverKey} style="display: contents;"':
41
+ - rtgl-popover#popover ?open=${isOpen} x=${position.x} y=${position.y} place=bs content-w=${position.w} content-g=sm content-sv=true content-pv=sm:
42
+ - $if !hasSelectableOptions:
43
+ - rtgl-text s=sm c=mu-fg: No tags available
44
+ - rtgl-view d=h wrap g=sm w=f:
45
+ - $for option, i in options:
46
+ - $if option.isSection:
47
+ - rtgl-view w=f pt=xs:
48
+ - rtgl-text s=xs c=mu-fg: ${option.label}
49
+ $elif option.isItem:
50
+ - 'rtgl-view#option${option.index} cur=${option.cursor} data-testid=${option.testId} role="button" tabindex=0 aria-pressed=${option.isSelected}':
51
+ - 'rtgl-tag v=mu pre=${option.icon} style="${option.tagStyle}"':
52
+ ${option.label}
53
+ $elif option.isSeparator:
54
+ - rtgl-view w=f h=1 bgc=mu my=xs: null
55
+ - $if showAddOption:
56
+ - rtgl-button#addOptionButton v=gh s=sm pre=plus data-testid="tag-select-add-option":
57
+ ${addOptionLabel}
58
+ - rtgl-view d=h av=c g=sm w=f pt=sm:
59
+ - rtgl-view w=1fg: null
60
+ - rtgl-button#submitButton v=pr s=sm data-testid="tag-select-submit" ?disabled=${submitDisabled}:
61
+ ${submitLabel}