@reliability-design/web 1.2.0 → 1.3.1

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 (41) hide show
  1. package/dist/components/rel-accordion/rel-accordion.ts +289 -135
  2. package/dist/components/rel-alert/rel-alert.ts +8 -1
  3. package/dist/components/rel-avatar/README.md +15 -4
  4. package/dist/components/rel-avatar/rel-avatar.ts +138 -96
  5. package/dist/components/rel-badge/README.md +7 -0
  6. package/dist/components/rel-badge/rel-badge.ts +61 -8
  7. package/dist/components/rel-button/rel-button.ts +64 -7
  8. package/dist/components/rel-chip/README.md +7 -0
  9. package/dist/components/rel-chip/rel-chip.ts +250 -130
  10. package/dist/components/rel-date-picker/rel-date-picker.ts +116 -14
  11. package/dist/components/rel-drawer/rel-drawer.ts +5 -2
  12. package/dist/components/rel-menubar/rel-menubar.ts +1 -0
  13. package/dist/components/rel-pagination/rel-pagination.ts +442 -425
  14. package/dist/components/rel-radio/rel-radio.ts +16 -16
  15. package/dist/components/rel-range-picker/rel-range-picker.css +349 -349
  16. package/dist/components/rel-range-picker/rel-range-picker.ts +1080 -1079
  17. package/dist/components/rel-select/README.md +34 -28
  18. package/dist/components/rel-select/rel-select.ts +1015 -346
  19. package/dist/components/rel-sheet/rel-sheet.ts +6 -3
  20. package/dist/components/rel-skeleton/rel-skeleton.ts +139 -0
  21. package/dist/components/rel-tab/rel-tab.ts +10 -4
  22. package/dist/components/rel-textfield/rel-textfield.ts +637 -349
  23. package/dist/components/rel-toast/rel-toast.ts +1 -6
  24. package/dist/components/rel-topbar/rel-topbar-actions.ts +4 -0
  25. package/dist/components/rel-topbar/rel-topbar-brand.ts +4 -0
  26. package/dist/components/rel-topbar/rel-topbar-dropdown-item.ts +4 -0
  27. package/dist/components/rel-topbar/rel-topbar-dropdown.ts +4 -0
  28. package/dist/components/rel-topbar/rel-topbar-item.ts +4 -0
  29. package/dist/components/rel-topbar/rel-topbar-mobile-panel.ts +4 -0
  30. package/dist/components/rel-topbar/rel-topbar-profile.ts +3 -0
  31. package/dist/components/rel-topbar/rel-topbar-utilities.ts +4 -0
  32. package/dist/components/rel-topbar/rel-topbar.ts +6 -0
  33. package/dist/index.d.mts +239 -22
  34. package/dist/index.d.ts +239 -22
  35. package/dist/index.js +2609 -981
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +2621 -994
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/styles/vars.css +17 -0
  40. package/dist/{vars-I2PC74XD.css → vars-F54UGCHM.css} +17 -0
  41. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  # rel-select
2
2
 
3
3
  ## Overview
4
- A customizable dropdown select component with support for icons, multiple states, and sizes. Features built-in validation states, supporting text, and comprehensive styling options for form-based interfaces.
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` | `""` | Icon or text displayed on the left side |
44
- | `rightIcon` | `string` | `""` | Icon or text displayed on the right side (before dropdown arrow) |
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-lg`, `--rel-spacing-space-xl`, `--rel-spacing-space-2xl`, `--rel-spacing-space-3xl` - Padding and icon positioning
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-colors-gray-heading` - Label text color
70
- - `--rel-colors-gray-primary` - Icon and border hover color
71
- - `--rel-colors-gray-border` - Default border color
72
- - `--rel-colors-gray-placeholder` - Supporting text color
73
- - `--rel-colors-white` - Background color
74
- - `--rel-colors-primary-500` - Focus border and shadow color
75
- - `--rel-colors-red-secondary` - Error state border color
76
- - `--rel-background-error-light` - Error state focus shadow
77
- - `--rel-surface-surface` - Disabled background
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-300` - Rounded border radius
81
+ - `--rel-borders-radius-border-radius-100` - Rounded border radius (default `border="rounded"`)
83
82
 
84
83
  ## Accessibility
85
- - Native `<select>` element provides built-in keyboard navigation
86
- - Focus visible states with clear visual indicators (border color and box shadow)
87
- - Label properly associated with select for screen readers
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
- - `Space/Enter` - Open dropdown
93
- - `Arrow Up/Down` - Navigate options
94
- - `Escape` - Close dropdown
95
- - `Tab` - Move focus to next element
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 keyboard focus
99
- - Focus state uses box-shadow for visibility
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 Option" which is hidden from the dropdown list
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 native dropdown arrow is always visible on the right side, custom rightIcon appears before it
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