@cooperco/cooper-component-library 0.0.10 → 0.1.1

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.
Files changed (181) hide show
  1. package/dist/component-lib.js +6960 -0
  2. package/dist/component-lib.umd.cjs +98 -0
  3. package/dist/style.css +1 -0
  4. package/dist/vite.svg +16 -0
  5. package/package.json +93 -84
  6. package/src/assets/fonts/GT-Walsheim-Bold.woff +0 -0
  7. package/src/assets/fonts/GT-Walsheim-Bold.woff2 +0 -0
  8. package/src/assets/fonts/GT-Walsheim-LC-Bold.woff +0 -0
  9. package/src/assets/fonts/GT-Walsheim-LC-Bold.woff2 +0 -0
  10. package/src/assets/fonts/GT-Walsheim-LC-Regular.woff +0 -0
  11. package/src/assets/fonts/GT-Walsheim-LC-Regular.woff2 +0 -0
  12. package/src/assets/fonts/GT-Walsheim-Medium.woff +0 -0
  13. package/src/assets/fonts/GT-Walsheim-Medium.woff2 +0 -0
  14. package/src/assets/fonts/GT-Walsheim-Regular.woff +0 -0
  15. package/src/assets/fonts/GT-Walsheim-Regular.woff2 +0 -0
  16. package/src/assets/fonts/fonts.scss +60 -0
  17. package/src/assets/fonts/notosanssc-bold-webfont.woff +0 -0
  18. package/src/assets/fonts/notosanssc-bold-webfont.woff2 +0 -0
  19. package/src/assets/fonts/notosanssc-regular-webfont.woff +0 -0
  20. package/src/assets/fonts/notosanssc-regular-webfont.woff2 +0 -0
  21. package/src/assets/main.css +18 -114
  22. package/src/assets/theme.css +5 -1
  23. package/src/components/{types → Accordion}/Accordion.ts +8 -6
  24. package/src/components/Accordion/Accordion.vue +66 -0
  25. package/src/components/Accordion/AccordionItem.ts +25 -0
  26. package/src/components/Accordion/AccordionItem.vue +104 -0
  27. package/src/components/{AccordionItem.vue → Accordion/AccordionListItem.vue} +22 -14
  28. package/src/components/Accordion/AccordionTileItem.vue +75 -0
  29. package/src/components/CTA/CTA.ts +22 -0
  30. package/src/components/CTA/CTA.vue +65 -0
  31. package/src/components/CarouselModule/CarouselModule.ts +20 -0
  32. package/src/components/{CarouselModule.vue → CarouselModule/CarouselModule.vue} +25 -7
  33. package/src/components/ContainerCollectionModule/ContainerCollectionModule.ts +12 -0
  34. package/src/components/{ContainerCollectionModule.vue → ContainerCollectionModule/ContainerCollectionModule.vue} +12 -3
  35. package/src/components/ContainerModule/ContainerModule.ts +69 -0
  36. package/src/components/{ContainerModule.vue → ContainerModule/ContainerModule.vue} +33 -36
  37. package/src/components/ContentModule/ContentModule.ts +31 -0
  38. package/src/components/ContentModule/ContentModule.vue +65 -0
  39. package/src/components/{types → FooterNavigation}/FooterNavigation.ts +3 -2
  40. package/src/components/{FooterNavigation.vue → FooterNavigation/FooterNavigation.vue} +4 -2
  41. package/src/components/Image/Image.vue +17 -0
  42. package/src/components/{types → LogoCollectionModule}/LogoCollectionModule.ts +3 -3
  43. package/src/components/{LogoCollectionModule.vue → LogoCollectionModule/LogoCollectionModule.vue} +13 -3
  44. package/src/components/{types → NavigationElement}/NavigationElement.ts +6 -3
  45. package/src/components/{NavigationElement.vue → NavigationElement/NavigationElement.vue} +18 -9
  46. package/src/components/{types → PrimaryNavigation}/PrimaryNavigation.ts +2 -2
  47. package/src/components/{PrimaryNavigation.vue → PrimaryNavigation/PrimaryNavigation.vue} +7 -4
  48. package/src/components/{types → SplitModule}/SplitModule.ts +6 -5
  49. package/src/components/SplitModule/SplitModule.vue +57 -0
  50. package/src/components/TestimonialModule/TestimonialModule.ts +22 -0
  51. package/src/components/TestimonialModule/TestimonialModule.vue +51 -0
  52. package/src/components/TileCollectionModule/TileCollectionModule.ts +18 -0
  53. package/src/components/TileCollectionModule/TileCollectionModule.vue +58 -0
  54. package/src/components/TileContent/TileContent.ts +60 -0
  55. package/src/components/{TileContent.vue → TileContent/TileContent.vue} +25 -14
  56. package/src/components/TileContent/TileContentIconTile.vue +83 -0
  57. package/src/components/TileContent/TileContentImageStackedAnimatedTile.vue +121 -0
  58. package/src/components/TileContent/TileContentImageTile.vue +80 -0
  59. package/src/components/TileContent/TileContentTextTile.vue +63 -0
  60. package/src/components/TileContent/TileContentVideoTile.vue +81 -0
  61. package/src/components/{types → Video}/Video.ts +1 -1
  62. package/src/components/{Video.vue → Video/Video.vue} +1 -1
  63. package/src/config/defaultPassthrough.ts +261 -0
  64. package/src/assets/usercard.jpg +0 -0
  65. package/src/assets/vue.svg +0 -1
  66. package/src/components/Accordion.vue +0 -33
  67. package/src/components/CTA.vue +0 -39
  68. package/src/components/ContentAndImage.vue +0 -34
  69. package/src/components/ContentMediaModule.vue +0 -50
  70. package/src/components/ContentModule.vue +0 -51
  71. package/src/components/IconChevron.vue +0 -107
  72. package/src/components/Image.vue +0 -15
  73. package/src/components/LogoContainerModule.vue +0 -30
  74. package/src/components/SplitModule.vue +0 -42
  75. package/src/components/Testimonial.vue +0 -48
  76. package/src/components/TestimonialModule.vue +0 -48
  77. package/src/components/TileCollection.vue +0 -37
  78. package/src/components/TileCollectionModule.vue +0 -45
  79. package/src/components/types/AccordionItem.ts +0 -19
  80. package/src/components/types/CTA.ts +0 -13
  81. package/src/components/types/CarouselModule.ts +0 -21
  82. package/src/components/types/ContainerCollectionModule.ts +0 -12
  83. package/src/components/types/ContainerModule.ts +0 -35
  84. package/src/components/types/ContentAndImage.ts +0 -14
  85. package/src/components/types/ContentMediaModule.ts +0 -14
  86. package/src/components/types/ContentModule.ts +0 -21
  87. package/src/components/types/LogoContainerModule.ts +0 -12
  88. package/src/components/types/Testimonial.ts +0 -17
  89. package/src/components/types/TileCollection.ts +0 -14
  90. package/src/components/types/TileContent.ts +0 -34
  91. package/src/components/types/index.ts +0 -10
  92. package/src/presets/aura/accordion/index.js +0 -81
  93. package/src/presets/aura/autocomplete/index.js +0 -280
  94. package/src/presets/aura/avatar/index.js +0 -46
  95. package/src/presets/aura/badge/index.js +0 -43
  96. package/src/presets/aura/badgedirective/index.js +0 -49
  97. package/src/presets/aura/blockui/index.js +0 -8
  98. package/src/presets/aura/breadcrumb/index.js +0 -63
  99. package/src/presets/aura/button/index.js +0 -511
  100. package/src/presets/aura/calendar/index.js +0 -702
  101. package/src/presets/aura/card/index.js +0 -53
  102. package/src/presets/aura/carousel/index.js +0 -160
  103. package/src/presets/aura/cascadeselect/index.js +0 -220
  104. package/src/presets/aura/checkbox/index.js +0 -107
  105. package/src/presets/aura/chip/index.js +0 -45
  106. package/src/presets/aura/chips/index.js +0 -126
  107. package/src/presets/aura/colorpicker/index.js +0 -132
  108. package/src/presets/aura/confirmpopup/index.js +0 -111
  109. package/src/presets/aura/contextmenu/index.js +0 -132
  110. package/src/presets/aura/datatable/index.js +0 -1290
  111. package/src/presets/aura/dataview/index.js +0 -40
  112. package/src/presets/aura/deferred/index.js +0 -3
  113. package/src/presets/aura/dialog/index.js +0 -250
  114. package/src/presets/aura/divider/index.js +0 -72
  115. package/src/presets/aura/dock/index.js +0 -97
  116. package/src/presets/aura/dropdown/index.js +0 -297
  117. package/src/presets/aura/fieldset/index.js +0 -95
  118. package/src/presets/aura/fileupload/index.js +0 -175
  119. package/src/presets/aura/floatlabel/index.js +0 -26
  120. package/src/presets/aura/galleria/index.js +0 -353
  121. package/src/presets/aura/global.js +0 -90
  122. package/src/presets/aura/iconfield/index.js +0 -22
  123. package/src/presets/aura/image/index.js +0 -206
  124. package/src/presets/aura/index.js +0 -181
  125. package/src/presets/aura/inlinemessage/index.js +0 -46
  126. package/src/presets/aura/inplace/index.js +0 -27
  127. package/src/presets/aura/inputgroup/index.js +0 -5
  128. package/src/presets/aura/inputgroupaddon/index.js +0 -28
  129. package/src/presets/aura/inputmask/index.js +0 -47
  130. package/src/presets/aura/inputnumber/index.js +0 -293
  131. package/src/presets/aura/inputotp/index.js +0 -69
  132. package/src/presets/aura/inputswitch/index.js +0 -94
  133. package/src/presets/aura/inputtext/index.js +0 -63
  134. package/src/presets/aura/knob/index.js +0 -47
  135. package/src/presets/aura/listbox/index.js +0 -158
  136. package/src/presets/aura/megamenu/index.js +0 -206
  137. package/src/presets/aura/menu/index.js +0 -122
  138. package/src/presets/aura/menubar/index.js +0 -184
  139. package/src/presets/aura/message/index.js +0 -112
  140. package/src/presets/aura/metergroup/index.js +0 -110
  141. package/src/presets/aura/multiselect/index.js +0 -579
  142. package/src/presets/aura/orderlist/index.js +0 -281
  143. package/src/presets/aura/organizationchart/index.js +0 -142
  144. package/src/presets/aura/overlaypanel/index.js +0 -34
  145. package/src/presets/aura/paginator/index.js +0 -566
  146. package/src/presets/aura/panel/index.js +0 -102
  147. package/src/presets/aura/panelmenu/index.js +0 -130
  148. package/src/presets/aura/password/index.js +0 -143
  149. package/src/presets/aura/picklist/index.js +0 -718
  150. package/src/presets/aura/progressbar/index.js +0 -64
  151. package/src/presets/aura/progressspinner/index.js +0 -51
  152. package/src/presets/aura/radiobutton/index.js +0 -121
  153. package/src/presets/aura/rating/index.js +0 -95
  154. package/src/presets/aura/ripple/index.js +0 -6
  155. package/src/presets/aura/scrollpanel/index.js +0 -77
  156. package/src/presets/aura/scrolltop/index.js +0 -45
  157. package/src/presets/aura/selectbutton/index.js +0 -66
  158. package/src/presets/aura/sidebar/index.js +0 -160
  159. package/src/presets/aura/skeleton/index.js +0 -19
  160. package/src/presets/aura/slider/index.js +0 -144
  161. package/src/presets/aura/speeddial/index.js +0 -579
  162. package/src/presets/aura/splitbutton/index.js +0 -1185
  163. package/src/presets/aura/splitter/index.js +0 -71
  164. package/src/presets/aura/stepper/index.js +0 -183
  165. package/src/presets/aura/steps/index.js +0 -117
  166. package/src/presets/aura/tabmenu/index.js +0 -75
  167. package/src/presets/aura/tabview/index.js +0 -162
  168. package/src/presets/aura/tag/index.js +0 -44
  169. package/src/presets/aura/terminal/index.js +0 -60
  170. package/src/presets/aura/textarea/index.js +0 -49
  171. package/src/presets/aura/tieredmenu/index.js +0 -125
  172. package/src/presets/aura/timeline/index.js +0 -114
  173. package/src/presets/aura/toast/index.js +0 -151
  174. package/src/presets/aura/togglebutton/index.js +0 -98
  175. package/src/presets/aura/toolbar/index.js +0 -28
  176. package/src/presets/aura/tooltip/index.js +0 -73
  177. package/src/presets/aura/tree/index.js +0 -294
  178. package/src/presets/aura/treeselect/index.js +0 -404
  179. package/src/presets/aura/treetable/index.js +0 -513
  180. package/src/presets/aura/tristatecheckbox/index.js +0 -121
  181. /package/src/components/{types → Image}/Image.ts +0 -0
@@ -1,144 +0,0 @@
1
- export default {
2
- root: ({ props }) => ({
3
- class: [
4
- 'relative',
5
-
6
- // Size
7
- {
8
- 'h-[3px]': props.orientation == 'horizontal',
9
- 'w-[3px]': props.orientation == 'vertical',
10
- },
11
-
12
- // Shape
13
- 'border-0',
14
- 'rounded-md',
15
-
16
- // Colors
17
- 'bg-surface-200 dark:bg-surface-800',
18
-
19
- // States
20
- {
21
- 'opacity-60 select-none pointer-events-none cursor-default':
22
- props.disabled,
23
- },
24
- ],
25
- }),
26
- range: ({ props }) => ({
27
- class: [
28
- // Position
29
- 'block absolute',
30
- {
31
- 'top-0 left-0': props.orientation == 'horizontal',
32
- 'bottom-0 left-0': props.orientation == 'vertical',
33
- },
34
-
35
- //Size
36
- {
37
- 'h-full': props.orientation == 'horizontal',
38
- 'w-full': props.orientation == 'vertical',
39
- },
40
-
41
- // Shape
42
- 'rounded-md',
43
-
44
- // Colors
45
- 'bg-primary',
46
- ],
47
- }),
48
- handle: ({ props }) => ({
49
- class: [
50
- 'flex items-center justify-center',
51
-
52
- // Size
53
- 'h-[20px]',
54
- 'w-[20px]',
55
- {
56
- 'top-[50%] -mt-[10px] -ml-[10px]': props.orientation == 'horizontal',
57
- 'left-[50%] -mb-[10px] -ml-[10px]': props.orientation == 'vertical',
58
- },
59
-
60
- // Shape
61
- 'rounded-full',
62
-
63
- 'before:block before:w-[16px] before:h-[16px] before:rounded-full before:bg-surface-0 dark:before:bg-surface-950 before:shadow-md',
64
-
65
- // Colors
66
- 'bg-surface-200 dark:bg-surface-800',
67
-
68
- // States
69
- 'focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring-1',
70
- 'ring-primary-500 dark:ring-primary-400',
71
-
72
- // Transitions
73
- 'transition duration-200',
74
-
75
- // Misc
76
- 'cursor-grab',
77
- 'touch-action-none',
78
- ],
79
- }),
80
- starthandler: ({ props }) => ({
81
- class: [
82
- 'flex items-center justify-center',
83
-
84
- // Size
85
- 'h-[20px]',
86
- 'w-[20px]',
87
- {
88
- 'top-[50%] -mt-[10px] -ml-[10px]': props.orientation == 'horizontal',
89
- 'left-[50%] -mb-[10px] -ml-[10px]': props.orientation == 'vertical',
90
- },
91
-
92
- // Shape
93
- 'rounded-full',
94
-
95
- 'before:block before:w-[16px] before:h-[16px] before:rounded-full before:bg-surface-0 dark:before:bg-surface-950 before:shadow-md',
96
-
97
- // Colors
98
- 'bg-surface-200 dark:bg-surface-800',
99
-
100
- // States
101
- 'focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring-1',
102
- 'ring-primary-500 dark:ring-primary-400',
103
-
104
- // Transitions
105
- 'transition duration-200',
106
-
107
- // Misc
108
- 'cursor-grab',
109
- 'touch-action-none',
110
- ],
111
- }),
112
- endhandler: ({ props }) => ({
113
- class: [
114
- 'flex items-center justify-center',
115
-
116
- // Size
117
- 'h-[20px]',
118
- 'w-[20px]',
119
- {
120
- 'top-[50%] -mt-[10px] -ml-[10px]': props.orientation == 'horizontal',
121
- 'left-[50%] -mb-[10px] -ml-[10px]': props.orientation == 'vertical',
122
- },
123
-
124
- // Shape
125
- 'rounded-full',
126
-
127
- 'before:block before:w-[16px] before:h-[16px] before:rounded-full before:bg-surface-0 dark:before:bg-surface-950 before:shadow-md',
128
-
129
- // Colors
130
- 'bg-surface-200 dark:bg-surface-800',
131
-
132
- // States
133
- 'focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring-1',
134
- 'ring-primary-500 dark:ring-primary-400',
135
-
136
- // Transitions
137
- 'transition duration-200',
138
-
139
- // Misc
140
- 'cursor-grab',
141
- 'touch-action-none',
142
- ],
143
- }),
144
- }
@@ -1,579 +0,0 @@
1
- export default {
2
- root: {
3
- class: 'absolute flex',
4
- },
5
- button: {
6
- root: ({ props, context, parent }) => ({
7
- class: [
8
- 'relative',
9
- 'z-20',
10
-
11
- // Alignments
12
- 'items-center inline-flex text-center align-bottom justify-center',
13
-
14
- // Sizes & Spacing
15
- 'leading-[normal]',
16
- 'w-10 h-10 p-0 py-2',
17
-
18
- // Shapes
19
- 'rounded-full',
20
- 'shadow-md',
21
- // Link Button
22
- { 'text-primary-600 bg-transparent border-transparent': props.link },
23
-
24
- // Plain Button
25
- {
26
- 'text-white bg-gray-500 border border-gray-500':
27
- props.plain && !props.outlined && !props.text,
28
- },
29
- // Plain Text Button
30
- { 'text-surface-500': props.plain && props.text },
31
- // Plain Outlined Button
32
- {
33
- 'text-surface-500 border border-gray-500':
34
- props.plain && props.outlined,
35
- },
36
-
37
- // Text Button
38
- { 'bg-transparent border-transparent': props.text && !props.plain },
39
-
40
- // Outlined Button
41
- { 'bg-transparent border': props.outlined && !props.plain },
42
-
43
- // --- Severity Buttons ---
44
-
45
- // Primary Button
46
- {
47
- 'text-primary-inverse':
48
- !props.link &&
49
- props.severity === null &&
50
- !props.text &&
51
- !props.outlined &&
52
- !props.plain,
53
- 'bg-primary':
54
- !props.link &&
55
- props.severity === null &&
56
- !props.text &&
57
- !props.outlined &&
58
- !props.plain,
59
- 'border border-primary':
60
- !props.link &&
61
- props.severity === null &&
62
- !props.text &&
63
- !props.outlined &&
64
- !props.plain,
65
- },
66
- // Primary Text Button
67
- {
68
- 'text-primary': props.text && props.severity === null && !props.plain,
69
- },
70
- // Primary Outlined Button
71
- {
72
- 'text-primary border border-primary':
73
- props.outlined && props.severity === null && !props.plain,
74
- },
75
-
76
- // Secondary Button
77
- {
78
- 'text-surface-900 dark:text-white':
79
- props.severity === 'secondary' &&
80
- !props.text &&
81
- !props.outlined &&
82
- !props.plain,
83
- 'bg-surface-100 dark:bg-surface-700':
84
- props.severity === 'secondary' &&
85
- !props.text &&
86
- !props.outlined &&
87
- !props.plain,
88
- 'border border-surface-100 dark:border-surface-700':
89
- props.severity === 'secondary' &&
90
- !props.text &&
91
- !props.outlined &&
92
- !props.plain,
93
- },
94
- // Secondary Text Button
95
- {
96
- 'text-surface-500 dark:text-surface-300':
97
- props.text && props.severity === 'secondary' && !props.plain,
98
- },
99
- // Secondary Outlined Button
100
- {
101
- 'text-surface-500 dark:text-surface-300 border border-surface-500 hover:bg-surface-300/10':
102
- props.outlined && props.severity === 'secondary' && !props.plain,
103
- },
104
-
105
- // Success Button
106
- {
107
- 'text-white dark:text-green-900':
108
- props.severity === 'success' &&
109
- !props.text &&
110
- !props.outlined &&
111
- !props.plain,
112
- 'bg-green-500 dark:bg-green-400':
113
- props.severity === 'success' &&
114
- !props.text &&
115
- !props.outlined &&
116
- !props.plain,
117
- 'border border-green-500 dark:border-green-400':
118
- props.severity === 'success' &&
119
- !props.text &&
120
- !props.outlined &&
121
- !props.plain,
122
- },
123
- // Success Text Button
124
- {
125
- 'text-green-500 dark:text-green-400':
126
- props.text && props.severity === 'success' && !props.plain,
127
- },
128
- // Success Outlined Button
129
- {
130
- 'text-green-500 border border-green-500 hover:bg-green-300/10':
131
- props.outlined && props.severity === 'success' && !props.plain,
132
- },
133
-
134
- // Info Button
135
- {
136
- 'text-white dark:text-surface-900':
137
- props.severity === 'info' &&
138
- !props.text &&
139
- !props.outlined &&
140
- !props.plain,
141
- 'bg-blue-500 dark:bg-blue-400':
142
- props.severity === 'info' &&
143
- !props.text &&
144
- !props.outlined &&
145
- !props.plain,
146
- 'border border-blue-500 dark:border-blue-400':
147
- props.severity === 'info' &&
148
- !props.text &&
149
- !props.outlined &&
150
- !props.plain,
151
- },
152
- // Info Text Button
153
- {
154
- 'text-blue-500 dark:text-blue-400':
155
- props.text && props.severity === 'info' && !props.plain,
156
- },
157
- // Info Outlined Button
158
- {
159
- 'text-blue-500 border border-blue-500 hover:bg-blue-300/10 ':
160
- props.outlined && props.severity === 'info' && !props.plain,
161
- },
162
-
163
- // Warning Button
164
- {
165
- 'text-white dark:text-surface-900':
166
- props.severity === 'warning' &&
167
- !props.text &&
168
- !props.outlined &&
169
- !props.plain,
170
- 'bg-orange-500 dark:bg-orange-400':
171
- props.severity === 'warning' &&
172
- !props.text &&
173
- !props.outlined &&
174
- !props.plain,
175
- 'border border-orange-500 dark:border-orange-400':
176
- props.severity === 'warning' &&
177
- !props.text &&
178
- !props.outlined &&
179
- !props.plain,
180
- },
181
- // Warning Text Button
182
- {
183
- 'text-orange-500 dark:text-orange-400':
184
- props.text && props.severity === 'warning' && !props.plain,
185
- },
186
- // Warning Outlined Button
187
- {
188
- 'text-orange-500 border border-orange-500 hover:bg-orange-300/10':
189
- props.outlined && props.severity === 'warning' && !props.plain,
190
- },
191
-
192
- // Help Button
193
- {
194
- 'text-white dark:text-surface-900':
195
- props.severity === 'help' &&
196
- !props.text &&
197
- !props.outlined &&
198
- !props.plain,
199
- 'bg-purple-500 dark:bg-purple-400':
200
- props.severity === 'help' &&
201
- !props.text &&
202
- !props.outlined &&
203
- !props.plain,
204
- 'border border-purple-500 dark:border-purple-400':
205
- props.severity === 'help' &&
206
- !props.text &&
207
- !props.outlined &&
208
- !props.plain,
209
- },
210
- // Help Text Button
211
- {
212
- 'text-purple-500 dark:text-purple-400':
213
- props.text && props.severity === 'help' && !props.plain,
214
- },
215
- // Help Outlined Button
216
- {
217
- 'text-purple-500 border border-purple-500 hover:bg-purple-300/10':
218
- props.outlined && props.severity === 'help' && !props.plain,
219
- },
220
-
221
- // Danger Button
222
- {
223
- 'text-white dark:text-surface-900':
224
- props.severity === 'danger' &&
225
- !props.text &&
226
- !props.outlined &&
227
- !props.plain,
228
- 'bg-red-500 dark:bg-red-400':
229
- props.severity === 'danger' &&
230
- !props.text &&
231
- !props.outlined &&
232
- !props.plain,
233
- 'border border-red-500 dark:border-red-400':
234
- props.severity === 'danger' &&
235
- !props.text &&
236
- !props.outlined &&
237
- !props.plain,
238
- },
239
- // Danger Text Button
240
- {
241
- 'text-red-500 dark:text-red-400':
242
- props.text && props.severity === 'danger' && !props.plain,
243
- },
244
- // Danger Outlined Button
245
- {
246
- 'text-red-500 border border-red-500 hover:bg-red-300/10':
247
- props.outlined && props.severity === 'danger' && !props.plain,
248
- },
249
-
250
- // Contrast Button
251
- {
252
- 'text-white dark:text-surface-900':
253
- props.severity === 'contrast' &&
254
- !props.text &&
255
- !props.outlined &&
256
- !props.plain,
257
- 'bg-surface-900 dark:bg-surface-0':
258
- props.severity === 'contrast' &&
259
- !props.text &&
260
- !props.outlined &&
261
- !props.plain,
262
- 'border border-surface-900 dark:border-surface-0':
263
- props.severity === 'contrast' &&
264
- !props.text &&
265
- !props.outlined &&
266
- !props.plain,
267
- },
268
- // Contrast Text Button
269
- {
270
- 'text-surface-900 dark:text-surface-0':
271
- props.text && props.severity === 'contrast' && !props.plain,
272
- },
273
- // Contrast Outlined Button
274
- {
275
- 'text-surface-900 dark:text-surface-0 border border-surface-900 dark:border-surface-0':
276
- props.outlined && props.severity === 'contrast' && !props.plain,
277
- },
278
-
279
- // --- Severity Button States ---
280
- 'focus:outline-none focus:outline-offset-0 focus:ring-1',
281
-
282
- // Link
283
- { 'focus:ring-primary': props.link },
284
-
285
- // Plain
286
- {
287
- 'hover:bg-gray-600 hover:border-gray-600':
288
- props.plain && !props.outlined && !props.text,
289
- },
290
- // Text & Outlined Button
291
- {
292
- 'hover:bg-surface-300/10':
293
- props.plain && (props.text || props.outlined),
294
- },
295
-
296
- // Primary
297
- {
298
- 'hover:bg-primary-hover hover:border-primary-hover':
299
- !props.link &&
300
- props.severity === null &&
301
- !props.text &&
302
- !props.outlined &&
303
- !props.plain,
304
- },
305
- { 'focus:ring-primary': props.severity === null },
306
- // Text & Outlined Button
307
- {
308
- 'hover:bg-primary-300/10':
309
- (props.text || props.outlined) &&
310
- props.severity === null &&
311
- !props.plain,
312
- },
313
-
314
- // Secondary
315
- {
316
- 'hover:bg-surface-200 dark:hover:bg-surface-600 hover:border-surface-200 dark:hover:border-surface-600':
317
- props.severity === 'secondary' &&
318
- !props.text &&
319
- !props.outlined &&
320
- !props.plain,
321
- },
322
- {
323
- 'focus:ring-surface-500 dark:focus:ring-surface-400':
324
- props.severity === 'secondary',
325
- },
326
- // Text & Outlined Button
327
- {
328
- 'hover:bg-surface-300/10':
329
- (props.text || props.outlined) &&
330
- props.severity === 'secondary' &&
331
- !props.plain,
332
- },
333
-
334
- // Success
335
- {
336
- 'hover:bg-green-600 dark:hover:bg-green-300 hover:border-green-600 dark:hover:border-green-300':
337
- props.severity === 'success' &&
338
- !props.text &&
339
- !props.outlined &&
340
- !props.plain,
341
- },
342
- {
343
- 'focus:ring-green-500 dark:focus:ring-green-400':
344
- props.severity === 'success',
345
- },
346
- // Text & Outlined Button
347
- {
348
- 'hover:bg-green-300/10':
349
- (props.text || props.outlined) &&
350
- props.severity === 'success' &&
351
- !props.plain,
352
- },
353
-
354
- // Info
355
- {
356
- 'hover:bg-blue-600 dark:hover:bg-blue-300 hover:border-blue-600 dark:hover:border-blue-300':
357
- props.severity === 'info' &&
358
- !props.text &&
359
- !props.outlined &&
360
- !props.plain,
361
- },
362
- {
363
- 'focus:ring-blue-500 dark:focus:ring-blue-400':
364
- props.severity === 'info',
365
- },
366
- // Text & Outlined Button
367
- {
368
- 'hover:bg-blue-300/10':
369
- (props.text || props.outlined) &&
370
- props.severity === 'info' &&
371
- !props.plain,
372
- },
373
-
374
- // Warning
375
- {
376
- 'hover:bg-orange-600 dark:hover:bg-orange-300 hover:border-orange-600 dark:hover:border-orange-300':
377
- props.severity === 'warning' &&
378
- !props.text &&
379
- !props.outlined &&
380
- !props.plain,
381
- },
382
- {
383
- 'focus:ring-orange-500 dark:focus:ring-orange-400':
384
- props.severity === 'warning',
385
- },
386
- // Text & Outlined Button
387
- {
388
- 'hover:bg-orange-300/10':
389
- (props.text || props.outlined) &&
390
- props.severity === 'warning' &&
391
- !props.plain,
392
- },
393
-
394
- // Help
395
- {
396
- 'hover:bg-purple-600 dark:hover:bg-purple-300 hover:border-purple-600 dark:hover:border-purple-300':
397
- props.severity === 'help' &&
398
- !props.text &&
399
- !props.outlined &&
400
- !props.plain,
401
- },
402
- {
403
- 'focus:ring-purple-500 dark:focus:ring-purple-400':
404
- props.severity === 'help',
405
- },
406
- // Text & Outlined Button
407
- {
408
- 'hover:bg-purple-300/10':
409
- (props.text || props.outlined) &&
410
- props.severity === 'help' &&
411
- !props.plain,
412
- },
413
-
414
- // Danger
415
- {
416
- 'hover:bg-red-600 dark:hover:bg-red-300 hover:border-red-600 dark:hover:border-red-300':
417
- props.severity === 'danger' &&
418
- !props.text &&
419
- !props.outlined &&
420
- !props.plain,
421
- },
422
- {
423
- 'focus:ring-red-500 dark:focus:ring-red-400':
424
- props.severity === 'danger',
425
- },
426
- // Text & Outlined Button
427
- {
428
- 'hover:bg-red-300/10':
429
- (props.text || props.outlined) &&
430
- props.severity === 'danger' &&
431
- !props.plain,
432
- },
433
-
434
- // Contrast
435
- {
436
- 'hover:bg-surface-800 dark:hover:bg-surface-100 hover:border-surface-800 dark:hover:border-surface-100':
437
- props.severity === 'contrast' &&
438
- !props.text &&
439
- !props.outlined &&
440
- !props.plain,
441
- },
442
- {
443
- 'focus:ring-surface-500 dark:focus:ring-surface-400':
444
- props.severity === 'contrast',
445
- },
446
- // Text & Outlined Button
447
- {
448
- 'hover:bg-surface-900/10 dark:hover:bg-[rgba(255,255,255,0.03)]':
449
- (props.text || props.outlined) &&
450
- props.severity === 'contrast' &&
451
- !props.plain,
452
- },
453
-
454
- // Disabled
455
- { 'opacity-60 pointer-events-none cursor-default': context.disabled },
456
-
457
- // Transitions
458
- 'transition duration-200 ease-in-out',
459
- parent.state.d_visible ? 'rotate-45' : 'rotate-0',
460
-
461
- // Misc
462
- 'cursor-pointer overflow-hidden select-none',
463
- ],
464
- }),
465
- label: ({ props }) => ({
466
- class: [
467
- 'duration-200',
468
- 'font-medium',
469
- {
470
- 'hover:underline': props.link,
471
- },
472
- {
473
- 'flex-1': props.label !== null,
474
- 'invisible w-0': props.label == null,
475
- },
476
- ],
477
- }),
478
- icon: ({ props }) => ({
479
- class: [
480
- 'mx-0',
481
- {
482
- 'mr-2': props.iconPos == 'left' && props.label != null,
483
- 'ml-2 order-1': props.iconPos == 'right' && props.label != null,
484
- 'mb-2': props.iconPos == 'top' && props.label != null,
485
- 'mt-2': props.iconPos == 'bottom' && props.label != null,
486
- },
487
- ],
488
- }),
489
- loadingicon: ({ props }) => ({
490
- class: [
491
- 'h-4 w-4',
492
- 'mx-0',
493
- {
494
- 'mr-2': props.iconPos == 'left' && props.label != null,
495
- 'ml-2 order-1': props.iconPos == 'right' && props.label != null,
496
- 'mb-2': props.iconPos == 'top' && props.label != null,
497
- 'mt-2': props.iconPos == 'bottom' && props.label != null,
498
- },
499
- 'animate-spin',
500
- ],
501
- }),
502
- badge: ({ props }) => ({
503
- class: [
504
- {
505
- 'ml-2 w-4 h-4 leading-none flex items-center justify-center':
506
- props.badge,
507
- },
508
- ],
509
- }),
510
- },
511
- menu: {
512
- class: [
513
- // Spacing
514
- 'm-0 p-0',
515
-
516
- // Layout & Flexbox
517
- 'list-none flex items-center justify-center',
518
-
519
- // Transitions
520
- 'transition delay-200',
521
-
522
- // Z-Index (Positioning)
523
- 'z-20',
524
- ],
525
- },
526
- menuitem: ({ props, context }) => ({
527
- class: [
528
- 'transform transition-transform duration-200 ease-out transition-opacity duration-800',
529
-
530
- // Conditional Appearance
531
- context.hidden ? 'opacity-0 scale-0' : 'opacity-100 scale-100',
532
-
533
- // Conditional Spacing
534
- {
535
- 'my-1 first:mb-2': props.direction == 'up' && props.type == 'linear',
536
- 'my-1 first:mt-2': props.direction == 'down' && props.type == 'linear',
537
- 'mx-1 first:mr-2': props.direction == 'left' && props.type == 'linear',
538
- 'mx-1 first:ml-2': props.direction == 'right' && props.type == 'linear',
539
- },
540
-
541
- // Conditional Positioning
542
- { absolute: props.type !== 'linear' },
543
- ],
544
- }),
545
- action: {
546
- class: [
547
- // Flexbox & Alignment
548
- 'flex items-center justify-center',
549
-
550
- // Size
551
- 'w-10 h-10',
552
-
553
- // Shape
554
- 'rounded-full relative overflow-hidden',
555
-
556
- // Appearance
557
- 'bg-surface-100 dark:bg-surface-800 text-surface-700 dark:text-surface-0/80',
558
-
559
- // Hover Effects
560
- 'hover:bg-surface-200 dark:hover:bg-surface-800 dark:hover:text-surface-0',
561
-
562
- // Transitions
563
- 'transition duration-200',
564
- ],
565
- },
566
- mask: ({ state }) => ({
567
- class: [
568
- // Base Styles
569
- 'absolute left-0 top-0 w-full h-full transition-opacity duration-250 ease-in-out bg-black/40 z-0',
570
-
571
- // Conditional Appearance
572
- {
573
- 'opacity-0 pointer-events-none': !state.d_visible,
574
- 'opacity-100 transition-opacity duration-400 ease-in-out':
575
- state.d_visible,
576
- },
577
- ],
578
- }),
579
- }