codexly-ui 0.0.33 → 0.0.34

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.
@@ -145,9 +145,15 @@ const CLX_COLOR_HEX = {
145
145
  };
146
146
 
147
147
  const BADGE_SIZE_MAP = {
148
+ xs: 'text-[10px] px-1.5 py-0.5',
148
149
  sm: 'text-xs px-2 py-1',
149
150
  md: 'text-xs px-2.5 py-1 font-medium',
150
151
  };
152
+ const BADGE_CIRCLE_SIZE_MAP = {
153
+ xs: 'text-[10px] w-4 h-4',
154
+ sm: 'text-xs w-5 h-5',
155
+ md: 'text-xs w-6 h-6 font-medium',
156
+ };
151
157
  const BADGE_SHAPE_MAP = {
152
158
  rounded: 'rounded',
153
159
  pill: 'rounded-md',
@@ -163,7 +169,8 @@ class ClxBadgeComponent {
163
169
  _hostClass = computed(() => {
164
170
  const t = resolveColor(this.color());
165
171
  const variant = this.variant();
166
- const sizeClass = BADGE_SIZE_MAP[this.size()];
172
+ const isCircle = this.shape() === 'circle';
173
+ const sizeClass = isCircle ? BADGE_CIRCLE_SIZE_MAP[this.size()] : BADGE_SIZE_MAP[this.size()];
167
174
  const shapeClass = BADGE_SHAPE_MAP[this.shape()];
168
175
  const posClass = this.positioned()
169
176
  ? 'absolute top-0 right-0 translate-x-1/2 -translate-y-1/2'