Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"package-lock.json": true
},
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifierEnding": "minimal",
"typescript.preferences.importModuleSpecifierEnding": "js",
"typescript.preferences.quoteStyle": "double",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.updateImportsOnFileMove.enabled": "always",
Expand Down
30 changes: 27 additions & 3 deletions api-extractor/react-loading-progress-indicator.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,30 @@
"name": "",
"preserveMemberOrder": false,
"members": [
{
"kind": "Variable",
"canonicalReference": "@asl-19/react-loading-progress-indicator!getDefaultStyle:var",
"docComment": "/**\n * Get default styles for loading progress indicator.\n *\n * @remarks\n *\n * Use this to augment the default styles in your own `getStyle` function.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "getDefaultStyle: "
},
{
"kind": "Reference",
"text": "LoadingProgressIndicatorGetStyleFunction",
"canonicalReference": "@asl-19/react-loading-progress-indicator!LoadingProgressIndicatorGetStyleFunction:type"
}
],
"fileUrlPath": "dist/getDefaultStyle.d.ts",
"isReadonly": true,
"releaseTag": "Public",
"name": "getDefaultStyle",
"variableTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "Variable",
"canonicalReference": "@asl-19/react-loading-progress-indicator!LoadingProgressIndicator:var",
Expand Down Expand Up @@ -200,7 +224,7 @@
"text": ">"
}
],
"fileUrlPath": "dist/components/LoadingProgressIndicator.d.ts",
"fileUrlPath": "dist/LoadingProgressIndicator.d.ts",
"isReadonly": true,
"releaseTag": "Public",
"name": "LoadingProgressIndicator",
Expand Down Expand Up @@ -232,7 +256,7 @@
"text": ";"
}
],
"fileUrlPath": "dist/types/LoadingProgressIndicatorGetStyleFunction.d.ts",
"fileUrlPath": "dist/LoadingProgressIndicatorGetStyleFunction.d.ts",
"releaseTag": "Public",
"name": "LoadingProgressIndicatorGetStyleFunction",
"typeTokenRange": {
Expand All @@ -250,7 +274,7 @@
"text": "interface LoadingProgressIndicatorProps "
}
],
"fileUrlPath": "dist/types/LoadingProgressIndicatorProps.d.ts",
"fileUrlPath": "dist/LoadingProgressIndicatorProps.d.ts",
"releaseTag": "Public",
"name": "LoadingProgressIndicatorProps",
"preserveMemberOrder": false,
Expand Down
7 changes: 5 additions & 2 deletions api-extractor/react-loading-progress-indicator.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

```ts

import { CSSProperties } from 'react';
import { FC } from 'react';
import type { CSSProperties } from 'react';
import type { FC } from 'react';

// @public
export const getDefaultStyle: LoadingProgressIndicatorGetStyleFunction;

// @public
const LoadingProgressIndicator: FC<LoadingProgressIndicatorProps>;
Expand Down
18 changes: 18 additions & 0 deletions docs/react-loading-progress-indicator.getdefaultstyle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@asl-19/react-loading-progress-indicator](./react-loading-progress-indicator.md) &gt; [getDefaultStyle](./react-loading-progress-indicator.getdefaultstyle.md)

## getDefaultStyle variable

Get default styles for loading progress indicator.

**Signature:**

```typescript
getDefaultStyle: LoadingProgressIndicatorGetStyleFunction
```

## Remarks

Use this to augment the default styles in your own `getStyle` function.

11 changes: 11 additions & 0 deletions docs/react-loading-progress-indicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ Description
</th></tr></thead>
<tbody><tr><td>

[getDefaultStyle](./react-loading-progress-indicator.getdefaultstyle.md)


</td><td>

Get default styles for loading progress indicator.


</td></tr>
<tr><td>

[LoadingProgressIndicator](./react-loading-progress-indicator.loadingprogressindicator.md)


Expand Down
29 changes: 16 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"tsc-check": "tsc --project tsconfig-dist.json --noEmit"
},
"dependencies": {
"@asl-19/js-dom-utils": "^0.2.1"
"@asl-19/js-dom-utils": "^1.0.0"
},
"devDependencies": {
"@asl-19/eslint-config": "^0.9.0",
"@microsoft/api-documenter": "^7.26.31",
"@microsoft/api-extractor": "^7.52.10",
"@types/node": "^24.2.1",
"@types/node": "^22.17.2",
"@types/react": "^19.1.10",
"@types/react-dom": "^19.1.7",
"eslint": "^9.33.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { FC } from "react";

import { announce } from "@asl-19/js-dom-utils";
// We need to import React directly to prevent API Extractor from failing with
// “Error: The expression contains an import() type, which is not yet supported
// by API Extractor:”
import React, { FC, memo, useEffect, useRef, useState } from "react";
import React, { memo, useEffect, useRef, useState } from "react";

import LoadingProgressIndicatorProps from "../types/LoadingProgressIndicatorProps";
import getDefaultStyle from "../utils/getDefaultStyle";
import getDefaultStyle from "./getDefaultStyle.js";
import LoadingProgressIndicatorProps from "./LoadingProgressIndicatorProps.js";

const LoadingProgressIndicatorUnmemoized: FC<LoadingProgressIndicatorProps> = ({
color,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSProperties } from "react";
import type { CSSProperties } from "react";

/**
* Function returning loading indicator styles.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/consistent-type-definitions */
import LoadingProgressIndicatorGetStyleFunction from "./LoadingProgressIndicatorGetStyleFunction";

import type LoadingProgressIndicatorGetStyleFunction from "./LoadingProgressIndicatorGetStyleFunction.js";

/**
* LoadingProgressIndicator props
Expand Down
10 changes: 9 additions & 1 deletion src/utils/getDefaultStyle.ts → src/getDefaultStyle.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import LoadingProgressIndicatorGetStyleFunction from "../types/LoadingProgressIndicatorGetStyleFunction";
import type LoadingProgressIndicatorGetStyleFunction from "./LoadingProgressIndicatorGetStyleFunction.js";

/**
* Get default styles for loading progress indicator.
*
* @remarks Use this to augment the default styles in your own `getStyle`
* function.
*
* @public
*/
const getDefaultStyle: LoadingProgressIndicatorGetStyleFunction = ({
color,
direction,
Expand Down
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @packageDocumentation
*/

export { default } from "./components/LoadingProgressIndicator.js";
export type { default as LoadingProgressIndicatorGetStyleFunction } from "./types/LoadingProgressIndicatorGetStyleFunction.js";
export type { default as LoadingProgressIndicatorProps } from "./types/LoadingProgressIndicatorProps.js";
export { default as getDefaultStyle } from "./getDefaultStyle.js";
export { default } from "./LoadingProgressIndicator.js";
export type { default as LoadingProgressIndicatorGetStyleFunction } from "./LoadingProgressIndicatorGetStyleFunction.js";
export type { default as LoadingProgressIndicatorProps } from "./LoadingProgressIndicatorProps.js";