@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.
- package/dist/components/rel-accordion/rel-accordion.ts +289 -150
- package/dist/components/rel-alert/rel-alert.ts +34 -34
- package/dist/components/rel-avatar/README.md +15 -4
- package/dist/components/rel-avatar/rel-avatar.ts +138 -94
- package/dist/components/rel-badge/README.md +7 -0
- package/dist/components/rel-badge/rel-badge.ts +39 -2
- package/dist/components/rel-breadcrumb/rel-breadcrumb.ts +6 -6
- package/dist/components/rel-button/rel-button.ts +96 -28
- package/dist/components/rel-calendar/rel-calendar.ts +15 -8
- package/dist/components/rel-card/rel-card.ts +9 -17
- package/dist/components/rel-cardmedia/rel-cardmedia.ts +20 -23
- package/dist/components/rel-carousel/rel-carousel.ts +596 -468
- package/dist/components/rel-checkbox/rel-checkbox.ts +68 -16
- package/dist/components/rel-chip/README.md +7 -0
- package/dist/components/rel-chip/rel-chip.ts +411 -244
- package/dist/components/rel-container/rel-container.ts +2 -2
- package/dist/components/rel-date-picker/rel-date-picker.ts +23 -19
- package/dist/components/rel-divider/rel-divider.ts +3 -3
- package/dist/components/rel-drawer/rel-drawer-footer.ts +0 -2
- package/dist/components/rel-drawer/rel-drawer.ts +46 -90
- package/dist/components/rel-kbd/rel-kbd.ts +94 -118
- package/dist/components/rel-layout/rel-layout.ts +49 -58
- package/dist/components/rel-menu/rel-menu.ts +359 -359
- package/dist/components/rel-menubar/rel-menubar-menu.css +3 -0
- package/dist/components/rel-menubar/rel-menubar-menu.ts +2 -1
- package/dist/components/rel-menubar/rel-menubar.ts +603 -605
- package/dist/components/rel-otp/rel-otp.ts +22 -25
- package/dist/components/rel-pagination/rel-pagination.ts +442 -381
- package/dist/components/rel-popover/rel-popover-content.ts +6 -5
- package/dist/components/rel-popover/rel-popover.ts +26 -7
- package/dist/components/rel-progress/rel-progress.ts +10 -9
- package/dist/components/rel-radio/rel-radio.ts +228 -172
- package/dist/components/rel-range-picker/rel-range-picker.css +349 -0
- package/dist/components/rel-range-picker/rel-range-picker.ts +1080 -0
- package/dist/components/rel-resizable/rel-resizable-handle.ts +8 -7
- package/dist/components/rel-segmented-button/rel-segmented-button.ts +41 -20
- package/dist/components/rel-select/README.md +34 -28
- package/dist/components/rel-select/rel-select.ts +1015 -275
- package/dist/components/rel-sheet/rel-sheet.ts +365 -684
- package/dist/components/rel-skeleton/rel-skeleton.ts +139 -0
- package/dist/components/rel-slider/rel-slider.ts +49 -27
- package/dist/components/rel-snackbar/rel-snackbar.ts +28 -28
- package/dist/components/rel-stepper/rel-stepper.ts +11 -10
- package/dist/components/rel-switch/rel-switch.ts +7 -6
- package/dist/components/rel-tab/rel-tab.ts +15 -29
- package/dist/components/rel-textfield/rel-textfield.ts +192 -35
- package/dist/components/rel-toast/rel-toast.ts +21 -13
- package/dist/components/rel-tooltip/rel-tooltip.ts +123 -123
- package/dist/components/rel-topbar/rel-topbar-actions.ts +1 -0
- package/dist/components/rel-topbar/rel-topbar-brand.ts +1 -0
- package/dist/components/rel-topbar/rel-topbar-dropdown-item.ts +32 -2
- package/dist/components/rel-topbar/rel-topbar-dropdown.ts +1 -1
- package/dist/components/rel-topbar/rel-topbar-item.ts +15 -10
- package/dist/components/rel-topbar/rel-topbar-mobile-panel.ts +1 -0
- package/dist/components/rel-topbar/rel-topbar-profile.ts +30 -56
- package/dist/components/rel-topbar/rel-topbar-utilities.ts +1 -0
- package/dist/components/rel-topbar/rel-topbar.ts +137 -28
- package/dist/index.d.mts +310 -193
- package/dist/index.d.ts +310 -193
- package/dist/index.js +5562 -3526
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5328 -3284
- package/dist/index.mjs.map +1 -1
- package/dist/rel-menubar-menu-BEEQDAXW.css +3 -0
- package/dist/styles/vars-v2.css +525 -0
- package/dist/styles/vars.css +346 -346
- package/dist/{vars-TBB4BMSD.css → vars-I2PC74XD.css} +346 -346
- package/dist/vars-v2-VMGWTFJZ.css +525 -0
- package/package.json +2 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import "../../styles/vars-v2.css";
|
|
3
4
|
|
|
4
5
|
@customElement("rel-resizable-handle")
|
|
5
6
|
export class RelResizableHandle extends LitElement {
|
|
@@ -15,7 +16,7 @@ export class RelResizableHandle extends LitElement {
|
|
|
15
16
|
|
|
16
17
|
/** Index of this handle in the parent group */
|
|
17
18
|
public handleIndex = -1;
|
|
18
|
-
|
|
19
|
+
|
|
19
20
|
/** Current split value (0-100) for aria-valuenow */
|
|
20
21
|
public splitValue = 50;
|
|
21
22
|
|
|
@@ -31,7 +32,7 @@ export class RelResizableHandle extends LitElement {
|
|
|
31
32
|
flex-shrink: 0;
|
|
32
33
|
position: relative;
|
|
33
34
|
outline: none;
|
|
34
|
-
background: var(--rel-
|
|
35
|
+
background: var(--rel-color-border-default);
|
|
35
36
|
transition: background 0.15s ease;
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -49,7 +50,7 @@ export class RelResizableHandle extends LitElement {
|
|
|
49
50
|
|
|
50
51
|
:host(:hover),
|
|
51
52
|
:host(:focus-visible) {
|
|
52
|
-
background: var(--rel-
|
|
53
|
+
background: var(--rel-color-bg-selected);
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
:host(:focus-visible) {
|
|
@@ -58,7 +59,7 @@ export class RelResizableHandle extends LitElement {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
.grabber {
|
|
61
|
-
background: var(--rel-
|
|
62
|
+
background: var(--rel-color-icon-primary);
|
|
62
63
|
border-radius: var(--rel-borders-radius-border-radius-500);
|
|
63
64
|
transition: background 0.15s ease;
|
|
64
65
|
}
|
|
@@ -75,15 +76,15 @@ export class RelResizableHandle extends LitElement {
|
|
|
75
76
|
|
|
76
77
|
:host(:hover) .grabber,
|
|
77
78
|
:host(:focus-visible) .grabber {
|
|
78
|
-
background: var(--rel-
|
|
79
|
+
background: var(--rel-color-bg-primary);
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
:host([data-dragging]) {
|
|
82
|
-
background: var(--rel-
|
|
83
|
+
background: var(--rel-color-bg-selected);
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
:host([data-dragging]) .grabber {
|
|
86
|
-
background: var(--rel-
|
|
87
|
+
background: var(--rel-color-text-primary);
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import "../../styles/vars-v2.css";
|
|
3
4
|
|
|
4
5
|
export type SegmentSize = "small" | "medium";
|
|
5
6
|
export type SegmentAlign = "left" | "middle" | "right";
|
|
@@ -28,8 +29,8 @@ export class RelSegmentedButton extends LitElement {
|
|
|
28
29
|
|
|
29
30
|
.segmented-buttons {
|
|
30
31
|
display: inline-flex;
|
|
31
|
-
border:
|
|
32
|
-
border-radius: var(--rel-borders-radius-border-radius-
|
|
32
|
+
border: 1px solid var(--rel-color-border-default);
|
|
33
|
+
border-radius: var(--rel-borders-radius-border-radius-100);
|
|
33
34
|
overflow: hidden;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -48,50 +49,70 @@ export class RelSegmentedButton extends LitElement {
|
|
|
48
49
|
|
|
49
50
|
/* Base segment styling */
|
|
50
51
|
.segment {
|
|
51
|
-
background: var(--rel-
|
|
52
|
+
background: var(--rel-color-bg-primary);
|
|
52
53
|
border: none;
|
|
54
|
+
border-radius: 0;
|
|
53
55
|
cursor: pointer;
|
|
54
|
-
font-weight: var(--rel-fontWeights-medium
|
|
55
|
-
border-right:
|
|
56
|
-
transition:
|
|
57
|
-
color: var(--rel-text-heading
|
|
58
|
-
font-family: var(--rel-fontFamilies-primary
|
|
56
|
+
font-weight: var(--rel-fontWeights-medium);
|
|
57
|
+
border-right: 1px solid var(--rel-color-border-default);
|
|
58
|
+
transition: background 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
|
59
|
+
color: var(--rel-color-text-heading);
|
|
60
|
+
font-family: var(--rel-fontFamilies-primary);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
.segment:
|
|
62
|
-
|
|
63
|
-
outline-offset: -2px;
|
|
64
|
-
z-index: 1;
|
|
63
|
+
.segment:first-child {
|
|
64
|
+
border-radius: var(--rel-borders-radius-border-radius-100) 0 0 var(--rel-borders-radius-border-radius-100);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.segment:last-child {
|
|
68
|
+
border-radius: 0 var(--rel-borders-radius-border-radius-100) var(--rel-borders-radius-border-radius-100) 0;
|
|
68
69
|
border-right: none;
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
.segment:focus-visible {
|
|
73
|
+
outline: 2px solid var(--rel-color-border-focus);
|
|
74
|
+
outline-offset: -2px;
|
|
75
|
+
z-index: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
71
78
|
/* Hover */
|
|
72
79
|
.segment:hover:not(.disabled):not(.active) {
|
|
73
|
-
background: var(--rel-
|
|
80
|
+
background: var(--rel-color-bg-hover);
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
/* Active */
|
|
77
84
|
.segment.active {
|
|
78
|
-
background:
|
|
79
|
-
color:
|
|
85
|
+
background: #2B2B2B;
|
|
86
|
+
color: #FFFFFF;
|
|
87
|
+
border-radius: var(--rel-borders-radius-border-radius-100) !important;
|
|
80
88
|
}
|
|
81
89
|
|
|
82
90
|
.segment.active:hover:not(.disabled) {
|
|
83
|
-
background:
|
|
84
|
-
color:
|
|
91
|
+
background: #333333;
|
|
92
|
+
color: #FFFFFF;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Dark mode active override */
|
|
96
|
+
:host-context([data-theme="dark"]) .segment.active,
|
|
97
|
+
:host-context(.dark) .segment.active {
|
|
98
|
+
background: #F5F5F5;
|
|
99
|
+
color: #1A1A1A;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host-context([data-theme="dark"]) .segment.active:hover,
|
|
103
|
+
:host-context(.dark) .segment.active:hover {
|
|
104
|
+
background: #D4D4D4;
|
|
105
|
+
color: #1A1A1A;
|
|
85
106
|
}
|
|
86
107
|
|
|
87
108
|
/* Disabled */
|
|
88
109
|
.segment.disabled,
|
|
89
110
|
.segment:disabled {
|
|
90
111
|
cursor: not-allowed;
|
|
112
|
+
pointer-events: auto;
|
|
91
113
|
opacity: 0.5;
|
|
92
|
-
background: var(--rel-
|
|
93
|
-
color: var(--rel-text-disabled
|
|
94
|
-
pointer-events: none;
|
|
114
|
+
background: var(--rel-color-bg-tertiary);
|
|
115
|
+
color: var(--rel-color-text-disabled);
|
|
95
116
|
}
|
|
96
117
|
|
|
97
118
|
/* Sizes */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# rel-select
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
|
-
A
|
|
4
|
+
A custom combobox-style select component built on the same textfield visual language (sizes, states, border styles). Renders a typeable text trigger with a custom-styled dropdown listbox (no native `<select>`/`<option>` rendering), so the dropdown is fully themeable in both light and dark mode. Supports icons, multiple states, and sizes, with built-in keyboard navigation, type-to-filter, and an inline "ghost text" autocomplete suggestion.
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
```html
|
|
@@ -40,8 +40,9 @@ A customizable dropdown select component with support for icons, multiple states
|
|
|
40
40
|
| `supportingText` | `string` | `""` | Helper or error text displayed below the select |
|
|
41
41
|
| `size` | `"small" \| "medium" \| "large"` | `"medium"` | Size variant affecting padding and font size |
|
|
42
42
|
| `border` | `"rounded" \| "sharp"` | `"rounded"` | Border radius style |
|
|
43
|
-
| `leftIcon` | `string` | `""` |
|
|
44
|
-
| `rightIcon` | `string` | `""` |
|
|
43
|
+
| `leftIcon` | `string` | `""` | `rel-icon` name displayed on the left side |
|
|
44
|
+
| `rightIcon` | `string` | `""` | `rel-icon` name to override the default right-side icon. When unset, a chevron is shown that rotates 180° on open; a custom `rightIcon` replaces the chevron entirely and does not rotate |
|
|
45
|
+
| `placeholder` | `string` | `"Select option"` | Placeholder text shown when nothing is selected |
|
|
45
46
|
|
|
46
47
|
## Events
|
|
47
48
|
| Event | Detail | Description |
|
|
@@ -63,45 +64,50 @@ None exposed.
|
|
|
63
64
|
|
|
64
65
|
### Spacing Tokens
|
|
65
66
|
- `--rel-spacing-space-3xs`, `--rel-spacing-space-2xs`, `--rel-spacing-space-xs` - Internal padding
|
|
66
|
-
- `--rel-spacing-space-sm`, `--rel-spacing-space-
|
|
67
|
+
- `--rel-spacing-space-sm`, `--rel-spacing-space-md`, `--rel-spacing-space-xl`, `--rel-spacing-space-2xl` - Padding and icon positioning
|
|
67
68
|
|
|
68
69
|
### Color Tokens
|
|
69
|
-
- `--rel-
|
|
70
|
-
- `--rel-
|
|
71
|
-
- `--rel-
|
|
72
|
-
- `--rel-
|
|
73
|
-
- `--rel-
|
|
74
|
-
- `--rel-
|
|
75
|
-
- `--rel-
|
|
76
|
-
- `--rel-
|
|
77
|
-
- `--rel-
|
|
78
|
-
- `--rel-text-heading` - Select text color
|
|
79
|
-
- `--rel-text-disabled` - Disabled text color
|
|
70
|
+
- `--rel-color-text-heading` - Label and selected-value text color
|
|
71
|
+
- `--rel-color-text-primary` - Icon color, focus border/shadow color
|
|
72
|
+
- `--rel-color-text-placeholder` - Placeholder, supporting text, and ghost-suggestion text color
|
|
73
|
+
- `--rel-color-text-disabled` - Disabled text/icon color
|
|
74
|
+
- `--rel-color-border-default` - Default border color
|
|
75
|
+
- `--rel-color-bg-primary` - Background color (trigger and dropdown panel)
|
|
76
|
+
- `--rel-color-bg-tertiary` - Disabled background, hovered/highlighted option background
|
|
77
|
+
- `--rel-error-surface-default` - Error state border, text, and icon color (light: `#D50000`, dark: `#FF5252`)
|
|
78
|
+
- `--rel-shadows-shadow-200` - Dropdown panel shadow
|
|
80
79
|
|
|
81
80
|
### Border Tokens
|
|
82
|
-
- `--rel-borders-radius-border-radius-
|
|
81
|
+
- `--rel-borders-radius-border-radius-100` - Rounded border radius (default `border="rounded"`)
|
|
83
82
|
|
|
84
83
|
## Accessibility
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
84
|
+
- Trigger input uses `role="combobox"` with `aria-haspopup="listbox"`, `aria-expanded`, and `aria-controls`
|
|
85
|
+
- Dropdown panel uses `role="listbox"`; each option uses `role="option"` with `aria-selected`
|
|
86
|
+
- `aria-activedescendant` tracks the keyboard-highlighted option
|
|
87
|
+
- Label properly associated with the trigger via `for`/`id`
|
|
88
88
|
- Disabled state prevents interaction and reduces opacity
|
|
89
89
|
- Error state communicated through color and supporting text
|
|
90
90
|
|
|
91
91
|
### Keyboard Interactions
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
- `
|
|
95
|
-
- `
|
|
92
|
+
- Typing - Filters the dropdown to matching options and shows an inline "ghost text" suggestion for the best prefix match
|
|
93
|
+
- `→ (Arrow Right)` - When the cursor is at the end of the input, accepts the current ghost-text suggestion
|
|
94
|
+
- `Enter` - Opens the dropdown (if closed); if open, selects the highlighted option, or commits the typed text if it exactly matches an option
|
|
95
|
+
- `Arrow Up/Down` - Open dropdown (if closed) or move the highlighted option
|
|
96
|
+
- `Home/End` - Jump to first/last filtered option (when open)
|
|
97
|
+
- `Escape` - Revert input text to the committed value and close the dropdown
|
|
98
|
+
- `Tab` - Accept any ghost suggestion, commit or revert the typed text, close the dropdown, and move focus to the next element
|
|
96
99
|
|
|
97
100
|
### Focus Behavior
|
|
98
|
-
- Clear focus ring with primary color on
|
|
99
|
-
-
|
|
101
|
+
- Clear focus ring with primary color via `box-shadow` on the container (`:focus-within`)
|
|
102
|
+
- Trigger input is a normal editable text field with a visible caret
|
|
100
103
|
|
|
101
104
|
## Notes / Edge Cases
|
|
102
105
|
- When `state="disabled"`, the select becomes non-interactive with reduced opacity and cursor indication
|
|
103
|
-
- Empty `selected` value shows placeholder text "Select
|
|
106
|
+
- Empty `selected` value shows the `placeholder` text ("Select option" by default)
|
|
104
107
|
- Icons (left/right) adjust internal padding automatically to accommodate icon space
|
|
105
|
-
- The
|
|
106
|
-
- In error state, supporting text is styled with error color for visual consistency
|
|
108
|
+
- The chevron is always visible on the far right and rotates 180° when the dropdown is open; a custom `rightIcon` replaces it entirely (no chevron) and does not rotate
|
|
109
|
+
- In error state, supporting text is styled with error color for visual consistency; the error state automatically clears once a valid option is selected
|
|
107
110
|
- Options array is rendered as-is; complex objects not supported (use string values only)
|
|
111
|
+
- Typed text that doesn't exactly match (case-insensitive) any option reverts to the last committed `selected` value on blur, Escape, or Tab
|
|
112
|
+
- The ghost-text suggestion shows the remainder of the first option whose name starts with the typed text (case-insensitive); it has no effect on filtering, which matches substrings anywhere in an option
|
|
113
|
+
- Dropdown panel is positioned via `position: fixed` and flips above the trigger if there isn't enough viewport space below
|