@sekiui/elements 0.0.23 → 0.0.25

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.
@@ -208,9 +208,9 @@
208
208
 
209
209
  /* Button Sizing: Small */
210
210
  --seki-button-sm-padding-x: var(--seki-spacing-3, 0.75rem);
211
- --seki-button-sm-padding-y: var(--seki-spacing-1-5, 0.375rem);
211
+ --seki-button-sm-padding-y: 0.375rem;
212
212
  --seki-button-sm-font-size: var(--seki-text-sm, 0.875rem);
213
- --seki-button-sm-height: 2rem;
213
+ --seki-button-sm-height: 2.25rem; /* Updated from 2rem to match shadcn (36px) */
214
214
 
215
215
  /* Button Sizing: Medium (default) */
216
216
  --seki-button-md-padding-x: var(--seki-spacing-4, 1rem);
@@ -219,10 +219,24 @@
219
219
  --seki-button-md-height: 2.5rem;
220
220
 
221
221
  /* Button Sizing: Large */
222
- --seki-button-lg-padding-x: var(--seki-spacing-5, 1.25rem);
223
- --seki-button-lg-padding-y: var(--seki-spacing-2-5, 0.625rem);
224
- --seki-button-lg-font-size: var(--seki-text-lg, 1.125rem);
225
- --seki-button-lg-height: 3rem;
222
+ --seki-button-lg-padding-x: 2rem; /* Updated from 1.25rem to match shadcn */
223
+ --seki-button-lg-padding-y: 0.5rem;
224
+ --seki-button-lg-font-size: 1rem; /* Updated from 1.125rem to match shadcn */
225
+ --seki-button-lg-height: 2.75rem; /* Updated from 3rem to match shadcn (44px) */
226
+
227
+ /* Button Sizing: Icon-only (NEW - shadcn compatibility) */
228
+ --seki-button-icon-sm-size: 2rem; /* 32x32px square */
229
+ --seki-button-icon-size: 2.5rem; /* 40x40px square */
230
+ --seki-button-icon-lg-size: 3rem; /* 48x48px square */
231
+ --seki-button-icon-gap: 0.5rem; /* 8px gap between icon and text */
232
+
233
+ /* Button Variant: Link (NEW - shadcn compatibility) */
234
+ --seki-button-link-bg: transparent;
235
+ --seki-button-link-text: var(--seki-primary);
236
+ --seki-button-link-border: transparent;
237
+ --seki-button-link-hover-bg: transparent;
238
+ --seki-button-link-hover-text: var(--seki-primary);
239
+ --seki-button-link-hover-border: transparent;
226
240
 
227
241
  /* Button Common */
228
242
  --seki-button-radius: var(--seki-radius-md, 0.375rem);
@@ -232,6 +246,17 @@
232
246
  --seki-button-shadow: var(--seki-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
233
247
  --seki-button-shadow-hover: var(--seki-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));
234
248
  --seki-button-disabled-opacity: 0.5;
249
+
250
+ /* Input Component Colors */
251
+ --seki-input-bg: var(--seki-background);
252
+ --seki-input-border: var(--seki-border);
253
+ --seki-input-text: var(--seki-foreground);
254
+ --seki-input-placeholder: var(--seki-muted-foreground);
255
+ --seki-input-ring: var(--seki-ring);
256
+ --seki-input-invalid-border: var(--seki-destructive);
257
+ --seki-input-invalid-ring: var(--seki-destructive);
258
+ --seki-input-disabled-opacity: 0.5;
259
+ --seki-input-radius: var(--seki-radius-md);
235
260
  }
236
261
 
237
262
  /**
@@ -258,6 +283,15 @@
258
283
  --seki-spacing-16: 4rem; /* 64px */
259
284
  --seki-spacing-20: 5rem; /* 80px */
260
285
  --seki-spacing-24: 6rem; /* 96px */
286
+
287
+ /* Input Component Tokens */
288
+ --seki-input-height-sm: 2rem; /* 32px */
289
+ --seki-input-height-md: 2.5rem; /* 40px - default */
290
+ --seki-input-height-lg: 3rem; /* 48px */
291
+ --seki-input-padding-x: 0.75rem; /* 12px */
292
+ --seki-input-padding-y: 0.5rem; /* 8px */
293
+ --seki-input-font-size: 0.875rem; /* 14px */
294
+ --seki-input-ring-offset: 2px;
261
295
  }
262
296
 
263
297
  /**
@@ -326,6 +360,7 @@
326
360
 
327
361
  .button {
328
362
  /* Base styles */
363
+ box-sizing: border-box;
329
364
  font-family: var(--seki-font-sans);
330
365
  font-weight: var(--seki-button-font-weight);
331
366
  border-radius: var(--seki-button-radius);
@@ -334,8 +369,15 @@
334
369
  transition: background-color var(--seki-button-transition-duration) var(--seki-button-transition-timing),
335
370
  border-color var(--seki-button-transition-duration) var(--seki-button-transition-timing),
336
371
  color var(--seki-button-transition-duration) var(--seki-button-transition-timing),
337
- box-shadow var(--seki-button-transition-duration) var(--seki-button-transition-timing);
372
+ box-shadow var(--seki-button-transition-duration) var(--seki-button-transition-timing),
373
+ text-decoration var(--seki-button-transition-duration) var(--seki-button-transition-timing);
338
374
  box-shadow: var(--seki-button-shadow);
375
+
376
+ /* Flexbox layout for icon-text spacing */
377
+ display: inline-flex;
378
+ align-items: center;
379
+ justify-content: center;
380
+ gap: var(--seki-button-icon-gap);
339
381
  }
340
382
 
341
383
  .button:hover:not(:disabled) {
@@ -417,6 +459,21 @@
417
459
  border-color: var(--seki-button-destructive-hover-border);
418
460
  }
419
461
 
462
+ /* Variant: Link (NEW - shadcn compatibility) */
463
+ .button--link {
464
+ background: var(--seki-button-link-bg);
465
+ color: var(--seki-button-link-text);
466
+ border-color: var(--seki-button-link-border);
467
+ text-decoration: none;
468
+ }
469
+
470
+ .button--link:hover:not(:disabled) {
471
+ background: var(--seki-button-link-hover-bg);
472
+ color: var(--seki-button-link-hover-text);
473
+ border-color: var(--seki-button-link-hover-border);
474
+ text-decoration: underline;
475
+ }
476
+
420
477
  /* Size: Small */
421
478
  .button--sm {
422
479
  padding: var(--seki-button-sm-padding-y) var(--seki-button-sm-padding-x);
@@ -438,6 +495,27 @@
438
495
  height: var(--seki-button-lg-height);
439
496
  }
440
497
 
498
+ /* Size: Icon-only Small (NEW - shadcn compatibility) */
499
+ .button--icon-sm {
500
+ width: var(--seki-button-icon-sm-size);
501
+ height: var(--seki-button-icon-sm-size);
502
+ padding: 0;
503
+ }
504
+
505
+ /* Size: Icon-only Medium/Default (NEW - shadcn compatibility) */
506
+ .button--icon {
507
+ width: var(--seki-button-icon-size);
508
+ height: var(--seki-button-icon-size);
509
+ padding: 0;
510
+ }
511
+
512
+ /* Size: Icon-only Large (NEW - shadcn compatibility) */
513
+ .button--icon-lg {
514
+ width: var(--seki-button-icon-lg-size);
515
+ height: var(--seki-button-icon-lg-size);
516
+ padding: 0;
517
+ }
518
+
441
519
  /* Reduced Motion */
442
520
  @media (prefers-reduced-motion: reduce) {
443
521
  .button {
@@ -1,13 +1,33 @@
1
1
  import { h } from "@stencil/core";
2
2
  export class SekiButton {
3
3
  constructor() {
4
+ /**
5
+ * Visual style variant of the button
6
+ */
4
7
  this.variant = 'primary';
8
+ /**
9
+ * Size of the button. Use icon-sm, icon, or icon-lg for icon-only buttons.
10
+ */
5
11
  this.size = 'md';
12
+ /**
13
+ * Whether the button is disabled
14
+ */
6
15
  this.disabled = false;
16
+ /**
17
+ * Button type attribute
18
+ */
7
19
  this.type = 'button';
8
20
  }
21
+ componentWillLoad() {
22
+ // Dev mode warning for missing aria-label on icon-only buttons
23
+ const isIconOnlySize = this.size === 'icon-sm' || this.size === 'icon' || this.size === 'icon-lg';
24
+ if (isIconOnlySize && !this.ariaLabel) {
25
+ console.warn(`[seki-button] Icon-only button (size="${this.size}") requires aria-label for accessibility. ` +
26
+ `Please add aria-label prop to provide an accessible name for screen readers.`);
27
+ }
28
+ }
9
29
  render() {
10
- return (h("button", { key: '0a0740566a19505743488924d3971f75cf086ab8', class: `button button--${this.variant} button--${this.size}`, type: this.type, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, h("slot", { key: '6c715e7b707efb6dffc4b88773d7ea63c510f305' })));
30
+ return (h("button", { key: '7e92cd3ca41f6313debb5bdeb7997b4765b24742', class: `button button--${this.variant} button--${this.size}`, type: this.type, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.ariaLabel }, h("slot", { key: '53c535e16ce0ce1edb879d5b06d47f95c7f382de' })));
11
31
  }
12
32
  static get is() { return "seki-button"; }
13
33
  static get encapsulation() { return "shadow"; }
@@ -27,15 +47,15 @@ export class SekiButton {
27
47
  "type": "string",
28
48
  "mutable": false,
29
49
  "complexType": {
30
- "original": "'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive'",
31
- "resolved": "\"destructive\" | \"ghost\" | \"outline\" | \"primary\" | \"secondary\"",
50
+ "original": "'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link'",
51
+ "resolved": "\"destructive\" | \"ghost\" | \"link\" | \"outline\" | \"primary\" | \"secondary\"",
32
52
  "references": {}
33
53
  },
34
54
  "required": false,
35
55
  "optional": false,
36
56
  "docs": {
37
57
  "tags": [],
38
- "text": ""
58
+ "text": "Visual style variant of the button"
39
59
  },
40
60
  "getter": false,
41
61
  "setter": false,
@@ -47,15 +67,15 @@ export class SekiButton {
47
67
  "type": "string",
48
68
  "mutable": false,
49
69
  "complexType": {
50
- "original": "'sm' | 'md' | 'lg'",
51
- "resolved": "\"lg\" | \"md\" | \"sm\"",
70
+ "original": "'sm' | 'md' | 'lg' | 'icon-sm' | 'icon' | 'icon-lg'",
71
+ "resolved": "\"icon\" | \"icon-lg\" | \"icon-sm\" | \"lg\" | \"md\" | \"sm\"",
52
72
  "references": {}
53
73
  },
54
74
  "required": false,
55
75
  "optional": false,
56
76
  "docs": {
57
77
  "tags": [],
58
- "text": ""
78
+ "text": "Size of the button. Use icon-sm, icon, or icon-lg for icon-only buttons."
59
79
  },
60
80
  "getter": false,
61
81
  "setter": false,
@@ -75,7 +95,7 @@ export class SekiButton {
75
95
  "optional": false,
76
96
  "docs": {
77
97
  "tags": [],
78
- "text": ""
98
+ "text": "Whether the button is disabled"
79
99
  },
80
100
  "getter": false,
81
101
  "setter": false,
@@ -95,13 +115,32 @@ export class SekiButton {
95
115
  "optional": false,
96
116
  "docs": {
97
117
  "tags": [],
98
- "text": ""
118
+ "text": "Button type attribute"
99
119
  },
100
120
  "getter": false,
101
121
  "setter": false,
102
122
  "reflect": false,
103
123
  "attribute": "type",
104
124
  "defaultValue": "'button'"
125
+ },
126
+ "ariaLabel": {
127
+ "type": "string",
128
+ "mutable": false,
129
+ "complexType": {
130
+ "original": "string",
131
+ "resolved": "string | undefined",
132
+ "references": {}
133
+ },
134
+ "required": false,
135
+ "optional": true,
136
+ "docs": {
137
+ "tags": [],
138
+ "text": "Accessible label for screen readers. Required for icon-only buttons."
139
+ },
140
+ "getter": false,
141
+ "setter": false,
142
+ "reflect": false,
143
+ "attribute": "aria-label"
105
144
  }
106
145
  };
107
146
  }