@reliability-design/web 1.1.1 → 1.3.0

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 (69) hide show
  1. package/dist/components/rel-accordion/rel-accordion.ts +289 -150
  2. package/dist/components/rel-alert/rel-alert.ts +34 -34
  3. package/dist/components/rel-avatar/README.md +15 -4
  4. package/dist/components/rel-avatar/rel-avatar.ts +138 -94
  5. package/dist/components/rel-badge/README.md +7 -0
  6. package/dist/components/rel-badge/rel-badge.ts +39 -2
  7. package/dist/components/rel-breadcrumb/rel-breadcrumb.ts +6 -6
  8. package/dist/components/rel-button/rel-button.ts +96 -28
  9. package/dist/components/rel-calendar/rel-calendar.ts +15 -8
  10. package/dist/components/rel-card/rel-card.ts +9 -17
  11. package/dist/components/rel-cardmedia/rel-cardmedia.ts +20 -23
  12. package/dist/components/rel-carousel/rel-carousel.ts +596 -468
  13. package/dist/components/rel-checkbox/rel-checkbox.ts +68 -16
  14. package/dist/components/rel-chip/README.md +7 -0
  15. package/dist/components/rel-chip/rel-chip.ts +411 -244
  16. package/dist/components/rel-container/rel-container.ts +2 -2
  17. package/dist/components/rel-date-picker/rel-date-picker.ts +23 -19
  18. package/dist/components/rel-divider/rel-divider.ts +3 -3
  19. package/dist/components/rel-drawer/rel-drawer-footer.ts +0 -2
  20. package/dist/components/rel-drawer/rel-drawer.ts +46 -90
  21. package/dist/components/rel-kbd/rel-kbd.ts +94 -118
  22. package/dist/components/rel-layout/rel-layout.ts +49 -58
  23. package/dist/components/rel-menu/rel-menu.ts +359 -359
  24. package/dist/components/rel-menubar/rel-menubar-menu.css +3 -0
  25. package/dist/components/rel-menubar/rel-menubar-menu.ts +2 -1
  26. package/dist/components/rel-menubar/rel-menubar.ts +603 -605
  27. package/dist/components/rel-otp/rel-otp.ts +22 -25
  28. package/dist/components/rel-pagination/rel-pagination.ts +442 -381
  29. package/dist/components/rel-popover/rel-popover-content.ts +6 -5
  30. package/dist/components/rel-popover/rel-popover.ts +26 -7
  31. package/dist/components/rel-progress/rel-progress.ts +10 -9
  32. package/dist/components/rel-radio/rel-radio.ts +228 -172
  33. package/dist/components/rel-range-picker/rel-range-picker.css +349 -0
  34. package/dist/components/rel-range-picker/rel-range-picker.ts +1080 -0
  35. package/dist/components/rel-resizable/rel-resizable-handle.ts +8 -7
  36. package/dist/components/rel-segmented-button/rel-segmented-button.ts +41 -20
  37. package/dist/components/rel-select/README.md +34 -28
  38. package/dist/components/rel-select/rel-select.ts +1015 -275
  39. package/dist/components/rel-sheet/rel-sheet.ts +365 -684
  40. package/dist/components/rel-skeleton/rel-skeleton.ts +139 -0
  41. package/dist/components/rel-slider/rel-slider.ts +49 -27
  42. package/dist/components/rel-snackbar/rel-snackbar.ts +28 -28
  43. package/dist/components/rel-stepper/rel-stepper.ts +11 -10
  44. package/dist/components/rel-switch/rel-switch.ts +7 -6
  45. package/dist/components/rel-tab/rel-tab.ts +15 -29
  46. package/dist/components/rel-textfield/rel-textfield.ts +192 -35
  47. package/dist/components/rel-toast/rel-toast.ts +21 -13
  48. package/dist/components/rel-tooltip/rel-tooltip.ts +123 -123
  49. package/dist/components/rel-topbar/rel-topbar-actions.ts +1 -0
  50. package/dist/components/rel-topbar/rel-topbar-brand.ts +1 -0
  51. package/dist/components/rel-topbar/rel-topbar-dropdown-item.ts +32 -2
  52. package/dist/components/rel-topbar/rel-topbar-dropdown.ts +1 -1
  53. package/dist/components/rel-topbar/rel-topbar-item.ts +15 -10
  54. package/dist/components/rel-topbar/rel-topbar-mobile-panel.ts +1 -0
  55. package/dist/components/rel-topbar/rel-topbar-profile.ts +30 -56
  56. package/dist/components/rel-topbar/rel-topbar-utilities.ts +1 -0
  57. package/dist/components/rel-topbar/rel-topbar.ts +137 -28
  58. package/dist/index.d.mts +310 -193
  59. package/dist/index.d.ts +310 -193
  60. package/dist/index.js +5562 -3526
  61. package/dist/index.js.map +1 -1
  62. package/dist/index.mjs +5328 -3284
  63. package/dist/index.mjs.map +1 -1
  64. package/dist/rel-menubar-menu-BEEQDAXW.css +3 -0
  65. package/dist/styles/vars-v2.css +525 -0
  66. package/dist/styles/vars.css +346 -346
  67. package/dist/{vars-TBB4BMSD.css → vars-I2PC74XD.css} +346 -346
  68. package/dist/vars-v2-VMGWTFJZ.css +525 -0
  69. package/package.json +2 -1
@@ -47,12 +47,13 @@ export class RelCheckbox extends LitElement {
47
47
  pointer-events: none;
48
48
  }
49
49
 
50
+ /* Unchecked — transparent fill, gray border */
50
51
  .box {
51
52
  width: 18px;
52
53
  height: 18px;
53
54
  border-radius: 4px;
54
- border: 2px solid var(--rel-text-heading, #2b2b2b);
55
- background: var(--rel-colors-white, #fff);
55
+ border: 2px solid var(--rel-gray-text-primary);
56
+ background: transparent;
56
57
  display: flex;
57
58
  align-items: center;
58
59
  justify-content: center;
@@ -61,7 +62,7 @@ export class RelCheckbox extends LitElement {
61
62
  }
62
63
 
63
64
  input:focus-visible + .box {
64
- outline: 2px solid var(--rel-border-info, #0091ea);
65
+ outline: 2px solid var(--rel-color-border-focus);
65
66
  outline-offset: 2px;
66
67
  }
67
68
 
@@ -71,36 +72,43 @@ export class RelCheckbox extends LitElement {
71
72
  display: none;
72
73
  }
73
74
 
74
- .checked .box,
75
- .indeterminate .box {
76
- background: var(--rel-text-heading, #2b2b2b);
77
- border-color: var(--rel-text-heading, #2b2b2b);
75
+ /* Checked — filled box, transparent checkmark (bg shows through) */
76
+ .checked .box {
77
+ background: var(--rel-gray-text-primary);
78
+ border-color: var(--rel-gray-text-primary);
78
79
  }
79
80
 
80
81
  .checked .check-icon {
81
82
  display: block;
83
+ fill: #ffffff;
82
84
  }
83
85
 
86
+ /* Indeterminate — transparent fill, dash inherits border color */
84
87
  .indeterminate .indeterminate-icon {
85
88
  display: block;
89
+ fill: var(--rel-gray-text-primary);
86
90
  }
87
91
 
92
+ /* Error unchecked — transparent fill, error border */
88
93
  .error .box {
89
- border-color: var(--rel-colors-red-primary);
94
+ border-color: var(--rel-error-surface-default);
90
95
  }
91
96
 
92
- .error.checked .box,
93
- .error.indeterminate .box {
94
- background: var(--rel-colors-red-primary);
95
- border-color: var(--rel-colors-red-primary);
97
+ /* Error checked — error fill, transparent checkmark */
98
+ .error.checked .box {
99
+ background: var(--rel-error-surface-default);
100
+ border-color: var(--rel-error-surface-default);
96
101
  }
97
102
 
98
- /* Pin checkmark/dash to white on red background — correct in both themes */
99
- .error.checked svg,
100
- .error.indeterminate svg {
103
+ .error.checked .check-icon {
101
104
  fill: #ffffff;
102
105
  }
103
106
 
107
+ /* Error indeterminate — transparent fill, dash is error color */
108
+ .error.indeterminate .indeterminate-icon {
109
+ fill: var(--rel-error-surface-default);
110
+ }
111
+
104
112
  .disabled {
105
113
  opacity: 0.55;
106
114
  cursor: not-allowed;
@@ -114,10 +122,54 @@ export class RelCheckbox extends LitElement {
114
122
  pointer-events: none;
115
123
  }
116
124
 
125
+ .disabled .label,
126
+ .disabled .text {
127
+ color: var(--rel-color-text-disabled);
128
+ }
129
+
130
+ /* Dark mode — tokens auto-flip via vars-v2, declared explicitly for clarity */
131
+ :host-context([data-theme="dark"]) .box {
132
+ border-color: var(--rel-gray-text-primary);
133
+ }
134
+
135
+ :host-context([data-theme="dark"]) .checked .box {
136
+ background: var(--rel-gray-text-primary);
137
+ border-color: var(--rel-gray-text-primary);
138
+ }
139
+
140
+ :host-context([data-theme="dark"]) .checked .check-icon {
141
+ fill: var(--rel-color-bg-primary);
142
+ }
143
+
144
+ :host-context([data-theme="dark"]) .indeterminate .indeterminate-icon {
145
+ fill: var(--rel-gray-text-primary);
146
+ }
147
+
148
+ :host-context([data-theme="dark"]) .error .box {
149
+ border-color: var(--rel-error-surface-default);
150
+ }
151
+
152
+ :host-context([data-theme="dark"]) .error.checked .box {
153
+ background: var(--rel-error-surface-default);
154
+ border-color: var(--rel-error-surface-default);
155
+ }
156
+
157
+ :host-context([data-theme="dark"]) .error.checked .check-icon {
158
+ fill: var(--rel-color-bg-primary);
159
+ }
160
+
161
+ :host-context([data-theme="dark"]) .error.indeterminate .indeterminate-icon {
162
+ fill: var(--rel-error-surface-default);
163
+ }
164
+
165
+ :host-context([data-theme="dark"]) .label {
166
+ color: var(--rel-gray-text-primary);
167
+ }
168
+
117
169
  .label {
118
170
  font-size: var(--rel-fontSizes-md, 14px);
119
171
  font-weight: var(--rel-fontWeights-medium, 500);
120
- color: var(--rel-text-primary, #333);
172
+ color: var(--rel-gray-text-primary);
121
173
  }
122
174
 
123
175
  .text {
@@ -17,6 +17,9 @@ A compact chip component for displaying tags, labels, or selected options. Suppo
17
17
  <!-- Outline variant -->
18
18
  <rel-chip label="Outline Style" tone="blue" outline></rel-chip>
19
19
 
20
+ <!-- Small size variant -->
21
+ <rel-chip label="Small" size="sm" tone="blue"></rel-chip>
22
+
20
23
  <!-- With avatar -->
21
24
  <rel-chip id="avatarChip" label="John Doe" avatar="./user.jpg"></rel-chip>
22
25
 
@@ -43,6 +46,7 @@ A compact chip component for displaying tags, labels, or selected options. Suppo
43
46
  | Name | Type | Default | Description |
44
47
  |------|------|---------|-------------|
45
48
  | `label` | `string` | `"Label"` | Text displayed on the chip |
49
+ | `size` (reflected) | `"sm" \| "md"` | `"md"` | Chip size variant |
46
50
  | `tone` | `"default" \| "blue" \| "yellow" \| "red" \| "green"` | `"default"` | Color tone variant |
47
51
  | `leadingIcon` | `string` | - | SVG or HTML string for leading icon |
48
52
  | `trailingIcon` | `string` | - | SVG or HTML string for trailing icon |
@@ -103,6 +107,9 @@ None exposed.
103
107
  - Remove button focus: 2px white outline with 1px offset
104
108
 
105
109
  ## Notes / Edge Cases
110
+ - **Size variants**:
111
+ - **md** (default): `--rel-fontSizes-md` text, `--rel-spacing-space-2xs`/`--rel-spacing-space-xs` padding, 20px × 20px avatar, 16px × 16px icons
112
+ - **sm**: `--rel-fontSizes-sm` text, `--rel-spacing-space-3xs`/`--rel-spacing-space-2xs` padding, 16px × 16px avatar, 12px × 12px icons
106
113
  - Icons (`leadingIcon`, `trailingIcon`) must be passed as raw HTML/SVG strings via JavaScript (see examples)
107
114
  - Icons are injected using `renderIcon()` which creates a template element and clones the content
108
115
  - Avatar images are 20px × 20px circular (`border-radius: 50%`, `object-fit: cover`)