Skip to content

Commit b95af63

Browse files
authored
feat(pagination): remove deprecated order prop (#1541)
- remove deprecated `order` prop in favor of the `position` prop BREAKING CHANGE: The `order` prop in OPagination got removed.
1 parent c624ab0 commit b95af63

File tree

5 files changed

+1
-41
lines changed

5 files changed

+1
-41
lines changed

packages/docs/components/Pagination.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ The component uses the [Button](/components/Button) component for the navigation
4040
| iconPack | Icon pack to use | string | `mdi`, `fa`, `fas and any other custom icon pack` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>pagination: {<br>&nbsp;&nbsp;iconPack: undefined<br>}</code> |
4141
| iconPrev | Icon to use for previous button | string | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>pagination: {<br>&nbsp;&nbsp;iconPrev: "chevron-left"<br>}</code> |
4242
| mobileBreakpoint | Mobile breakpoint as `max-width` value | string | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>pagination: {<br>&nbsp;&nbsp;mobileBreakpoint: undefined<br>}</code> |
43-
| <s>order</s> | <div><b>deprecated</b> - will be renamed to `position`</div><div><s>Buttons order</s></div> | "centered" \| "left" \| "right" | `centered`, `right`, `left` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>pagination: {<br>&nbsp;&nbsp;order: undefined<br>}</code> |
4443
| override | Override existing theme classes completely | boolean | - | |
4544
| perPage | Items count for each page | number \| string | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>pagination: {<br>&nbsp;&nbsp;perPage: 20<br>}</code> |
4645
| position | Buttons position order | "centered" \| "left" \| "right" | `centered`, `right`, `left` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>pagination: {<br>&nbsp;&nbsp;position: "right"<br>}</code> |

packages/oruga/src/components/pagination/Pagination.vue

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const props = withDefaults(defineProps<PaginationProps>(), {
3232
size: () => getDefault("pagination.size"),
3333
simple: () => getDefault("pagination.simple", false),
3434
rounded: () => getDefault("pagination.rounded", false),
35-
order: () => getDefault("pagination.order"),
3635
position: () => getDefault("pagination.position", "right"),
3736
buttonTag: () => getDefault("pagination.buttonTag", PlainButton),
3837
iconPack: () => getDefault("pagination.iconPack"),
@@ -278,18 +277,11 @@ function changePage(page: number, event?: Event): void {
278277
279278
const rootClasses = defineClasses(
280279
["rootClass", "o-pagination"],
281-
// @deprecated `order` will be removed later
282-
[
283-
"orderClass",
284-
"o-pagination--",
285-
computed(() => props.order),
286-
computed(() => !!props.order),
287-
],
288280
[
289281
"positionClass",
290282
"o-pagination--",
291283
computed(() => props.position),
292-
computed(() => !props.order && !!props.position),
284+
computed(() => !!props.position),
293285
],
294286
[
295287
"sizeClass",

packages/oruga/src/components/pagination/examples/inspector.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ const inspectData: InspectData<PaginationClasses, PaginationProps> = {
1212
description: "Class of the root element when on mobile.",
1313
info: "Switch to mobile view to see it in action!",
1414
},
15-
orderClass: {
16-
class: "orderClass",
17-
deprecated: "use `positionClass` instead",
18-
description: "Class of the root element with order.",
19-
properties: ["order"],
20-
suffixes: ["centered", "right", "left"],
21-
action: (data): void => {
22-
data.order = "centered";
23-
},
24-
},
2515
positionClass: {
2616
class: "positionClass",
2717
description: "Class of the root element with position.",

packages/oruga/src/components/pagination/props.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ export type PaginationProps = {
2828
size?: string;
2929
/** Enable simple style */
3030
simple?: boolean;
31-
/**
32-
* Buttons order
33-
* @values centered, right, left
34-
* @deprecated will be renamed to `position`
35-
*/
36-
order?: "centered" | "right" | "left";
3731
/**
3832
* Buttons position order
3933
* @values centered, right, left
@@ -68,11 +62,6 @@ export type PaginationClasses = Partial<{
6862
rootClass: ComponentClass;
6963
/** Class of the root element when on mobile */
7064
mobileClass: ComponentClass;
71-
/**
72-
* Class of the root element with order
73-
* @deprecated use `positionClass` instead
74-
*/
75-
orderClass: ComponentClass;
7665
/** Class of the root element with position */
7766
positionClass: ComponentClass;
7867
/** Class of the root element with size */

packages/oruga/src/components/types.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,11 +1969,6 @@ In addition, any CSS selector string or an actual DOM node can be used.
19691969
* Enable simple style
19701970
*/
19711971
simple: boolean;
1972-
/**
1973-
* Buttons order
1974-
* @deprecated will be renamed to `position`
1975-
*/
1976-
order: "centered" | "left" | "right";
19771972
/**
19781973
* Buttons position order
19791974
*/
@@ -2022,11 +2017,6 @@ In addition, any CSS selector string or an actual DOM node can be used.
20222017
* Class of the root element when on mobile
20232018
*/
20242019
mobileClass: ClassDefinition;
2025-
/**
2026-
* Class of the root element with order
2027-
* @deprecated use `positionClass` instead
2028-
*/
2029-
orderClass: ClassDefinition;
20302020
/**
20312021
* Class of the root element with position
20322022
*/

0 commit comments

Comments
 (0)