|
| 1 | +import { |
| 2 | + EMPHASIS_TYPE, |
| 3 | + DISABLED_STATE, |
| 4 | + LOADING_STATE, |
| 5 | + COMPACT_VARIATION, |
| 6 | + PADDED_VARIATION, |
| 7 | + FLOATED_VARIATION, |
| 8 | + HORIZONTAL_ALIGNED_VARIATION, |
| 9 | +} from '@semantic-ui/specs'; |
| 10 | + |
| 11 | +export default { |
| 12 | + uiType: 'element', |
| 13 | + name: 'Segment', |
| 14 | + description: 'A segment is used to create a grouping of related content', |
| 15 | + tagName: 'ui-segment', |
| 16 | + exportName: 'UISegment', |
| 17 | + |
| 18 | + content: [], |
| 19 | + |
| 20 | + types: [ |
| 21 | + EMPHASIS_TYPE, |
| 22 | + { |
| 23 | + name: 'Vertical', |
| 24 | + attribute: 'vertical', |
| 25 | + description: 'format content to be aligned as part of a vertical group', |
| 26 | + usageLevel: 2, |
| 27 | + }, |
| 28 | + { |
| 29 | + name: 'Raised', |
| 30 | + attribute: 'raised', |
| 31 | + description: 'be formatted to raise above the page', |
| 32 | + usageLevel: 3, |
| 33 | + }, |
| 34 | + { |
| 35 | + name: 'Stacked', |
| 36 | + attribute: 'stacked', |
| 37 | + description: 'be formatted to show it contains multiple pages', |
| 38 | + usageLevel: 5, |
| 39 | + }, |
| 40 | + { |
| 41 | + name: 'Piled', |
| 42 | + attribute: 'piled', |
| 43 | + description: 'be formatted to look like a pile of pages', |
| 44 | + usageLevel: 5, |
| 45 | + }, |
| 46 | + ], |
| 47 | + |
| 48 | + states: [ |
| 49 | + { |
| 50 | + name: 'Disabled', |
| 51 | + attribute: 'disabled', |
| 52 | + description: 'show its content is disabled', |
| 53 | + usageLevel: 2, |
| 54 | + }, |
| 55 | + { |
| 56 | + name: 'Loading', |
| 57 | + attribute: 'loading', |
| 58 | + description: 'show its content is being loaded', |
| 59 | + usageLevel: 2, |
| 60 | + }, |
| 61 | + ], |
| 62 | + |
| 63 | + variations: [ |
| 64 | + { |
| 65 | + name: 'Attached', |
| 66 | + attribute: 'attached', |
| 67 | + description: 'be attached to other content on a page', |
| 68 | + includeAttributeClass: true, |
| 69 | + options: [ |
| 70 | + { |
| 71 | + name: 'Top Attached', |
| 72 | + value: 'top-attached', |
| 73 | + description: 'be attached on top side only', |
| 74 | + }, |
| 75 | + { |
| 76 | + name: 'Attached', |
| 77 | + value: 'attached', |
| 78 | + description: 'be attached on both sides', |
| 79 | + }, |
| 80 | + { |
| 81 | + name: 'Bottom Attached', |
| 82 | + value: 'bottom-attached', |
| 83 | + description: 'be attached on bottom side only', |
| 84 | + }, |
| 85 | + ], |
| 86 | + usageLevel: 2, |
| 87 | + }, |
| 88 | + PADDED_VARIATION, |
| 89 | + { |
| 90 | + name: 'Inline', |
| 91 | + attribute: 'inline', |
| 92 | + usageLevel: 3, |
| 93 | + description: 'can appear inline', |
| 94 | + }, |
| 95 | + COMPACT_VARIATION, |
| 96 | + { |
| 97 | + name: 'Colored', |
| 98 | + attribute: 'color', |
| 99 | + description: 'be colored', |
| 100 | + includeAttributeClass: true, |
| 101 | + options: [ |
| 102 | + { name: 'Red', value: 'red' }, |
| 103 | + { name: 'Orange', value: 'orange' }, |
| 104 | + { name: 'Yellow', value: 'yellow' }, |
| 105 | + { name: 'Olive', value: 'olive' }, |
| 106 | + { name: 'Green', value: 'green' }, |
| 107 | + { name: 'Teal', value: 'teal' }, |
| 108 | + { name: 'Blue', value: 'blue' }, |
| 109 | + { name: 'Violet', value: 'violet' }, |
| 110 | + { name: 'Purple', value: 'purple' }, |
| 111 | + { name: 'Pink', value: 'pink' }, |
| 112 | + { name: 'Brown', value: 'brown' }, |
| 113 | + { name: 'Grey', value: 'grey' }, |
| 114 | + { name: 'Black', value: 'black' }, |
| 115 | + ], |
| 116 | + usageLevel: 2, |
| 117 | + }, |
| 118 | + { |
| 119 | + name: 'Circular', |
| 120 | + attribute: 'circular', |
| 121 | + description: 'be circular', |
| 122 | + usageLevel: 3, |
| 123 | + }, |
| 124 | + { |
| 125 | + name: 'Clearing', |
| 126 | + attribute: 'clearing', |
| 127 | + description: 'clear floated content', |
| 128 | + usageLevel: 3, |
| 129 | + }, |
| 130 | + FLOATED_VARIATION, |
| 131 | + HORIZONTAL_ALIGNED_VARIATION, |
| 132 | + { |
| 133 | + name: 'Basic', |
| 134 | + attribute: 'basic', |
| 135 | + description: 'have no special formatting', |
| 136 | + usageLevel: 2, |
| 137 | + }, |
| 138 | + ], |
| 139 | + |
| 140 | + events: [], |
| 141 | + settings: [], |
| 142 | + |
| 143 | + supportsPlural: true, |
| 144 | + pluralName: 'Segments', |
| 145 | + pluralTagName: 'ui-segments', |
| 146 | + pluralExportName: 'UISegments', |
| 147 | + pluralDescription: 'Segments can be grouped together', |
| 148 | + |
| 149 | + pluralContent: [], |
| 150 | + |
| 151 | + pluralSharedTypes: ['raised', 'stacked', 'piled'], |
| 152 | + |
| 153 | + pluralOnlyTypes: [ |
| 154 | + { |
| 155 | + name: 'Horizontal', |
| 156 | + attribute: 'horizontal', |
| 157 | + description: 'be arranged horizontally', |
| 158 | + usageLevel: 3, |
| 159 | + }, |
| 160 | + ], |
| 161 | + |
| 162 | + pluralSharedVariations: ['compact', 'basic'], |
| 163 | + |
| 164 | + pluralOnlyVariations: [], |
| 165 | + |
| 166 | + examples: { |
| 167 | + defaultAttributes: {}, |
| 168 | + defaultPluralContent: `<ui-segment>First</ui-segment> |
| 169 | +<ui-segment>Second</ui-segment> |
| 170 | +<ui-segment>Third</ui-segment>`, |
| 171 | + }, |
| 172 | +}; |
0 commit comments