fernandes-ui 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ui.esm.js +0 -1
- data/app/assets/javascripts/ui.js +0 -1
- data/app/components/ui/slider.rb +80 -0
- data/app/components/ui/slider_range.rb +33 -0
- data/app/components/ui/slider_thumb.rb +47 -0
- data/app/components/ui/slider_track.rb +35 -0
- data/app/javascript/ui/common.js +0 -1
- data/docs/components/ANNOTATIONS.md +220 -0
- data/docs/components/accordion.yml +109 -0
- data/docs/components/alert.yml +47 -0
- data/docs/components/alert_dialog.yml +151 -0
- data/docs/components/aspect_ratio.yml +37 -0
- data/docs/components/avatar.yml +55 -0
- data/docs/components/badge.yml +24 -0
- data/docs/components/breadcrumb.yml +76 -0
- data/docs/components/button.yml +56 -0
- data/docs/components/button_group.yml +67 -0
- data/docs/components/calendar.yml +166 -0
- data/docs/components/card.yml +99 -0
- data/docs/components/carousel.yml +100 -0
- data/docs/components/checkbox.yml +59 -0
- data/docs/components/collapsible.yml +74 -0
- data/docs/components/combobox.yml +21 -0
- data/docs/components/command.yml +144 -0
- data/docs/components/context_menu.yml +124 -0
- data/docs/components/dialog.yml +155 -0
- data/docs/components/drawer.yml +219 -0
- data/docs/components/dropdown_menu.yml +151 -0
- data/docs/components/empty.yml +88 -0
- data/docs/components/field.yml +81 -0
- data/docs/components/hover_card.yml +75 -0
- data/docs/components/input.yml +51 -0
- data/docs/components/input_group.yml +37 -0
- data/docs/components/input_group_addon.yml +24 -0
- data/docs/components/input_group_button.yml +30 -0
- data/docs/components/input_otp.yml +80 -0
- data/docs/components/input_otp_slot.yml +39 -0
- data/docs/components/item.yml +84 -0
- data/docs/components/kbd.yml +26 -0
- data/docs/components/label.yml +26 -0
- data/docs/components/menubar.yml +201 -0
- data/docs/components/menubar_menu.yml +21 -0
- data/docs/components/navigation_menu.yml +161 -0
- data/docs/components/pagination.yml +86 -0
- data/docs/components/popover.yml +105 -0
- data/docs/components/progress.yml +37 -0
- data/docs/components/radio_button.yml +52 -0
- data/docs/components/resizable.yml +44 -0
- data/docs/components/scroll_area.yml +76 -0
- data/docs/components/select.yml +195 -0
- data/docs/components/separator.yml +26 -0
- data/docs/components/sheet.yml +133 -0
- data/docs/components/sidebar.yml +138 -0
- data/docs/components/skeleton.yml +17 -0
- data/docs/components/sonner.yml +46 -0
- data/docs/components/spinner.yml +22 -0
- data/docs/components/switch.yml +72 -0
- data/docs/components/table.yml +32 -0
- data/docs/components/tabs.yml +126 -0
- data/docs/components/textarea.yml +41 -0
- data/docs/components/toggle.yml +92 -0
- data/docs/components/toggle_group.yml +106 -0
- data/docs/components/tooltip.yml +75 -0
- data/lib/ui/version.rb +1 -1
- metadata +61 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Hover Card
|
|
3
|
+
slug: hover_card
|
|
4
|
+
category: overlay
|
|
5
|
+
description: HoverCard - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Hover Card
|
|
8
|
+
description: Container for hover card trigger and content.
|
|
9
|
+
required: true
|
|
10
|
+
- name: Content
|
|
11
|
+
description: The content that appears on hover.
|
|
12
|
+
required: true
|
|
13
|
+
- name: Trigger
|
|
14
|
+
description: Element that triggers the hover card on hover.
|
|
15
|
+
required: true
|
|
16
|
+
features:
|
|
17
|
+
- Custom styling with Tailwind classes
|
|
18
|
+
api:
|
|
19
|
+
Hover Card:
|
|
20
|
+
description: Container for hover card trigger and content.
|
|
21
|
+
parameters: []
|
|
22
|
+
data_attributes: []
|
|
23
|
+
css_variables: []
|
|
24
|
+
Content:
|
|
25
|
+
description: The content that appears on hover.
|
|
26
|
+
parameters:
|
|
27
|
+
- name: align
|
|
28
|
+
type: String
|
|
29
|
+
default: center
|
|
30
|
+
description: Alignment within container
|
|
31
|
+
- name: side_offset
|
|
32
|
+
type: Integer
|
|
33
|
+
default: '4'
|
|
34
|
+
description: The side offset
|
|
35
|
+
data_attributes: []
|
|
36
|
+
css_variables: []
|
|
37
|
+
Trigger:
|
|
38
|
+
description: Element that triggers the hover card on hover.
|
|
39
|
+
parameters:
|
|
40
|
+
- name: as_child
|
|
41
|
+
type: Boolean
|
|
42
|
+
default: 'false'
|
|
43
|
+
description: When true, yields attributes to block instead of rendering wrapper
|
|
44
|
+
- name: tag
|
|
45
|
+
type: Symbol
|
|
46
|
+
default: ":span"
|
|
47
|
+
description: The tag
|
|
48
|
+
data_attributes: []
|
|
49
|
+
css_variables: []
|
|
50
|
+
accessibility:
|
|
51
|
+
aria_pattern: Tooltip
|
|
52
|
+
w3c_reference: https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/
|
|
53
|
+
description: Implements the WAI-ARIA Tooltip pattern with proper roles, states,
|
|
54
|
+
and keyboard navigation.
|
|
55
|
+
aria_attributes: []
|
|
56
|
+
javascript:
|
|
57
|
+
controller: ui--hover-card
|
|
58
|
+
targets:
|
|
59
|
+
- trigger
|
|
60
|
+
- content
|
|
61
|
+
values:
|
|
62
|
+
- name: open
|
|
63
|
+
type: Boolean
|
|
64
|
+
description: Controls open state
|
|
65
|
+
actions:
|
|
66
|
+
- show
|
|
67
|
+
- hide
|
|
68
|
+
- keepOpen
|
|
69
|
+
- scheduleHide
|
|
70
|
+
- clearTimeouts
|
|
71
|
+
- positionContent
|
|
72
|
+
events: []
|
|
73
|
+
related:
|
|
74
|
+
- popover
|
|
75
|
+
- tooltip
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Input
|
|
3
|
+
slug: input
|
|
4
|
+
category: forms
|
|
5
|
+
anatomy:
|
|
6
|
+
- name: Input
|
|
7
|
+
description: Text input field
|
|
8
|
+
required: true
|
|
9
|
+
- name: Group
|
|
10
|
+
description: A wrapper component for grouping inputs with addons, buttons, and text.
|
|
11
|
+
required: false
|
|
12
|
+
features:
|
|
13
|
+
- Custom styling with Tailwind classes
|
|
14
|
+
- Form integration
|
|
15
|
+
- Disabled state support
|
|
16
|
+
- ARIA attributes for accessibility
|
|
17
|
+
api:
|
|
18
|
+
Input:
|
|
19
|
+
description: ''
|
|
20
|
+
parameters:
|
|
21
|
+
- name: type
|
|
22
|
+
type: String
|
|
23
|
+
default: text
|
|
24
|
+
description: The type
|
|
25
|
+
- name: placeholder
|
|
26
|
+
type: String
|
|
27
|
+
default: nil
|
|
28
|
+
description: Placeholder text when no value is selected
|
|
29
|
+
- name: value
|
|
30
|
+
type: String
|
|
31
|
+
default: nil
|
|
32
|
+
description: The current value
|
|
33
|
+
- name: name
|
|
34
|
+
type: String
|
|
35
|
+
default: nil
|
|
36
|
+
description: Form field name
|
|
37
|
+
- name: id
|
|
38
|
+
type: String
|
|
39
|
+
default: nil
|
|
40
|
+
description: HTML id attribute
|
|
41
|
+
data_attributes: []
|
|
42
|
+
css_variables: []
|
|
43
|
+
Group:
|
|
44
|
+
description: Shared behavior for InputGroup component across ERB, ViewComponent,
|
|
45
|
+
and Phlex implementations.
|
|
46
|
+
parameters: []
|
|
47
|
+
data_attributes: []
|
|
48
|
+
css_variables: []
|
|
49
|
+
related:
|
|
50
|
+
- textarea
|
|
51
|
+
- field
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Input Group
|
|
3
|
+
slug: input_group
|
|
4
|
+
category: other
|
|
5
|
+
description: Textarea - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Input Group Textarea
|
|
8
|
+
description: A textarea element styled for use within input groups.
|
|
9
|
+
required: true
|
|
10
|
+
features:
|
|
11
|
+
- Custom styling with Tailwind classes
|
|
12
|
+
api:
|
|
13
|
+
Input Group Textarea:
|
|
14
|
+
description: A textarea element styled for use within input groups.
|
|
15
|
+
parameters:
|
|
16
|
+
- name: placeholder
|
|
17
|
+
type: String
|
|
18
|
+
default: nil
|
|
19
|
+
description: Placeholder text when no value is selected
|
|
20
|
+
- name: value
|
|
21
|
+
type: String
|
|
22
|
+
default: nil
|
|
23
|
+
description: The current value
|
|
24
|
+
- name: name
|
|
25
|
+
type: String
|
|
26
|
+
default: nil
|
|
27
|
+
description: Form field name
|
|
28
|
+
- name: id
|
|
29
|
+
type: String
|
|
30
|
+
default: nil
|
|
31
|
+
description: HTML id attribute
|
|
32
|
+
- name: rows
|
|
33
|
+
type: String
|
|
34
|
+
default: nil
|
|
35
|
+
description: The rows
|
|
36
|
+
data_attributes: []
|
|
37
|
+
css_variables: []
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Input Group Addon
|
|
3
|
+
slug: input_group_addon
|
|
4
|
+
category: other
|
|
5
|
+
description: Addon - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Input Group Addon
|
|
8
|
+
description: An addon element for input groups that can contain text, icons, or
|
|
9
|
+
other elements.
|
|
10
|
+
required: true
|
|
11
|
+
features:
|
|
12
|
+
- Custom styling with Tailwind classes
|
|
13
|
+
- Disabled state support
|
|
14
|
+
api:
|
|
15
|
+
Input Group Addon:
|
|
16
|
+
description: An addon element for input groups that can contain text, icons, or
|
|
17
|
+
other elements.
|
|
18
|
+
parameters:
|
|
19
|
+
- name: align
|
|
20
|
+
type: String
|
|
21
|
+
default: inline-start
|
|
22
|
+
description: Alignment within container
|
|
23
|
+
data_attributes: []
|
|
24
|
+
css_variables: []
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Input Group Button
|
|
3
|
+
slug: input_group_button
|
|
4
|
+
category: other
|
|
5
|
+
description: Button - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Input Group Button
|
|
8
|
+
description: A button component specifically styled for use within input groups.
|
|
9
|
+
required: true
|
|
10
|
+
features:
|
|
11
|
+
- Custom styling with Tailwind classes
|
|
12
|
+
- Disabled state support
|
|
13
|
+
api:
|
|
14
|
+
Input Group Button:
|
|
15
|
+
description: A button component specifically styled for use within input groups.
|
|
16
|
+
parameters:
|
|
17
|
+
- name: size
|
|
18
|
+
type: String
|
|
19
|
+
default: xs
|
|
20
|
+
description: Size of the element
|
|
21
|
+
- name: variant
|
|
22
|
+
type: String
|
|
23
|
+
default: ghost
|
|
24
|
+
description: Visual style variant
|
|
25
|
+
- name: type
|
|
26
|
+
type: String
|
|
27
|
+
default: button
|
|
28
|
+
description: The type
|
|
29
|
+
data_attributes: []
|
|
30
|
+
css_variables: []
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Input OTP
|
|
3
|
+
slug: input_otp
|
|
4
|
+
category: forms
|
|
5
|
+
description: InputOtp - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Input OTP
|
|
8
|
+
description: Accessible one-time password container component.
|
|
9
|
+
required: true
|
|
10
|
+
- name: Group
|
|
11
|
+
description: Container for grouping OTP input slots together visually.
|
|
12
|
+
required: false
|
|
13
|
+
- name: Separator
|
|
14
|
+
description: Visual divider between OTP input groups.
|
|
15
|
+
required: false
|
|
16
|
+
features:
|
|
17
|
+
- Custom styling with Tailwind classes
|
|
18
|
+
- Disabled state support
|
|
19
|
+
api:
|
|
20
|
+
Input OTP:
|
|
21
|
+
description: Accessible one-time password container component.
|
|
22
|
+
parameters:
|
|
23
|
+
- name: length
|
|
24
|
+
type: Integer
|
|
25
|
+
default: '6'
|
|
26
|
+
description: The length
|
|
27
|
+
- name: pattern
|
|
28
|
+
type: String
|
|
29
|
+
default: "\\\\d"
|
|
30
|
+
description: The pattern
|
|
31
|
+
- name: name
|
|
32
|
+
type: String
|
|
33
|
+
default: nil
|
|
34
|
+
description: Form field name
|
|
35
|
+
- name: id
|
|
36
|
+
type: String
|
|
37
|
+
default: nil
|
|
38
|
+
description: HTML id attribute
|
|
39
|
+
- name: disabled
|
|
40
|
+
type: Boolean
|
|
41
|
+
default: 'false'
|
|
42
|
+
description: Whether the element is disabled
|
|
43
|
+
data_attributes: []
|
|
44
|
+
css_variables: []
|
|
45
|
+
Group:
|
|
46
|
+
description: Container for grouping OTP input slots together visually.
|
|
47
|
+
parameters: []
|
|
48
|
+
data_attributes: []
|
|
49
|
+
css_variables: []
|
|
50
|
+
Separator:
|
|
51
|
+
description: Visual divider between OTP input groups.
|
|
52
|
+
parameters: []
|
|
53
|
+
data_attributes: []
|
|
54
|
+
css_variables: []
|
|
55
|
+
keyboard:
|
|
56
|
+
- key: ArrowLeft
|
|
57
|
+
description: Moves focus left or decreases value
|
|
58
|
+
- key: ArrowRight
|
|
59
|
+
description: Moves focus right or increases value
|
|
60
|
+
- key: Home
|
|
61
|
+
description: Moves focus to first item
|
|
62
|
+
- key: End
|
|
63
|
+
description: Moves focus to last item
|
|
64
|
+
javascript:
|
|
65
|
+
controller: ui--input-otp
|
|
66
|
+
targets:
|
|
67
|
+
- input
|
|
68
|
+
values:
|
|
69
|
+
- name: length
|
|
70
|
+
type: Number
|
|
71
|
+
description: The length
|
|
72
|
+
actions:
|
|
73
|
+
- input
|
|
74
|
+
- keydown
|
|
75
|
+
- paste
|
|
76
|
+
- checkComplete
|
|
77
|
+
- clear
|
|
78
|
+
events:
|
|
79
|
+
- name: inputotp:complete
|
|
80
|
+
description: Fired when inputotp complete
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Input OTP Slot
|
|
3
|
+
slug: input_otp_slot
|
|
4
|
+
category: other
|
|
5
|
+
description: Slot - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Input OTP Slot
|
|
8
|
+
description: Individual OTP input slot for a single character.
|
|
9
|
+
required: true
|
|
10
|
+
features:
|
|
11
|
+
- Keyboard navigation
|
|
12
|
+
- Custom styling with Tailwind classes
|
|
13
|
+
- Disabled state support
|
|
14
|
+
api:
|
|
15
|
+
Input OTP Slot:
|
|
16
|
+
description: Individual OTP input slot for a single character.
|
|
17
|
+
parameters:
|
|
18
|
+
- name: index
|
|
19
|
+
type: Integer
|
|
20
|
+
default: '0'
|
|
21
|
+
description: The index
|
|
22
|
+
- name: value
|
|
23
|
+
type: String
|
|
24
|
+
default: ''
|
|
25
|
+
description: The current value
|
|
26
|
+
- name: name
|
|
27
|
+
type: String
|
|
28
|
+
default: nil
|
|
29
|
+
description: Form field name
|
|
30
|
+
- name: id
|
|
31
|
+
type: String
|
|
32
|
+
default: nil
|
|
33
|
+
description: HTML id attribute
|
|
34
|
+
- name: disabled
|
|
35
|
+
type: Boolean
|
|
36
|
+
default: 'false'
|
|
37
|
+
description: Whether the element is disabled
|
|
38
|
+
data_attributes: []
|
|
39
|
+
css_variables: []
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Item
|
|
3
|
+
slug: item
|
|
4
|
+
category: data
|
|
5
|
+
anatomy:
|
|
6
|
+
- name: Item
|
|
7
|
+
description: Individual item element
|
|
8
|
+
required: true
|
|
9
|
+
- name: Content
|
|
10
|
+
description: Main content container
|
|
11
|
+
required: true
|
|
12
|
+
- name: Description
|
|
13
|
+
description: Descriptive text element
|
|
14
|
+
required: false
|
|
15
|
+
- name: Footer
|
|
16
|
+
description: Footer section with actions
|
|
17
|
+
required: false
|
|
18
|
+
- name: Group
|
|
19
|
+
description: Container for grouping related items
|
|
20
|
+
required: false
|
|
21
|
+
- name: Header
|
|
22
|
+
description: Header section with title and controls
|
|
23
|
+
required: false
|
|
24
|
+
- name: Separator
|
|
25
|
+
description: Visual divider between sections
|
|
26
|
+
required: false
|
|
27
|
+
- name: Title
|
|
28
|
+
description: Title text element
|
|
29
|
+
required: false
|
|
30
|
+
features:
|
|
31
|
+
- Custom styling with Tailwind classes
|
|
32
|
+
api:
|
|
33
|
+
Item:
|
|
34
|
+
description: ''
|
|
35
|
+
parameters:
|
|
36
|
+
- name: variant
|
|
37
|
+
type: String
|
|
38
|
+
default: default
|
|
39
|
+
description: Visual style variant
|
|
40
|
+
- name: size
|
|
41
|
+
type: String
|
|
42
|
+
default: default
|
|
43
|
+
description: Size of the element
|
|
44
|
+
- name: as_child
|
|
45
|
+
type: Boolean
|
|
46
|
+
default: 'false'
|
|
47
|
+
description: When true, yields attributes to block instead of rendering wrapper
|
|
48
|
+
data_attributes: []
|
|
49
|
+
css_variables: []
|
|
50
|
+
Content:
|
|
51
|
+
description: ''
|
|
52
|
+
parameters: []
|
|
53
|
+
data_attributes: []
|
|
54
|
+
css_variables: []
|
|
55
|
+
Description:
|
|
56
|
+
description: ''
|
|
57
|
+
parameters: []
|
|
58
|
+
data_attributes: []
|
|
59
|
+
css_variables: []
|
|
60
|
+
Footer:
|
|
61
|
+
description: ''
|
|
62
|
+
parameters: []
|
|
63
|
+
data_attributes: []
|
|
64
|
+
css_variables: []
|
|
65
|
+
Group:
|
|
66
|
+
description: ''
|
|
67
|
+
parameters: []
|
|
68
|
+
data_attributes: []
|
|
69
|
+
css_variables: []
|
|
70
|
+
Header:
|
|
71
|
+
description: ''
|
|
72
|
+
parameters: []
|
|
73
|
+
data_attributes: []
|
|
74
|
+
css_variables: []
|
|
75
|
+
Separator:
|
|
76
|
+
description: ''
|
|
77
|
+
parameters: []
|
|
78
|
+
data_attributes: []
|
|
79
|
+
css_variables: []
|
|
80
|
+
Title:
|
|
81
|
+
description: ''
|
|
82
|
+
parameters: []
|
|
83
|
+
data_attributes: []
|
|
84
|
+
css_variables: []
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Kbd
|
|
3
|
+
slug: kbd
|
|
4
|
+
category: data
|
|
5
|
+
description: Kbd - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Kbd
|
|
8
|
+
description: Displays textual user input from keyboard, helping users understand
|
|
9
|
+
required: true
|
|
10
|
+
- name: Group
|
|
11
|
+
description: Groups multiple keyboard keys together with consistent spacing.
|
|
12
|
+
required: false
|
|
13
|
+
features:
|
|
14
|
+
- Keyboard navigation
|
|
15
|
+
- Custom styling with Tailwind classes
|
|
16
|
+
api:
|
|
17
|
+
Kbd:
|
|
18
|
+
description: Displays textual user input from keyboard, helping users understand
|
|
19
|
+
parameters: []
|
|
20
|
+
data_attributes: []
|
|
21
|
+
css_variables: []
|
|
22
|
+
Group:
|
|
23
|
+
description: Groups multiple keyboard keys together with consistent spacing.
|
|
24
|
+
parameters: []
|
|
25
|
+
data_attributes: []
|
|
26
|
+
css_variables: []
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Label
|
|
3
|
+
slug: label
|
|
4
|
+
category: forms
|
|
5
|
+
description: Label - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Label
|
|
8
|
+
description: Accessible label for form inputs following shadcn/ui design patterns.
|
|
9
|
+
required: true
|
|
10
|
+
features:
|
|
11
|
+
- Custom styling with Tailwind classes
|
|
12
|
+
- Form integration
|
|
13
|
+
- Disabled state support
|
|
14
|
+
api:
|
|
15
|
+
Label:
|
|
16
|
+
description: Accessible label for form inputs following shadcn/ui design patterns.
|
|
17
|
+
parameters:
|
|
18
|
+
- name: for_id
|
|
19
|
+
type: String
|
|
20
|
+
default: nil
|
|
21
|
+
description: The for id
|
|
22
|
+
data_attributes: []
|
|
23
|
+
css_variables: []
|
|
24
|
+
related:
|
|
25
|
+
- field
|
|
26
|
+
- input
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Menubar
|
|
3
|
+
slug: menubar
|
|
4
|
+
category: navigation
|
|
5
|
+
description: Menubar - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Menubar
|
|
8
|
+
description: Container for horizontal menu bar with Stimulus controller for interactivity.
|
|
9
|
+
required: true
|
|
10
|
+
- name: Content
|
|
11
|
+
description: Container for menu items that appears when trigger is activated.
|
|
12
|
+
required: true
|
|
13
|
+
- name: Item
|
|
14
|
+
description: A selectable menu item.
|
|
15
|
+
required: false
|
|
16
|
+
- name: Label
|
|
17
|
+
description: Non-interactive label/header for menu sections.
|
|
18
|
+
required: false
|
|
19
|
+
- name: Separator
|
|
20
|
+
description: Visual divider between menu items.
|
|
21
|
+
required: false
|
|
22
|
+
- name: Shortcut
|
|
23
|
+
description: Displays keyboard shortcut hint for menu items.
|
|
24
|
+
required: false
|
|
25
|
+
- name: Sub
|
|
26
|
+
description: Container for submenu within the menubar menu.
|
|
27
|
+
required: false
|
|
28
|
+
- name: Sub Content
|
|
29
|
+
description: Container for submenu items.
|
|
30
|
+
required: true
|
|
31
|
+
- name: Sub Trigger
|
|
32
|
+
description: Menu item that opens a submenu.
|
|
33
|
+
required: true
|
|
34
|
+
- name: Trigger
|
|
35
|
+
description: Button that toggles the menu content open/closed.
|
|
36
|
+
required: true
|
|
37
|
+
features:
|
|
38
|
+
- Custom styling with Tailwind classes
|
|
39
|
+
- ARIA attributes for accessibility
|
|
40
|
+
- Keyboard navigation with arrow keys
|
|
41
|
+
- Click outside to close
|
|
42
|
+
api:
|
|
43
|
+
Menubar:
|
|
44
|
+
description: Container for horizontal menu bar with Stimulus controller for interactivity.
|
|
45
|
+
parameters:
|
|
46
|
+
- name: loop
|
|
47
|
+
type: Boolean
|
|
48
|
+
default: 'false'
|
|
49
|
+
description: The loop
|
|
50
|
+
- name: aria_label
|
|
51
|
+
type: String
|
|
52
|
+
default: nil
|
|
53
|
+
description: The aria label
|
|
54
|
+
data_attributes: []
|
|
55
|
+
css_variables: []
|
|
56
|
+
Content:
|
|
57
|
+
description: Container for menu items that appears when trigger is activated.
|
|
58
|
+
parameters:
|
|
59
|
+
- name: align
|
|
60
|
+
type: String
|
|
61
|
+
default: start
|
|
62
|
+
description: Alignment within container
|
|
63
|
+
- name: side
|
|
64
|
+
type: String
|
|
65
|
+
default: bottom
|
|
66
|
+
description: Which side to display on
|
|
67
|
+
data_attributes: []
|
|
68
|
+
css_variables: []
|
|
69
|
+
Item:
|
|
70
|
+
description: A selectable menu item.
|
|
71
|
+
parameters:
|
|
72
|
+
- name: variant
|
|
73
|
+
type: Symbol
|
|
74
|
+
default: ":default"
|
|
75
|
+
description: Visual style variant
|
|
76
|
+
- name: inset
|
|
77
|
+
type: Boolean
|
|
78
|
+
default: 'false'
|
|
79
|
+
description: The inset
|
|
80
|
+
- name: disabled
|
|
81
|
+
type: Boolean
|
|
82
|
+
default: 'false'
|
|
83
|
+
description: Whether the element is disabled
|
|
84
|
+
data_attributes: []
|
|
85
|
+
css_variables: []
|
|
86
|
+
Label:
|
|
87
|
+
description: Non-interactive label/header for menu sections.
|
|
88
|
+
parameters:
|
|
89
|
+
- name: inset
|
|
90
|
+
type: Boolean
|
|
91
|
+
default: 'false'
|
|
92
|
+
description: The inset
|
|
93
|
+
data_attributes: []
|
|
94
|
+
css_variables: []
|
|
95
|
+
Separator:
|
|
96
|
+
description: Visual divider between menu items.
|
|
97
|
+
parameters: []
|
|
98
|
+
data_attributes: []
|
|
99
|
+
css_variables: []
|
|
100
|
+
Shortcut:
|
|
101
|
+
description: Displays keyboard shortcut hint for menu items.
|
|
102
|
+
parameters: []
|
|
103
|
+
data_attributes: []
|
|
104
|
+
css_variables: []
|
|
105
|
+
Sub:
|
|
106
|
+
description: Container for submenu within the menubar menu.
|
|
107
|
+
parameters: []
|
|
108
|
+
data_attributes: []
|
|
109
|
+
css_variables: []
|
|
110
|
+
Sub Content:
|
|
111
|
+
description: Container for submenu items.
|
|
112
|
+
parameters: []
|
|
113
|
+
data_attributes: []
|
|
114
|
+
css_variables: []
|
|
115
|
+
Sub Trigger:
|
|
116
|
+
description: Menu item that opens a submenu.
|
|
117
|
+
parameters:
|
|
118
|
+
- name: inset
|
|
119
|
+
type: Boolean
|
|
120
|
+
default: 'false'
|
|
121
|
+
description: The inset
|
|
122
|
+
- name: disabled
|
|
123
|
+
type: Boolean
|
|
124
|
+
default: 'false'
|
|
125
|
+
description: Whether the element is disabled
|
|
126
|
+
data_attributes: []
|
|
127
|
+
css_variables: []
|
|
128
|
+
Trigger:
|
|
129
|
+
description: Button that toggles the menu content open/closed.
|
|
130
|
+
parameters:
|
|
131
|
+
- name: first
|
|
132
|
+
type: Boolean
|
|
133
|
+
default: 'false'
|
|
134
|
+
description: The first
|
|
135
|
+
data_attributes: []
|
|
136
|
+
css_variables: []
|
|
137
|
+
accessibility:
|
|
138
|
+
aria_pattern: Menu Bar
|
|
139
|
+
w3c_reference: https://www.w3.org/WAI/ARIA/apg/patterns/menubar/
|
|
140
|
+
description: Implements the WAI-ARIA Menu Bar pattern with proper roles, states,
|
|
141
|
+
and keyboard navigation.
|
|
142
|
+
aria_attributes:
|
|
143
|
+
- aria-label
|
|
144
|
+
- role="menubar"
|
|
145
|
+
keyboard:
|
|
146
|
+
- key: Enter
|
|
147
|
+
description: Activates the focused element
|
|
148
|
+
- key: Space
|
|
149
|
+
description: Activates the focused element
|
|
150
|
+
- key: Escape
|
|
151
|
+
description: Closes the component
|
|
152
|
+
- key: ArrowDown
|
|
153
|
+
description: Moves focus to next item
|
|
154
|
+
- key: ArrowUp
|
|
155
|
+
description: Moves focus to previous item
|
|
156
|
+
- key: ArrowLeft
|
|
157
|
+
description: Moves focus left or decreases value
|
|
158
|
+
- key: ArrowRight
|
|
159
|
+
description: Moves focus right or increases value
|
|
160
|
+
- key: Home
|
|
161
|
+
description: Moves focus to first item
|
|
162
|
+
- key: End
|
|
163
|
+
description: Moves focus to last item
|
|
164
|
+
- key: Tab
|
|
165
|
+
description: Moves focus to next focusable element
|
|
166
|
+
javascript:
|
|
167
|
+
controller: ui--menubar
|
|
168
|
+
targets:
|
|
169
|
+
- trigger
|
|
170
|
+
- content
|
|
171
|
+
- item
|
|
172
|
+
values:
|
|
173
|
+
- name: open
|
|
174
|
+
type: Boolean
|
|
175
|
+
description: Controls open state
|
|
176
|
+
actions:
|
|
177
|
+
- initializeTriggers
|
|
178
|
+
- toggle
|
|
179
|
+
- openMenu
|
|
180
|
+
- closeAll
|
|
181
|
+
- trackHoveredItem
|
|
182
|
+
- selectItem
|
|
183
|
+
- openSubmenu
|
|
184
|
+
- openSubmenuWithAutoUpdate
|
|
185
|
+
- closeSubmenuAndCleanup
|
|
186
|
+
- closeSubmenu
|
|
187
|
+
- cancelSubmenuClose
|
|
188
|
+
- closeSiblingSubmenus
|
|
189
|
+
- teardownKeyboardNavigation
|
|
190
|
+
- navigateToNextMenu
|
|
191
|
+
- navigateToPreviousMenu
|
|
192
|
+
- openSubmenuWithKeyboard
|
|
193
|
+
- closeCurrentSubmenu
|
|
194
|
+
- activateCurrentItem
|
|
195
|
+
- toggleCheckbox
|
|
196
|
+
- selectRadio
|
|
197
|
+
events: []
|
|
198
|
+
related:
|
|
199
|
+
- dropdown_menu
|
|
200
|
+
- context_menu
|
|
201
|
+
- navigation_menu
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Menubar Menu
|
|
3
|
+
slug: menubar_menu
|
|
4
|
+
category: other
|
|
5
|
+
description: Menu - Phlex implementation
|
|
6
|
+
anatomy:
|
|
7
|
+
- name: Menubar Menu
|
|
8
|
+
description: Wrapper for each top-level menu in the menubar.
|
|
9
|
+
required: true
|
|
10
|
+
features:
|
|
11
|
+
- Custom styling with Tailwind classes
|
|
12
|
+
api:
|
|
13
|
+
Menubar Menu:
|
|
14
|
+
description: Wrapper for each top-level menu in the menubar.
|
|
15
|
+
parameters:
|
|
16
|
+
- name: value
|
|
17
|
+
type: String
|
|
18
|
+
default: nil
|
|
19
|
+
description: The current value
|
|
20
|
+
data_attributes: []
|
|
21
|
+
css_variables: []
|