mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: merge release to master (#7809)
* feat(android): fix tab resource icon size based on spec (#7737) * feat(ios): add icon rendering mode for bottom navigation (#7738) * fix(ios-tabs): crash when add tabstrip in loaded event (#7743) * fix(css): parse css selectors with escape sequences (#7689) (#7732) * fix(ios-tabs): handle nesting proxy view container (#7755) * fix-next(css): className to preserve root views classes (#7725) * docs: cut the 6.1.0 release (#7773) * fix(android-list-picker): NoSuchFieldException on api29 (#7790) * chore: hardcode tslib version to 1.10.0 (#7776) * fix(css-calc): reduce_css_calc_1.default is not a function (#7787) (#7801)
This commit is contained in:
30
tns-core-modules/css/system-classes.d.ts
vendored
Normal file
30
tns-core-modules/css/system-classes.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @module "system-classes"
|
||||
*/ /** */
|
||||
|
||||
/**
|
||||
* String value "ns-" used for CSS system class prefix.
|
||||
*/
|
||||
export const CLASS_PREFIX: string;
|
||||
|
||||
/**
|
||||
* Gets CSS system class for modal root view.
|
||||
*/
|
||||
export function getModalRootViewCssClass(): string;
|
||||
|
||||
/**
|
||||
* Gets CSS system classes for root view.
|
||||
*/
|
||||
export function getRootViewCssClasses(): string[];
|
||||
|
||||
/**
|
||||
* * Appends new CSS class to the system classes and returns the new length of the array.
|
||||
* @param value New CSS system class.
|
||||
*/
|
||||
export function pushToRootViewCssClasses(value: string): number;
|
||||
|
||||
/**
|
||||
* Removes CSS class from the system classes and returns it.
|
||||
* @param value
|
||||
*/
|
||||
export function removeFromRootViewCssClasses(value: string): string;
|
||||
32
tns-core-modules/css/system-classes.ts
Normal file
32
tns-core-modules/css/system-classes.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
const MODAL = "modal";
|
||||
const ROOT = "root";
|
||||
|
||||
export const CLASS_PREFIX = "ns-";
|
||||
|
||||
const modalRootViewCssClass = `${CLASS_PREFIX}${MODAL}`;
|
||||
const rootViewCssClasses = [`${CLASS_PREFIX}${ROOT}`];
|
||||
|
||||
export function getModalRootViewCssClass(): string {
|
||||
return modalRootViewCssClass;
|
||||
}
|
||||
|
||||
export function getRootViewCssClasses(): string[] {
|
||||
return rootViewCssClasses;
|
||||
}
|
||||
|
||||
export function pushToRootViewCssClasses(value: string): number {
|
||||
rootViewCssClasses.push(value);
|
||||
|
||||
return rootViewCssClasses.length;
|
||||
}
|
||||
|
||||
export function removeFromRootViewCssClasses(value: string): string {
|
||||
const index = rootViewCssClasses.indexOf(value);
|
||||
let removedElement;
|
||||
|
||||
if (index > -1) {
|
||||
removedElement = rootViewCssClasses.splice(index, 1);
|
||||
}
|
||||
|
||||
return removedElement;
|
||||
}
|
||||
Reference in New Issue
Block a user