@ethlete/components 1.0.0-next.79 → 1.0.0-next.80
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/CHANGELOG.md +26 -0
- package/design/anchored-dialog.ts +92 -0
- package/design/button.ts +13 -1
- package/design/config.json +6 -1
- package/design/dialog.ts +5 -3
- package/design/form-field.ts +3 -0
- package/design/menu.ts +8 -4
- package/design/notification.ts +8 -4
- package/design/sdk/components/accordion/accordion.ts +5 -1
- package/design/sdk/components/anchored-dialog/anchored-dialog.css +63 -0
- package/design/sdk/components/anchored-dialog/anchored-dialog.ts +65 -0
- package/design/sdk/components/avatar/avatar.ts +3 -2
- package/design/sdk/components/badge/badge.ts +2 -1
- package/design/sdk/components/banner/banner.ts +2 -1
- package/design/sdk/components/bracket/bracket.ts +2 -1
- package/design/sdk/components/breadcrumb/breadcrumb.ts +2 -1
- package/design/sdk/components/button/button.css +11 -3
- package/design/sdk/components/button/button.ts +11 -2
- package/design/sdk/components/calendar/calendar.ts +2 -1
- package/design/sdk/components/card/card.ts +2 -1
- package/design/sdk/components/carousel/carousel.ts +2 -1
- package/design/sdk/components/chart/chart.ts +2 -1
- package/design/sdk/components/checkbox/checkbox.css +65 -0
- package/design/sdk/components/checkbox/checkbox.ts +180 -0
- package/design/sdk/components/chip/chip.ts +2 -1
- package/design/sdk/components/copy-button/copy-button.ts +2 -1
- package/design/sdk/components/description-list/description-list.ts +2 -1
- package/design/sdk/components/dialog/dialog.ts +2 -1
- package/design/sdk/components/divider/divider.ts +2 -1
- package/design/sdk/components/empty-state/empty-state.ts +2 -1
- package/design/sdk/components/grid/grid.ts +3 -2
- package/design/sdk/components/input/input.ts +2 -1
- package/design/sdk/components/kbd/kbd.ts +2 -1
- package/design/sdk/components/loader/loader.ts +2 -1
- package/design/sdk/components/masonry/masonry.ts +3 -2
- package/design/sdk/components/match/match.ts +2 -1
- package/design/sdk/components/menu/menu.ts +19 -7
- package/design/sdk/components/notification/notification.ts +2 -1
- package/design/sdk/components/otp-input/otp-input.ts +2 -1
- package/design/sdk/components/pagination/pagination.ts +2 -1
- package/design/sdk/components/picture/picture.ts +2 -1
- package/design/sdk/components/progress-steps/progress-steps.ts +2 -1
- package/design/sdk/components/query-error/query-error.ts +2 -1
- package/design/sdk/components/radio-group/radio-group.css +46 -0
- package/design/sdk/components/radio-group/radio-group.ts +167 -0
- package/design/sdk/components/scheduler/scheduler.ts +2 -1
- package/design/sdk/components/scrollable/scrollable.ts +2 -2
- package/design/sdk/components/scrollbar/scrollbar.ts +2 -1
- package/design/sdk/components/select/shared/select-part.ts +9 -2
- package/design/sdk/components/select-panel/select-panel.ts +2 -1
- package/design/sdk/components/skeleton/skeleton.ts +2 -1
- package/design/sdk/components/slider/slider.ts +2 -1
- package/design/sdk/components/standings/standings.ts +2 -1
- package/design/sdk/components/stat-tile/stat-tile.ts +2 -1
- package/design/sdk/components/stream/stream.ts +6 -1
- package/design/sdk/components/switch/switch.css +4 -2
- package/design/sdk/components/switch/switch.ts +2 -2
- package/design/sdk/components/table/table.ts +2 -1
- package/design/sdk/components/textarea/textarea.ts +4 -3
- package/design/sdk/components/timeline/timeline.ts +2 -2
- package/design/sdk/components/toolbar/toolbar.ts +2 -1
- package/design/sdk/foundations/colors/colors.css +16 -0
- package/design/sdk/foundations/colors/colors.ts +1 -1
- package/design/sdk/foundations/colors/shared/contrast.ts +1 -1
- package/design/sdk/pictures.json +1183 -0
- package/design/select.ts +5 -4
- package/design/textarea.ts +2 -0
- package/design/tooltip.ts +5 -5
- package/fesm2022/ethlete-components.mjs +1147 -957
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/generators/generators.json +2 -0
- package/package.json +1 -1
- package/src/lib/button/button-properties-styles.component.css +6 -6
- package/src/lib/button/button.component.css +11 -7
- package/src/lib/button/button.types.ts +33 -0
- package/src/lib/button/icon-button.component.css +3 -3
- package/src/lib/button/window-control-button.component.css +43 -3
- package/src/lib/calendar/calendar.component.css +2 -2
- package/src/lib/chip/chip.component.css +4 -4
- package/src/lib/forms/switch/switch.component.css +1 -14
- package/src/lib/kbd/kbd.component.css +1 -1
- package/src/lib/menu/menu.component.css +2 -2
- package/src/lib/notification/notification.component.css +3 -3
- package/types/ethlete-components.d.ts +146 -127
package/design/select.ts
CHANGED
|
@@ -38,7 +38,7 @@ export type SelectPanelMockOptions = {
|
|
|
38
38
|
multiple?: boolean;
|
|
39
39
|
/** The app's default color theme name: the panel provides it to the options. */
|
|
40
40
|
color?: string;
|
|
41
|
-
/** A surface theme name the app registers, for the panel. */
|
|
41
|
+
/** A surface theme name the app registers, for the panel. Left out, the panel takes the surface one elevation above its parent. */
|
|
42
42
|
surface?: string;
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -54,7 +54,7 @@ export type SelectMockOptions = {
|
|
|
54
54
|
clearLabel?: string;
|
|
55
55
|
/** The app's default color theme name: the panel provides it to the options. */
|
|
56
56
|
panelColor?: string;
|
|
57
|
-
/** A surface theme name the app registers, for the panel. */
|
|
57
|
+
/** A surface theme name the app registers, for the panel. Left out, the panel takes the surface one elevation above its parent. */
|
|
58
58
|
panelSurface?: string;
|
|
59
59
|
};
|
|
60
60
|
|
|
@@ -122,10 +122,11 @@ export const selectPanel = (options: SelectPanelMockOptions) => {
|
|
|
122
122
|
'et-select-panel',
|
|
123
123
|
'et-color--inherited',
|
|
124
124
|
options.color && `et-color--${options.color}`,
|
|
125
|
-
`et-surface--${options.surface
|
|
125
|
+
options.surface && `et-surface--${options.surface}`,
|
|
126
126
|
].filter(Boolean);
|
|
127
|
+
const autoSurface = options.surface ? '' : ' data-et-auto-surface';
|
|
127
128
|
|
|
128
|
-
return `<et-select-panel class="${classes.join(' ')}"><div class="et-select-panel-scroller et-scrollbar-host"><div class="et-select-panel-body"><div ${listbox.join(' ')}>${options.content}</div><div class="et-select-panel-extras"></div></div></div><et-scrollbar class="et-scrollbar" data-orientation="vertical"><div class="et-scrollbar-thumb"></div></et-scrollbar></et-select-panel>`;
|
|
129
|
+
return `<et-select-panel${autoSurface} class="${classes.join(' ')}"><div class="et-select-panel-scroller et-scrollbar-host"><div class="et-select-panel-body"><div ${listbox.join(' ')}>${options.content}</div><div class="et-select-panel-extras"></div></div></div><et-scrollbar class="et-scrollbar" data-orientation="vertical"><div class="et-scrollbar-thumb"></div></et-scrollbar></et-select-panel>`;
|
|
129
130
|
};
|
|
130
131
|
|
|
131
132
|
/**
|
package/design/textarea.ts
CHANGED
|
@@ -37,6 +37,7 @@ export const textareaField = (options: TextareaFieldMockOptions = {}) => {
|
|
|
37
37
|
mixed,
|
|
38
38
|
mixedLabel = 'Mixed',
|
|
39
39
|
force,
|
|
40
|
+
ariaLabel,
|
|
40
41
|
...field
|
|
41
42
|
} = options;
|
|
42
43
|
const forced = forceList(force);
|
|
@@ -47,6 +48,7 @@ export const textareaField = (options: TextareaFieldMockOptions = {}) => {
|
|
|
47
48
|
rows,
|
|
48
49
|
autosize,
|
|
49
50
|
minRows,
|
|
51
|
+
ariaLabel,
|
|
50
52
|
});
|
|
51
53
|
|
|
52
54
|
let html = formField({
|
package/design/tooltip.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type TooltipMockOptions = {
|
|
|
11
11
|
content?: string;
|
|
12
12
|
/** The side the pane opened on; the arrow points back at the trigger. Defaults to `top`. */
|
|
13
13
|
placement?: Placement;
|
|
14
|
-
/** A surface theme name the app registers. */
|
|
14
|
+
/** A surface theme name the app registers. Left out, the pane takes the surface one elevation above its parent. */
|
|
15
15
|
surface?: string;
|
|
16
16
|
/** The tooltip id, which the trigger's `aria-describedby` points at. */
|
|
17
17
|
id?: string;
|
|
@@ -58,7 +58,7 @@ export const tooltipStyles = /* @__PURE__ */ [
|
|
|
58
58
|
*/
|
|
59
59
|
export const tooltip = (options: TooltipMockOptions = {}) => {
|
|
60
60
|
const { placement = 'top', id = 'et-tooltip-1' } = options;
|
|
61
|
-
const surface = `et-surface--${options.surface
|
|
61
|
+
const surface = options.surface && `et-surface--${options.surface}`;
|
|
62
62
|
const hasTemplate = options.content !== undefined;
|
|
63
63
|
|
|
64
64
|
const paneClasses = [
|
|
@@ -71,17 +71,17 @@ export const tooltip = (options: TooltipMockOptions = {}) => {
|
|
|
71
71
|
surface,
|
|
72
72
|
'et-with-default-animation',
|
|
73
73
|
'et-animation-enter-done',
|
|
74
|
-
];
|
|
74
|
+
].filter(Boolean);
|
|
75
75
|
|
|
76
76
|
const tooltipAttributes = [
|
|
77
77
|
options.attributes,
|
|
78
78
|
'role="tooltip"',
|
|
79
|
-
`class="et-tooltip et-color--inherited ${surface}"`,
|
|
79
|
+
`class="et-tooltip et-color--inherited ${surface ?? 'et-surface--inherited'}"`,
|
|
80
80
|
`id="${id}"`,
|
|
81
81
|
hasTemplate && 'data-has-template="true"',
|
|
82
82
|
].filter(Boolean);
|
|
83
83
|
|
|
84
84
|
const body = hasTemplate ? options.content : `<p class="et-tooltip__text">${options.text ?? ''}</p>`;
|
|
85
85
|
|
|
86
|
-
return `<div class="et-tooltip-mock-frame"><div class="${paneClasses.join(' ')}" data-overlay-placement="${placement}"><et-tooltip ${tooltipAttributes.join(' ')}><div class="et-tooltip__surface"><div class="et-tooltip__content">${body}</div></div></et-tooltip><div et-floating-arrow class="et-overlay-arrow"></div></div></div>`;
|
|
86
|
+
return `<div class="et-tooltip-mock-frame"><div class="${paneClasses.join(' ')}" data-overlay-placement="${placement}"${surface ? '' : ' data-et-auto-surface'}><et-tooltip ${tooltipAttributes.join(' ')}><div class="et-tooltip__surface"><div class="et-tooltip__content">${body}</div></div></et-tooltip><div et-floating-arrow class="et-overlay-arrow"></div></div></div>`;
|
|
87
87
|
};
|