@cooperco/cooper-component-library 0.0.10

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 (139) hide show
  1. package/README.md +11 -0
  2. package/package.json +85 -0
  3. package/src/assets/main.css +155 -0
  4. package/src/assets/theme.css +67 -0
  5. package/src/assets/usercard.jpg +0 -0
  6. package/src/assets/vue.svg +1 -0
  7. package/src/components/Accordion.vue +33 -0
  8. package/src/components/AccordionItem.vue +53 -0
  9. package/src/components/CTA.vue +39 -0
  10. package/src/components/CarouselModule.vue +46 -0
  11. package/src/components/ContainerCollectionModule.vue +33 -0
  12. package/src/components/ContainerModule.vue +116 -0
  13. package/src/components/ContentAndImage.vue +34 -0
  14. package/src/components/ContentMediaModule.vue +50 -0
  15. package/src/components/ContentModule.vue +51 -0
  16. package/src/components/FooterNavigation.vue +57 -0
  17. package/src/components/IconChevron.vue +107 -0
  18. package/src/components/Image.vue +15 -0
  19. package/src/components/LogoCollectionModule.vue +30 -0
  20. package/src/components/LogoContainerModule.vue +30 -0
  21. package/src/components/NavigationElement.vue +92 -0
  22. package/src/components/PrimaryNavigation.vue +68 -0
  23. package/src/components/SplitModule.vue +42 -0
  24. package/src/components/Testimonial.vue +48 -0
  25. package/src/components/TestimonialModule.vue +48 -0
  26. package/src/components/TileCollection.vue +37 -0
  27. package/src/components/TileCollectionModule.vue +45 -0
  28. package/src/components/TileContent.vue +105 -0
  29. package/src/components/Video.vue +18 -0
  30. package/src/components/types/Accordion.ts +18 -0
  31. package/src/components/types/AccordionItem.ts +19 -0
  32. package/src/components/types/CTA.ts +13 -0
  33. package/src/components/types/CarouselModule.ts +21 -0
  34. package/src/components/types/ContainerCollectionModule.ts +12 -0
  35. package/src/components/types/ContainerModule.ts +35 -0
  36. package/src/components/types/ContentAndImage.ts +14 -0
  37. package/src/components/types/ContentMediaModule.ts +14 -0
  38. package/src/components/types/ContentModule.ts +21 -0
  39. package/src/components/types/FooterNavigation.ts +12 -0
  40. package/src/components/types/Image.ts +12 -0
  41. package/src/components/types/LogoCollectionModule.ts +12 -0
  42. package/src/components/types/LogoContainerModule.ts +12 -0
  43. package/src/components/types/NavigationElement.ts +19 -0
  44. package/src/components/types/PrimaryNavigation.ts +10 -0
  45. package/src/components/types/SplitModule.ts +16 -0
  46. package/src/components/types/Testimonial.ts +17 -0
  47. package/src/components/types/TileCollection.ts +14 -0
  48. package/src/components/types/TileContent.ts +34 -0
  49. package/src/components/types/Video.ts +8 -0
  50. package/src/components/types/index.ts +10 -0
  51. package/src/presets/aura/accordion/index.js +81 -0
  52. package/src/presets/aura/autocomplete/index.js +280 -0
  53. package/src/presets/aura/avatar/index.js +46 -0
  54. package/src/presets/aura/badge/index.js +43 -0
  55. package/src/presets/aura/badgedirective/index.js +49 -0
  56. package/src/presets/aura/blockui/index.js +8 -0
  57. package/src/presets/aura/breadcrumb/index.js +63 -0
  58. package/src/presets/aura/button/index.js +511 -0
  59. package/src/presets/aura/calendar/index.js +702 -0
  60. package/src/presets/aura/card/index.js +53 -0
  61. package/src/presets/aura/carousel/index.js +160 -0
  62. package/src/presets/aura/cascadeselect/index.js +220 -0
  63. package/src/presets/aura/checkbox/index.js +107 -0
  64. package/src/presets/aura/chip/index.js +45 -0
  65. package/src/presets/aura/chips/index.js +126 -0
  66. package/src/presets/aura/colorpicker/index.js +132 -0
  67. package/src/presets/aura/confirmpopup/index.js +111 -0
  68. package/src/presets/aura/contextmenu/index.js +132 -0
  69. package/src/presets/aura/datatable/index.js +1290 -0
  70. package/src/presets/aura/dataview/index.js +40 -0
  71. package/src/presets/aura/deferred/index.js +3 -0
  72. package/src/presets/aura/dialog/index.js +250 -0
  73. package/src/presets/aura/divider/index.js +72 -0
  74. package/src/presets/aura/dock/index.js +97 -0
  75. package/src/presets/aura/dropdown/index.js +297 -0
  76. package/src/presets/aura/fieldset/index.js +95 -0
  77. package/src/presets/aura/fileupload/index.js +175 -0
  78. package/src/presets/aura/floatlabel/index.js +26 -0
  79. package/src/presets/aura/galleria/index.js +353 -0
  80. package/src/presets/aura/global.js +90 -0
  81. package/src/presets/aura/iconfield/index.js +22 -0
  82. package/src/presets/aura/image/index.js +206 -0
  83. package/src/presets/aura/index.js +181 -0
  84. package/src/presets/aura/inlinemessage/index.js +46 -0
  85. package/src/presets/aura/inplace/index.js +27 -0
  86. package/src/presets/aura/inputgroup/index.js +5 -0
  87. package/src/presets/aura/inputgroupaddon/index.js +28 -0
  88. package/src/presets/aura/inputmask/index.js +47 -0
  89. package/src/presets/aura/inputnumber/index.js +293 -0
  90. package/src/presets/aura/inputotp/index.js +69 -0
  91. package/src/presets/aura/inputswitch/index.js +94 -0
  92. package/src/presets/aura/inputtext/index.js +63 -0
  93. package/src/presets/aura/knob/index.js +47 -0
  94. package/src/presets/aura/listbox/index.js +158 -0
  95. package/src/presets/aura/megamenu/index.js +206 -0
  96. package/src/presets/aura/menu/index.js +122 -0
  97. package/src/presets/aura/menubar/index.js +184 -0
  98. package/src/presets/aura/message/index.js +112 -0
  99. package/src/presets/aura/metergroup/index.js +110 -0
  100. package/src/presets/aura/multiselect/index.js +579 -0
  101. package/src/presets/aura/orderlist/index.js +281 -0
  102. package/src/presets/aura/organizationchart/index.js +142 -0
  103. package/src/presets/aura/overlaypanel/index.js +34 -0
  104. package/src/presets/aura/paginator/index.js +566 -0
  105. package/src/presets/aura/panel/index.js +102 -0
  106. package/src/presets/aura/panelmenu/index.js +130 -0
  107. package/src/presets/aura/password/index.js +143 -0
  108. package/src/presets/aura/picklist/index.js +718 -0
  109. package/src/presets/aura/progressbar/index.js +64 -0
  110. package/src/presets/aura/progressspinner/index.js +51 -0
  111. package/src/presets/aura/radiobutton/index.js +121 -0
  112. package/src/presets/aura/rating/index.js +95 -0
  113. package/src/presets/aura/ripple/index.js +6 -0
  114. package/src/presets/aura/scrollpanel/index.js +77 -0
  115. package/src/presets/aura/scrolltop/index.js +45 -0
  116. package/src/presets/aura/selectbutton/index.js +66 -0
  117. package/src/presets/aura/sidebar/index.js +160 -0
  118. package/src/presets/aura/skeleton/index.js +19 -0
  119. package/src/presets/aura/slider/index.js +144 -0
  120. package/src/presets/aura/speeddial/index.js +579 -0
  121. package/src/presets/aura/splitbutton/index.js +1185 -0
  122. package/src/presets/aura/splitter/index.js +71 -0
  123. package/src/presets/aura/stepper/index.js +183 -0
  124. package/src/presets/aura/steps/index.js +117 -0
  125. package/src/presets/aura/tabmenu/index.js +75 -0
  126. package/src/presets/aura/tabview/index.js +162 -0
  127. package/src/presets/aura/tag/index.js +44 -0
  128. package/src/presets/aura/terminal/index.js +60 -0
  129. package/src/presets/aura/textarea/index.js +49 -0
  130. package/src/presets/aura/tieredmenu/index.js +125 -0
  131. package/src/presets/aura/timeline/index.js +114 -0
  132. package/src/presets/aura/toast/index.js +151 -0
  133. package/src/presets/aura/togglebutton/index.js +98 -0
  134. package/src/presets/aura/toolbar/index.js +28 -0
  135. package/src/presets/aura/tooltip/index.js +73 -0
  136. package/src/presets/aura/tree/index.js +294 -0
  137. package/src/presets/aura/treeselect/index.js +404 -0
  138. package/src/presets/aura/treetable/index.js +513 -0
  139. package/src/presets/aura/tristatecheckbox/index.js +121 -0
@@ -0,0 +1,49 @@
1
+ export default {
2
+ root: ({ context, props, parent }) => ({
3
+ class: [
4
+ // Font
5
+ 'leading-none',
6
+
7
+ // Spacing
8
+ 'm-0',
9
+ 'py-2 px-3',
10
+
11
+ // Shape
12
+ 'rounded-md',
13
+
14
+ // Colors
15
+ 'text-surface-800 dark:text-white/80',
16
+ 'placeholder:text-surface-400 dark:placeholder:text-surface-500',
17
+ { 'bg-surface-0 dark:bg-surface-950': !context.disabled },
18
+ 'border',
19
+ { 'border-surface-300 dark:border-surface-600': !props.invalid },
20
+
21
+ // Invalid State
22
+ 'invalid:focus:ring-red-200',
23
+ 'invalid:hover:border-red-500',
24
+ { 'border-red-500 dark:border-red-400': props.invalid },
25
+
26
+ // States
27
+ {
28
+ 'hover:border-surface-400 dark:hover:border-surface-600':
29
+ !context.disabled && !props.invalid,
30
+ 'focus:outline-none focus:outline-offset-0 focus:ring-1 focus:ring-primary-500 dark:focus:ring-primary-400 focus:z-10':
31
+ !context.disabled,
32
+ 'bg-surface-200 dark:bg-surface-700 select-none pointer-events-none cursor-default':
33
+ context.disabled,
34
+ },
35
+
36
+ // Filled State *for FloatLabel
37
+ {
38
+ filled:
39
+ parent.instance?.$name == 'FloatLabel' &&
40
+ props.modelValue !== null &&
41
+ props.modelValue?.length !== 0,
42
+ },
43
+
44
+ // Misc
45
+ 'appearance-none',
46
+ 'transition-colors duration-200',
47
+ ],
48
+ }),
49
+ }
@@ -0,0 +1,125 @@
1
+ export default {
2
+ root: {
3
+ class: [
4
+ // Shape
5
+ 'rounded-md',
6
+
7
+ // Size
8
+ 'min-w-[12rem]',
9
+ 'p-1',
10
+
11
+ // Colors
12
+ 'bg-surface-0 dark:bg-surface-900',
13
+ 'border border-surface-200 dark:border-surface-700',
14
+ ],
15
+ },
16
+ menu: {
17
+ class: [
18
+ // Spacings and Shape
19
+ 'list-none',
20
+ 'm-0',
21
+ 'p-0',
22
+ 'outline-none',
23
+ ],
24
+ },
25
+ menuitem: {
26
+ class: 'relative my-[2px] [&:first-child]:mt-0',
27
+ },
28
+ content: ({ context }) => ({
29
+ class: [
30
+ //Shape
31
+ 'rounded-[4px]',
32
+
33
+ // Colors
34
+ 'text-surface-700 dark:text-white/80',
35
+ {
36
+ 'text-surface-500 dark:text-white/70':
37
+ !context.focused && !context.active,
38
+ 'text-surface-500 dark:text-white/70 bg-surface-200':
39
+ context.focused && !context.active,
40
+ 'text-primary-highlight-inverse bg-primary-highlight':
41
+ (context.focused && context.active) ||
42
+ context.active ||
43
+ (!context.focused && context.active),
44
+ },
45
+
46
+ // Transitions
47
+ 'transition-shadow',
48
+ 'duration-200',
49
+
50
+ // States
51
+ {
52
+ 'hover:bg-surface-100 dark:hover:bg-[rgba(255,255,255,0.03)]':
53
+ !context.active,
54
+ 'hover:bg-primary-highlight-hover text-primary-highlight-inverse':
55
+ context.active,
56
+ },
57
+
58
+ // Disabled
59
+ { 'opacity-60 pointer-events-none cursor-default': context.disabled },
60
+ ],
61
+ }),
62
+ action: {
63
+ class: [
64
+ 'relative',
65
+ // Flexbox
66
+
67
+ 'flex',
68
+ 'items-center',
69
+
70
+ // Spacing
71
+ 'py-2',
72
+ 'px-3',
73
+
74
+ // Color
75
+ 'text-surface-700 dark:text-white/80',
76
+
77
+ // Misc
78
+ 'no-underline',
79
+ 'overflow-hidden',
80
+ 'cursor-pointer',
81
+ 'select-none',
82
+ ],
83
+ },
84
+ icon: {
85
+ class: [
86
+ // Spacing
87
+ 'mr-2',
88
+
89
+ // Color
90
+ 'text-surface-600 dark:text-white/70',
91
+ ],
92
+ },
93
+ label: {
94
+ class: ['leading-none'],
95
+ },
96
+ submenuicon: {
97
+ class: [
98
+ // Position
99
+ 'ml-auto',
100
+ ],
101
+ },
102
+ submenu: {
103
+ class: [
104
+ // Spacing
105
+ 'p-1',
106
+ 'm-0',
107
+ 'list-none',
108
+ 'min-w-[12.5rem]',
109
+
110
+ // Shape
111
+ 'shadow-none sm:shadow-md',
112
+ 'border border-surface-200 dark:border-surface-700',
113
+
114
+ // Position
115
+ 'static sm:absolute',
116
+ 'z-10',
117
+
118
+ // Color
119
+ 'bg-surface-0 dark:bg-surface-900',
120
+ ],
121
+ },
122
+ separator: {
123
+ class: 'border-t border-surface-200 dark:border-surface-600 my-[2px]',
124
+ },
125
+ }
@@ -0,0 +1,114 @@
1
+ export default {
2
+ root: ({ props }) => ({
3
+ class: [
4
+ 'flex grow',
5
+ {
6
+ 'flex-col': props.layout === 'vertical',
7
+ 'flex-row flex-1': props.layout === 'horizontal',
8
+ },
9
+ ],
10
+ }),
11
+ event: ({ props, context }) => ({
12
+ class: [
13
+ 'flex relative min-h-[70px]',
14
+ {
15
+ 'flex-row-reverse':
16
+ props.align === 'right' ||
17
+ (props.layout === 'vertical' &&
18
+ props.align === 'alternate' &&
19
+ context.index % 2 === 1),
20
+ 'flex-col flex-1': props.layout === 'horizontal',
21
+ 'flex-col-reverse ':
22
+ props.align === 'bottom' ||
23
+ (props.layout === 'horizontal' &&
24
+ props.align === 'alternate' &&
25
+ context.index % 2 === 1),
26
+ },
27
+ ],
28
+ }),
29
+ opposite: ({ props, context }) => ({
30
+ class: [
31
+ 'flex-1',
32
+ {
33
+ 'px-4': props.layout === 'vertical',
34
+ 'py-4': props.layout === 'horizontal',
35
+ },
36
+ {
37
+ 'text-right':
38
+ props.align === 'left' ||
39
+ (props.layout === 'vertical' &&
40
+ props.align === 'alternate' &&
41
+ context.index % 2 === 0),
42
+ 'text-left':
43
+ props.align === 'right' ||
44
+ (props.layout === 'vertical' &&
45
+ props.align === 'alternate' &&
46
+ context.index % 2 === 1),
47
+ },
48
+ ],
49
+ }),
50
+ separator: ({ props }) => ({
51
+ class: [
52
+ 'flex items-center flex-initial',
53
+ {
54
+ 'flex-col': props.layout === 'vertical',
55
+ 'flex-row': props.layout === 'horizontal',
56
+ },
57
+ ],
58
+ }),
59
+ marker: {
60
+ class: [
61
+ 'relative',
62
+
63
+ // Display & Flexbox
64
+ 'inline-flex items-center justify-center',
65
+
66
+ // Size
67
+ 'w-[1.125rem] h-[1.125rem]',
68
+
69
+ // Appearance
70
+ 'rounded-full border-2 border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-950',
71
+
72
+ // Before
73
+ 'before:rounded-full before:w-[0.375rem] before:h-[0.375rem] before:bg-primary',
74
+ // After
75
+ 'after:absolute after:rounded-full after:w-full after:h-full after:shadow-sm',
76
+ ],
77
+ },
78
+ connector: ({ props }) => ({
79
+ class: [
80
+ 'grow bg-surface-300 dark:bg-surface-700',
81
+ {
82
+ 'w-[2px]': props.layout === 'vertical',
83
+ 'w-full h-[2px]': props.layout === 'horizontal',
84
+ },
85
+ ],
86
+ }),
87
+ content: ({ props, context }) => ({
88
+ class: [
89
+ 'flex-1',
90
+ {
91
+ 'px-4': props.layout === 'vertical',
92
+ 'py-4': props.layout === 'horizontal',
93
+ },
94
+ {
95
+ 'text-left':
96
+ props.align === 'left' ||
97
+ (props.layout === 'vertical' &&
98
+ props.align === 'alternate' &&
99
+ context.index % 2 === 0),
100
+ 'text-right':
101
+ props.align === 'right' ||
102
+ (props.layout === 'vertical' &&
103
+ props.align === 'alternate' &&
104
+ context.index % 2 === 1),
105
+ },
106
+ {
107
+ 'min-h-0':
108
+ props.layout === 'vertical' && context.index === context.count - 1,
109
+ 'grow-0':
110
+ props.layout === 'horizontal' && context.index === context.count - 1,
111
+ },
112
+ ],
113
+ }),
114
+ }
@@ -0,0 +1,151 @@
1
+ export default {
2
+ root: ({ props }) => ({
3
+ class: [
4
+ //Size and Shape
5
+ 'w-96 rounded-md',
6
+
7
+ // Positioning
8
+ {
9
+ '-translate-x-2/4':
10
+ props.position == 'top-center' || props.position == 'bottom-center',
11
+ },
12
+ ],
13
+ }),
14
+ container: ({ props }) => ({
15
+ class: [
16
+ 'mb-4 rounded-md w-full',
17
+ 'border border-transparent',
18
+ 'backdrop-blur-[10px] shadow-md',
19
+
20
+ // Colors
21
+ {
22
+ 'bg-blue-50/90 dark:bg-blue-500/20': props.message.severity == 'info',
23
+ 'bg-green-50/90 dark:bg-green-500/20':
24
+ props.message.severity == 'success',
25
+ 'bg-surface-50 dark:bg-surface-800':
26
+ props.message.severity == 'secondary',
27
+ 'bg-orange-50/90 dark:bg-orange-500/20':
28
+ props.message.severity == 'warn',
29
+ 'bg-red-50/90 dark:bg-red-500/20': props.message.severity == 'error',
30
+ 'bg-surface-950 dark:bg-surface-0':
31
+ props.message.severity == 'contrast',
32
+ },
33
+ {
34
+ 'border-blue-200 dark:border-blue-500/20':
35
+ props.message.severity == 'info',
36
+ 'border-green-200 dark:border-green-500/20':
37
+ props.message.severity == 'success',
38
+ 'border-surface-300 dark:border-surface-500/20':
39
+ props.message.severity == 'secondary',
40
+ 'border-orange-200 dark:border-orange-500/20':
41
+ props.message.severity == 'warn',
42
+ 'border-red-200 dark:border-red-500/20':
43
+ props.message.severity == 'error',
44
+ 'border-surface-950 dark:border-surface-0':
45
+ props.message.severity == 'contrast',
46
+ },
47
+ {
48
+ 'text-blue-700 dark:text-blue-300': props.message.severity == 'info',
49
+ 'text-green-700 dark:text-green-300':
50
+ props.message.severity == 'success',
51
+ 'text-surface-700 dark:text-surface-300':
52
+ props.message.severity == 'secondary',
53
+ 'text-orange-700 dark:text-orange-300':
54
+ props.message.severity == 'warn',
55
+ 'text-red-700 dark:text-red-300': props.message.severity == 'error',
56
+ 'text-surface-0 dark:text-surface-950':
57
+ props.message.severity == 'contrast',
58
+ },
59
+ ],
60
+ }),
61
+ content: ({ props }) => ({
62
+ class: [
63
+ 'flex p-3',
64
+ {
65
+ 'items-start': props.message.summary,
66
+ 'items-center': !props.message.summary,
67
+ },
68
+ ],
69
+ }),
70
+ icon: ({ props }) => ({
71
+ class: [
72
+ // Sizing and Spacing
73
+ props.message.severity === 'contrast' ||
74
+ props.message.severity === 'secondary'
75
+ ? 'w-0'
76
+ : 'w-[1.125rem] h-[1.125rem] mr-2',
77
+ 'text-lg leading-[normal]',
78
+ ],
79
+ }),
80
+ text: {
81
+ class: [
82
+ // Font and Text
83
+ 'text-base leading-[normal]',
84
+ 'ml-2',
85
+ 'flex-1',
86
+ ],
87
+ },
88
+ summary: {
89
+ class: 'font-medium block',
90
+ },
91
+ detail: ({ props }) => ({
92
+ class: [
93
+ 'block',
94
+ 'text-sm',
95
+ props.message.severity === 'contrast'
96
+ ? 'text-surface-0 dark:text-surface-950'
97
+ : 'text-surface-700 dark:text-surface-0',
98
+ { 'mt-2': props.message.summary },
99
+ ],
100
+ }),
101
+ closebutton: ({ props }) => ({
102
+ class: [
103
+ // Flexbox
104
+ 'flex items-center justify-center',
105
+
106
+ // Size
107
+ 'w-7 h-7',
108
+
109
+ // Spacing and Misc
110
+ 'ml-auto relative',
111
+
112
+ // Shape
113
+ 'rounded-full',
114
+
115
+ // Colors
116
+ 'bg-transparent',
117
+
118
+ // Transitions
119
+ 'transition duration-200 ease-in-out',
120
+
121
+ // States
122
+ 'hover:bg-surface-0/30 dark:hover:bg-[rgba(255,255,255,0.03)]',
123
+ 'focus:outline-none focus:outline-offset-0 focus:ring-1',
124
+ {
125
+ 'focus:ring-blue-500 dark:focus:ring-blue-400':
126
+ props.severity == 'info',
127
+ 'focus:ring-green-500 dark:focus:ring-green-400':
128
+ props.severity == 'success',
129
+ 'focus:ring-surface-500 dark:focus:ring-surface-400':
130
+ props.severity == 'secondary',
131
+ 'focus:ring-orange-500 dark:focus:ring-orange-400':
132
+ props.severity == 'warn',
133
+ 'focus:ring-red-500 dark:focus:ring-red-4000':
134
+ props.severity == 'error',
135
+ 'focus:ring-surface-0 dark:focus:ring-surface-950':
136
+ props.severity == 'contrast',
137
+ },
138
+
139
+ // Misc
140
+ 'overflow-hidden',
141
+ ],
142
+ }),
143
+ transition: {
144
+ enterFromClass: 'opacity-0 translate-y-2/4',
145
+ enterActiveClass: 'transition-[transform,opacity] duration-300',
146
+ leaveFromClass: 'max-h-[1000px]',
147
+ leaveActiveClass:
148
+ '!transition-[max-height_.45s_cubic-bezier(0,1,0,1),opacity_.3s,margin-bottom_.3s] overflow-hidden',
149
+ leaveToClass: 'max-h-0 opacity-0 mb-0',
150
+ },
151
+ }
@@ -0,0 +1,98 @@
1
+ export default {
2
+ root: {
3
+ class: [
4
+ 'relative',
5
+
6
+ // Alignment
7
+ 'inline-flex',
8
+ 'align-bottom',
9
+
10
+ // Misc
11
+ 'cursor-pointer',
12
+ 'select-none',
13
+ ],
14
+ },
15
+ box: ({ props }) => ({
16
+ class: [
17
+ 'relative',
18
+
19
+ // Alignments
20
+ 'items-center inline-flex flex-1 text-center align-bottom justify-center',
21
+
22
+ // Sizes & Spacing
23
+ 'px-4 py-2 leading-none',
24
+
25
+ // Shapes
26
+ 'rounded-md',
27
+ 'border',
28
+ { 'border-transparent': !props.invalid },
29
+
30
+ // Colors
31
+ 'bg-surface-100 dark:bg-surface-950',
32
+ {
33
+ 'text-surface-600 dark:text-white/60 before:bg-transparent':
34
+ !props.modelValue,
35
+ 'text-surface-800 dark:text-white/80 before:bg-surface-0 dark:before:bg-surface-800':
36
+ props.modelValue,
37
+ },
38
+
39
+ // Before
40
+ 'before:absolute before:left-1 before:top-1 before:w-[calc(100%-0.5rem)] before:h-[calc(100%-0.5rem)] before:rounded-[4px] before:z-0',
41
+
42
+ // Invalid State
43
+ { 'border-red-500 dark:border-red-400': props.invalid },
44
+
45
+ // States
46
+ {
47
+ 'peer-hover:text-surface-800 dark:peer-hover:text-white/80':
48
+ !props.disabled && !props.modelValue,
49
+ 'peer-focus-visible:ring-1 peer-focus-visible:ring-primary-500 dark:peer-focus-visible:ring-primary-400':
50
+ !props.disabled,
51
+ },
52
+
53
+ // Transitions
54
+ 'transition-all duration-200',
55
+
56
+ // Misc
57
+ {
58
+ 'cursor-pointer': !props.disabled,
59
+ 'opacity-60 select-none pointer-events-none cursor-default':
60
+ props.disabled,
61
+ },
62
+ ],
63
+ }),
64
+ label: {
65
+ class: 'font-medium leading-[normal] text-center w-full z-10 relative',
66
+ },
67
+ input: {
68
+ class: [
69
+ 'peer',
70
+
71
+ // Size
72
+ 'w-full ',
73
+ 'h-full',
74
+
75
+ // Position
76
+ 'absolute',
77
+ 'top-0 left-0',
78
+ 'z-20',
79
+
80
+ // Spacing
81
+ 'p-0',
82
+ 'm-0',
83
+
84
+ // Shape
85
+ 'opacity-0',
86
+ 'rounded-md',
87
+ 'outline-none',
88
+ 'border border-surface-200 dark:border-surface-700',
89
+
90
+ // Misc
91
+ 'appearance-none',
92
+ 'cursor-pointer',
93
+ ],
94
+ },
95
+ icon: {
96
+ class: ['relative z-10', 'mr-2'],
97
+ },
98
+ }
@@ -0,0 +1,28 @@
1
+ export default {
2
+ root: {
3
+ class: [
4
+ // Flex & Alignment
5
+ 'flex items-center justify-between flex-wrap',
6
+ 'gap-2',
7
+
8
+ // Spacing
9
+ 'p-3',
10
+
11
+ // Shape
12
+ 'rounded-md',
13
+
14
+ // Color
15
+ 'bg-surface-0 dark:bg-surface-900',
16
+ 'border border-surface-200 dark:border-surface-700',
17
+ ],
18
+ },
19
+ start: {
20
+ class: 'flex items-center',
21
+ },
22
+ center: {
23
+ class: 'flex items-center',
24
+ },
25
+ end: {
26
+ class: 'flex items-center',
27
+ },
28
+ }
@@ -0,0 +1,73 @@
1
+ export default {
2
+ root: ({ context }) => ({
3
+ class: [
4
+ // Position and Shadows
5
+ 'absolute',
6
+ 'shadow-md',
7
+ 'p-fadein',
8
+ // Spacing
9
+ {
10
+ 'py-0 px-1':
11
+ context?.right ||
12
+ context?.left ||
13
+ (!context?.right &&
14
+ !context?.left &&
15
+ !context?.top &&
16
+ !context?.bottom),
17
+ 'py-1 px-0': context?.top || context?.bottom,
18
+ },
19
+ ],
20
+ }),
21
+ arrow: ({ context }) => ({
22
+ class: [
23
+ // Position
24
+
25
+ 'absolute',
26
+
27
+ // Size
28
+ 'w-0',
29
+ 'h-0',
30
+
31
+ // Shape
32
+ 'border-transparent',
33
+ 'border-solid',
34
+ {
35
+ 'border-y-[10px] border-r-[10px] border-l-0 border-r-surface-700':
36
+ context?.right ||
37
+ (!context?.right &&
38
+ !context?.left &&
39
+ !context?.top &&
40
+ !context?.bottom),
41
+ 'border-y-[10px] border-l-[10px] border-r-0 border-l-surface-700':
42
+ context?.left,
43
+ 'border-x-[10px] border-t-[10px] border-b-0 border-t-surface-700':
44
+ context?.top,
45
+ 'border-x-[10px] border-b-[10px] border-t-0 border-b-surface-700':
46
+ context?.bottom,
47
+ },
48
+
49
+ // Spacing
50
+ {
51
+ '-mt-[10px] top-1/2':
52
+ context?.right ||
53
+ context?.left ||
54
+ (!context?.right &&
55
+ !context?.left &&
56
+ !context?.top &&
57
+ !context?.bottom),
58
+ '-ml-[10px] left-1/2': context?.top || context?.bottom,
59
+ },
60
+ ],
61
+ }),
62
+ text: {
63
+ class: [
64
+ 'p-3',
65
+ 'bg-surface-700',
66
+ 'text-white',
67
+ 'leading-none',
68
+ 'rounded-md',
69
+ 'whitespace-pre-line',
70
+ 'break-words',
71
+ ],
72
+ },
73
+ }