@ethlete/components 1.0.0-next.109 ā 1.0.0-next.110
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 +7 -0
- package/fesm2022/ethlete-components.mjs +9 -5
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/generators/generators.json +5 -0
- package/generators/migrate-scrollable-end-space/migration.js +33 -0
- package/generators/migrate-scrollable-end-space/schema.json +26 -0
- package/generators/migrate-scrollable-end-space/scrollable-end-space.js +11 -0
- package/migrations.json +9 -0
- package/package.json +1 -1
- package/src/lib/scrollable/headless/scrollable-buttons.component.css +19 -68
- package/types/ethlete-components.d.ts +5 -3
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
"schema": "./migrate-state-token-names/schema.json",
|
|
62
62
|
"description": "Rename the component state tokens to one pattern, state before property"
|
|
63
63
|
},
|
|
64
|
+
"migrate-scrollable-end-space": {
|
|
65
|
+
"factory": "./migrate-scrollable-end-space/migration",
|
|
66
|
+
"schema": "./migrate-scrollable-end-space/schema.json",
|
|
67
|
+
"description": "Remove the removed --et-scrollable-buttons-end-space declaration from stylesheets and templates"
|
|
68
|
+
},
|
|
64
69
|
"migrate-tabs-active-underline": {
|
|
65
70
|
"factory": "./migrate-tabs-active-underline/migration",
|
|
66
71
|
"schema": "./migrate-tabs-active-underline/schema.json",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { formatFiles } from '@nx/devkit';
|
|
2
|
+
import { createMigrationScope } from '../migrate-query-error-labels/migration-scope.js';
|
|
3
|
+
import { isScrollableEndSpaceCandidate, removeScrollableEndSpace } from './scrollable-end-space.js';
|
|
4
|
+
export default async function migrateScrollableEndSpace(tree, schema) {
|
|
5
|
+
console.log('\nš Removing --et-scrollable-buttons-end-space...');
|
|
6
|
+
const scope = createMigrationScope(tree, schema);
|
|
7
|
+
console.log(` Scope: ${scope.describe()}`);
|
|
8
|
+
const changed = [];
|
|
9
|
+
scope.visit(tree, (filePath) => {
|
|
10
|
+
if (!isScrollableEndSpaceCandidate(filePath))
|
|
11
|
+
return;
|
|
12
|
+
const content = tree.read(filePath, 'utf-8');
|
|
13
|
+
if (!content)
|
|
14
|
+
return;
|
|
15
|
+
const next = removeScrollableEndSpace(content);
|
|
16
|
+
if (next === null)
|
|
17
|
+
return;
|
|
18
|
+
tree.write(filePath, next);
|
|
19
|
+
changed.push(filePath);
|
|
20
|
+
});
|
|
21
|
+
if (!schema.skipFormat) {
|
|
22
|
+
await formatFiles(tree);
|
|
23
|
+
}
|
|
24
|
+
if (changed.length > 0) {
|
|
25
|
+
console.log(`\nā
Removed the end-space declaration in ${changed.length} file(s):`);
|
|
26
|
+
for (const filePath of changed)
|
|
27
|
+
console.log(` ${filePath}`);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.log('\nā
Nothing to do.');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "migrate-scrollable-end-space",
|
|
4
|
+
"title": "Remove the removed --et-scrollable-buttons-end-space declaration from stylesheets and templates",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projects": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": { "type": "string" },
|
|
10
|
+
"description": "Nx projects to scan. Defaults to every project in the workspace.",
|
|
11
|
+
"alias": "project"
|
|
12
|
+
},
|
|
13
|
+
"include": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Path prefixes to scan, relative to the workspace root (e.g. 'apps/shop'). Unioned with `projects`.",
|
|
17
|
+
"alias": "includePath"
|
|
18
|
+
},
|
|
19
|
+
"skipFormat": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Skip formatting files after migration",
|
|
22
|
+
"default": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": []
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const SCANNED = /\.(css|scss|sass|less|html|ts)$/;
|
|
2
|
+
const DECLARATION = /[ \t]*--et-scrollable-buttons-end-space[ \t]*:[^;}"'`\n]*(?:;[ \t]*(?:\r?\n)?|(?=[}"'`\n]))/g;
|
|
3
|
+
export const isScrollableEndSpaceCandidate = (filePath) => SCANNED.test(filePath) && !filePath.endsWith('.d.ts');
|
|
4
|
+
/** Returns the content without any `--et-scrollable-buttons-end-space` declaration, or `null` when it holds none. */
|
|
5
|
+
export const removeScrollableEndSpace = (content) => {
|
|
6
|
+
if (!content.includes('--et-scrollable-buttons-end-space'))
|
|
7
|
+
return null;
|
|
8
|
+
const next = content.replace(DECLARATION, '');
|
|
9
|
+
return next === content ? null : next;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=scrollable-end-space.js.map
|
package/migrations.json
CHANGED
|
@@ -224,6 +224,15 @@
|
|
|
224
224
|
"description": "Move @ethlete/bracket imports to @ethlete/components/bracket and remove @ethlete/bracket, which is no longer published, from package.json.",
|
|
225
225
|
"generator": "@ethlete/components:migrate-bracket-entry-point",
|
|
226
226
|
"docs": "/bracket/index"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "scrollable-end-space",
|
|
230
|
+
"version": "1.0.0-next.109",
|
|
231
|
+
"kind": "auto",
|
|
232
|
+
"level": "required",
|
|
233
|
+
"description": "Remove --et-scrollable-buttons-end-space, which is removed, from stylesheets and inline styles: the inside buttons lie over the items.",
|
|
234
|
+
"generator": "@ethlete/components:migrate-scrollable-end-space",
|
|
235
|
+
"docs": "/components/scrollable"
|
|
227
236
|
}
|
|
228
237
|
]
|
|
229
238
|
}
|
package/package.json
CHANGED
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
initial-value: 0px;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
@property --et-scrollable-buttons-end-space {
|
|
9
|
-
syntax: '<length>';
|
|
10
|
-
inherits: true;
|
|
11
|
-
initial-value: 0px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
@property --et-scrollable-buttons-extent {
|
|
15
9
|
syntax: '*';
|
|
16
10
|
inherits: true;
|
|
@@ -127,68 +121,6 @@
|
|
|
127
121
|
}
|
|
128
122
|
}
|
|
129
123
|
|
|
130
|
-
&.et-scrollable--can-scroll:not(.et-scrollable--masked):has(
|
|
131
|
-
> .et-scrollable-wrapper > .et-scrollable-buttons--inside
|
|
132
|
-
) {
|
|
133
|
-
& > .et-scrollable-wrapper > .et-scrollable-container {
|
|
134
|
-
--_et-scrollable-button-space: clamp(0px, var(--et-scrollable-buttons-end-space), 50%);
|
|
135
|
-
--_et-scrollable-start-clip: 0px;
|
|
136
|
-
--_et-scrollable-end-clip: 0px;
|
|
137
|
-
--_et-scrollable-scrollbar-edge: calc(100% - var(--_et-scrollable-scrollbar-size, 0px));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&:not(.et-scrollable--is-at-start) > .et-scrollable-wrapper > .et-scrollable-container {
|
|
141
|
-
--_et-scrollable-start-clip: var(--_et-scrollable-button-space);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&:not(.et-scrollable--is-at-end) > .et-scrollable-wrapper > .et-scrollable-container {
|
|
145
|
-
--_et-scrollable-end-clip: var(--_et-scrollable-button-space);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/* Clip only the content area. Padding changes can clamp the scroll offset at the end,
|
|
149
|
-
and insetting the scrollport itself can move the items or trim the native scrollbar. */
|
|
150
|
-
&:is([direction='horizontal'], :not([direction])) > .et-scrollable-wrapper > .et-scrollable-container {
|
|
151
|
-
--_et-scrollable-left-clip: var(--_et-scrollable-start-clip);
|
|
152
|
-
--_et-scrollable-right-clip: calc(100% - var(--_et-scrollable-end-clip));
|
|
153
|
-
|
|
154
|
-
clip-path: polygon(
|
|
155
|
-
var(--_et-scrollable-left-clip) 0,
|
|
156
|
-
var(--_et-scrollable-right-clip) 0,
|
|
157
|
-
var(--_et-scrollable-right-clip) var(--_et-scrollable-scrollbar-edge),
|
|
158
|
-
100% var(--_et-scrollable-scrollbar-edge),
|
|
159
|
-
100% 100%,
|
|
160
|
-
0 100%,
|
|
161
|
-
0 var(--_et-scrollable-scrollbar-edge),
|
|
162
|
-
var(--_et-scrollable-left-clip) var(--_et-scrollable-scrollbar-edge)
|
|
163
|
-
);
|
|
164
|
-
|
|
165
|
-
&:dir(rtl) {
|
|
166
|
-
--_et-scrollable-left-clip: var(--_et-scrollable-end-clip);
|
|
167
|
-
--_et-scrollable-right-clip: calc(100% - var(--_et-scrollable-start-clip));
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&[direction='vertical'] > .et-scrollable-wrapper > .et-scrollable-container {
|
|
172
|
-
--_et-scrollable-scrollbar-outer-edge: 100%;
|
|
173
|
-
|
|
174
|
-
clip-path: polygon(
|
|
175
|
-
var(--_et-scrollable-scrollbar-outer-edge) 0,
|
|
176
|
-
var(--_et-scrollable-scrollbar-edge) 0,
|
|
177
|
-
var(--_et-scrollable-scrollbar-edge) var(--_et-scrollable-start-clip),
|
|
178
|
-
calc(100% - var(--_et-scrollable-scrollbar-outer-edge)) var(--_et-scrollable-start-clip),
|
|
179
|
-
calc(100% - var(--_et-scrollable-scrollbar-outer-edge)) calc(100% - var(--_et-scrollable-end-clip)),
|
|
180
|
-
var(--_et-scrollable-scrollbar-edge) calc(100% - var(--_et-scrollable-end-clip)),
|
|
181
|
-
var(--_et-scrollable-scrollbar-edge) 100%,
|
|
182
|
-
var(--_et-scrollable-scrollbar-outer-edge) 100%
|
|
183
|
-
);
|
|
184
|
-
|
|
185
|
-
&:dir(rtl) {
|
|
186
|
-
--_et-scrollable-scrollbar-outer-edge: 0%;
|
|
187
|
-
--_et-scrollable-scrollbar-edge: var(--_et-scrollable-scrollbar-size, 0px);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
124
|
&.et-scrollable--sticky-buttons {
|
|
193
125
|
--_sticky-margin: 10%;
|
|
194
126
|
|
|
@@ -281,6 +213,25 @@
|
|
|
281
213
|
}
|
|
282
214
|
}
|
|
283
215
|
|
|
216
|
+
& .et-scrollable-buttons.et-scrollable-buttons--corner {
|
|
217
|
+
display: flex;
|
|
218
|
+
gap: 0.8rem;
|
|
219
|
+
align-self: end;
|
|
220
|
+
justify-self: end;
|
|
221
|
+
padding-block-end: 1.6rem;
|
|
222
|
+
padding-inline-end: 1.6rem;
|
|
223
|
+
|
|
224
|
+
& .et-scrollable-button {
|
|
225
|
+
position: static;
|
|
226
|
+
transform: none;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.et-scrollable--sticky-corner-buttons .et-scrollable-buttons--corner {
|
|
231
|
+
position: sticky;
|
|
232
|
+
inset-block-end: 0;
|
|
233
|
+
}
|
|
234
|
+
|
|
284
235
|
/* Wins the equal-weight tie with the direction rules above only by coming after them - keep the
|
|
285
236
|
footer overrides in this file, below them. */
|
|
286
237
|
& .et-scrollable-footer {
|
|
@@ -5475,6 +5475,7 @@ declare const SCROLLABLE_BUTTON_POSITIONS: {
|
|
|
5475
5475
|
readonly INSIDE: "inside";
|
|
5476
5476
|
readonly INLINE: "inline";
|
|
5477
5477
|
readonly FOOTER: "footer";
|
|
5478
|
+
readonly CORNER: "corner";
|
|
5478
5479
|
};
|
|
5479
5480
|
type ScrollableButtonPosition = (typeof SCROLLABLE_BUTTON_POSITIONS)[keyof typeof SCROLLABLE_BUTTON_POSITIONS];
|
|
5480
5481
|
declare const SCROLLABLE_MASK_VARIANTS: {
|
|
@@ -5681,12 +5682,13 @@ type ScrollableButtonsConfig = {
|
|
|
5681
5682
|
/**
|
|
5682
5683
|
* `'inside'` floats the two buttons over the track's edges; `'inline'` puts them beside the track at
|
|
5683
5684
|
* the row's ends; `'footer'` puts them in a row below it, next to the dots when `etScrollableNavigation`
|
|
5684
|
-
* is on too
|
|
5685
|
+
* is on too; `'corner'` groups both buttons in the block-end/inline-end corner over the track. Set
|
|
5686
|
+
* `padding` and `gap` on `.et-scrollable-buttons` to move the group and space its buttons. A value per breakpoint is allowed. Falls back to `provideScrollableConfig`. @default 'inside'
|
|
5685
5687
|
*/
|
|
5686
5688
|
position?: ScrollableResponsive<ScrollableButtonPosition>;
|
|
5687
5689
|
/**
|
|
5688
5690
|
* Keep the buttons in view while the page scrolls past a tall track, rather than letting them travel
|
|
5689
|
-
* off with it. Only meaningful with `position: 'inside'`. @default false
|
|
5691
|
+
* off with it. Only meaningful with `position: 'inside'` or `'corner'`. @default false
|
|
5690
5692
|
*/
|
|
5691
5693
|
sticky?: boolean;
|
|
5692
5694
|
/** Size of the two icon buttons. @default 'xs' */
|
|
@@ -37596,5 +37598,5 @@ export declare const provideUnsavedChangesLabels: (labels: import("@ethlete/core
|
|
|
37596
37598
|
export declare const injectUnsavedChangesLabels: () => import("@angular/core").Signal<UnsavedChangesLabels>;
|
|
37597
37599
|
export declare const UNSAVED_CHANGES_LABELS: import("@angular/core").InjectionToken<import("@ethlete/core").LabelsSource<UnsavedChangesLabels>>;
|
|
37598
37600
|
/** The version of `@ethlete/components` this build was cut from. */
|
|
37599
|
-
export declare const COMPONENTS_VERSION = "1.0.0-next.
|
|
37601
|
+
export declare const COMPONENTS_VERSION = "1.0.0-next.110";
|
|
37600
37602
|
export { type AlertDialogComponentSlot, type AlertDialogSlot, type AlertDialogTemplateSlot, type AppointmentTreeNode, BRACKET_DATA_LAYOUT, BRACKET_ERROR_CODES, BRACKET_FINAL_ALIGNMENT, BRACKET_ROUND_MIRROR_TYPE, BRACKET_SECTION_KEY, BRACKET_SWISS_GROUP_COLOR_TYPE, type Bracket, type BracketByeSlotSource, type BracketComponents, type BracketContinueComponent, type BracketDataLayout, type BracketDataSource, type BracketDrawing, type BracketEdge, type BracketExternalSlotSource, type BracketFinalAlignment, type BracketGradient, type BracketGradientStop, type BracketGridSection, type BracketLayoutSettings, BracketMap, type BracketMatch, type BracketMatchComponent, type BracketMatchFactor, type BracketMatchId, type BracketMatchInputs, type BracketMatchOutcomeSlotSource, type BracketMatchParticipant, type BracketMatchPosition, type BracketMatchRelation, type BracketMatchRelationNone, type BracketMatchRelationNothingToOne, type BracketMatchRelationOneToNothing, type BracketMatchRelationOneToOne, type BracketMatchRelationTwoToNothing, type BracketMatchRelationTwoToOne, type BracketMatchShortId, type BracketMatchSlot, type BracketMatchSource, type BracketMatchStatus, type BracketParticipant, type BracketParticipantMatch, type BracketPickMigration, type BracketPickMigrationOptions, type BracketPickSet, type BracketRect, type BracketRound, type BracketRoundHeaderComponent, type BracketRoundId, type BracketRoundMapWithSwissData, type BracketRoundMirrorType, type BracketRoundPosition, type BracketRoundRelation, type BracketRoundRelationNone, type BracketRoundRelationNothingToOne, type BracketRoundRelationOneToNothing, type BracketRoundRelationOneToOne, type BracketRoundRelationTwoToNothing, type BracketRoundRelationTwoToOne, type BracketRoundShortId, type BracketRoundSource, type BracketRoundSwissData, type BracketRoundSwissGroup, type BracketRoundSwissGroupId, type BracketRoundSwissGroupMap, type BracketRoundType, BracketRuntimeError, type BracketSectionKey, type BracketSectionTitleComponent, type BracketSeedSlotSource, type BracketSlotResolutionPolicy, type BracketSlotSource, type BracketSlotSourceKind, type BracketStandingRankSide, type BracketStandingRankSlotSource, type BracketSwissBucketSlotSource, type BracketSwissColors, type BracketSwissGroupColorType, type BracketWarning, COMMON_BRACKET_ROUND_TYPE, type CalendarBandPosition, type CalendarInterval, type CalendarPrecision, type CalendarSelectionFlags, type CalendarView, type CalendarWeekStartsOn, type CascaderCompareWith, type CascaderDataSource, type CascaderNode, type CommonBracketRoundType, type ComputedBracketGrid, type CreateBracketGridConfig, type CreateBracketOptions, type CreateGridAdapterOptions, DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE, type DateRangeSide, type DateRangeSide as TimeRangeInputSide, type DateRangeValue, type DateRangeValue as DateTimeRangeValue, type DateRangeValue as TimeRangeValue, type DoubleEliminationBracketRoundType, type DropzoneCropConfig, type DropzoneCropCorner, type DropzoneCropRect, type DropzoneCropShape, type DurationFormatSpec, type DurationSegment, type DurationUnit, GROUP_BRACKET_ROUND_TYPE, type GridAdapter, type GridAdapterBreakpoints, type GridConfig, type GroupBracketRoundType, type MatchParticipantId, type MatchParticipantShortId, type MatchParticipantSide, type ParticipantMatchResult, type PlaceholderBracketShape, type RichTextEditorHeadingLevel, type RichTextEditorImageFailure, type RichTextEditorImageFailureReason, type RichTextEditorImageUpload, type RichTextEditorImageUploadContext, type RichTextEditorImageUploadFn, type RichTextEditorTokenChip, type RichTextEditorTokenCodec, SINGLE_ELIMINATION_BRACKET_ROUND_TYPE, SWISS_BRACKET_ROUND_TYPE, type SchedulerAgendaDay, type SchedulerMonthDayCell, type SchedulerTimeGridAllDayEntry, type SchedulerTimeGridBlock, type SchedulerTimeGridDay, type SchedulerTimeGridSegment, type ScrollableActiveChildRef, type ScrollableButtonPosition, type ScrollableButtonsConfig, type ScrollableButtonsDefaults, type ScrollableChrome, type ScrollableChromeSlot, type ScrollableConfig, type ScrollableDirection, type ScrollableIntersectionChange, type ScrollableItemSize, type ScrollableLoadingTemplatePosition, type ScrollableLoadingTemplateRef, type ScrollableMaskVariant, type ScrollableNavigation, type ScrollableNavigationConfig, type ScrollableNavigationItem, type ScrollableResponsive, type ScrollableScrollMode, type ScrollableScrollOrigin, type ScrollableScrollState, type ScrollbarGeometry, type ScrollbarOrientation, type ScrollbarTarget, type SerializeOptions, type SingleEliminationBracketRoundType, type StandingPick, type StandingPickOutcome, type SwissBracketRoundType, TOURNAMENT_MODE, type TournamentMode, bracketSlot, createBracket, createPlaceholderBracketSource, injectRichTextEditorTools, isBracketSlotPredictable, migrateBracketPicks, resolveBracketSlot, standingRankSides, swapStandingRank, validateBracketSource };
|