@jirawatpyk/aura-react 5.8.0 → 5.10.0
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/README.md +36 -0
- package/dist/aura.bundle.js +1528 -1098
- package/dist/cjs/index.cjs +1528 -1098
- package/dist/esm/Accordion.js +2 -1
- package/dist/esm/Alert.js +2 -1
- package/dist/esm/AppShell.js +2 -1
- package/dist/esm/Breadcrumb.js +2 -1
- package/dist/esm/Button.js +2 -1
- package/dist/esm/Checkbox.js +2 -1
- package/dist/esm/Combobox.js +7 -6
- package/dist/esm/Command.js +3 -2
- package/dist/esm/DataTable.js +35 -13
- package/dist/esm/DatePicker.js +8 -7
- package/dist/esm/Dialog.js +38 -5
- package/dist/esm/DropdownMenu.js +1 -1
- package/dist/esm/Field.js +2 -1
- package/dist/esm/FileUpload.js +4 -3
- package/dist/esm/FilterBar.js +3 -2
- package/dist/esm/FormErrorSummary.js +2 -1
- package/dist/esm/Icon.js +50 -31
- package/dist/esm/Menu.js +37 -12
- package/dist/esm/NumberField.js +3 -2
- package/dist/esm/Pagination.js +3 -2
- package/dist/esm/PasswordField.js +2 -1
- package/dist/esm/Popover.js +2 -1
- package/dist/esm/RadioGroup.js +2 -1
- package/dist/esm/Select.js +4 -3
- package/dist/esm/SideNav.js +3 -2
- package/dist/esm/Stat.js +8 -1
- package/dist/esm/Stepper.js +2 -1
- package/dist/esm/Tabs.js +89 -13
- package/dist/esm/Tag.js +3 -2
- package/dist/esm/TimePicker.js +5 -4
- package/dist/esm/Toaster.js +3 -2
- package/dist/esm/classes.js +14 -1
- package/dist/esm/colorScheme.js +8 -1
- package/dist/esm/display.js +22 -12
- package/dist/esm/iconSvg.js +53 -0
- package/dist/esm/icons.js +531 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/internal.js +1 -14
- package/dist/esm/locale.js +7 -0
- package/dist/esm/strings.js +4 -245
- package/dist/esm/strings.sv.js +127 -0
- package/dist/esm/strings.th.js +127 -0
- package/dist/icons/index.cjs +613 -0
- package/dist/icons/index.d.cts +106 -0
- package/dist/icons/index.d.ts +106 -0
- package/dist/index.d.cts +52 -2
- package/dist/index.d.ts +52 -2
- package/dist/locales/sv.cjs +149 -0
- package/dist/locales/sv.d.cts +96 -0
- package/dist/locales/sv.d.ts +96 -0
- package/dist/locales/th.cjs +149 -0
- package/dist/locales/th.d.cts +96 -0
- package/dist/locales/th.d.ts +96 -0
- package/dist/server/index.cjs +445 -314
- package/dist/server/index.d.cts +24 -0
- package/dist/server/index.d.ts +24 -0
- package/dist/server/index.js +445 -314
- package/dist/styles.css +22 -1
- package/dist/styles.layer.css +22 -1
- package/package.json +35 -3
- package/scripts/aura-icons-codemod.mjs +345 -0
package/dist/server/index.d.cts
CHANGED
|
@@ -239,6 +239,12 @@ export interface AuraStrings {
|
|
|
239
239
|
pageN: (p: number) => string;
|
|
240
240
|
accepts: (list?: string, max?: number | string) => string;
|
|
241
241
|
}
|
|
242
|
+
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
243
|
+
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
|
244
|
+
/** A whole language for AuraProvider `strings` (5.9): every built-in label, and assignable to the prop. */
|
|
245
|
+
export type AuraLocalePack = AuraStrings & {
|
|
246
|
+
[key: string]: string | ((...args: any[]) => string);
|
|
247
|
+
};
|
|
242
248
|
export declare const STRINGS: {
|
|
243
249
|
en: AuraStrings;
|
|
244
250
|
th: AuraStrings;
|
|
@@ -270,6 +276,18 @@ export declare const breakpoints: {
|
|
|
270
276
|
lg: 1024;
|
|
271
277
|
xl: 1280;
|
|
272
278
|
};
|
|
279
|
+
/** One SVG child: element name and its attributes. */
|
|
280
|
+
export type IconShape = [
|
|
281
|
+
string,
|
|
282
|
+
Record<string, string>
|
|
283
|
+
];
|
|
284
|
+
/** An AURA icon component from `@jirawatpyk/aura-react/icons` (5.9), e.g. `IconUsers`. */
|
|
285
|
+
export type AuraIcon = React$1.ForwardRefExoticComponent<Omit<IconProps, "name"> & React$1.RefAttributes<SVGSVGElement>> & {
|
|
286
|
+
/** The icon's path data. */
|
|
287
|
+
readonly auraShapes: IconShape[];
|
|
288
|
+
/** Its name in the set, e.g. `users`. */
|
|
289
|
+
readonly iconName: string;
|
|
290
|
+
};
|
|
273
291
|
/** The class list of a Button (5.8): put it on your own link or `<Link>` to make it look like one, e.g. in a Server
|
|
274
292
|
* Component — `<Link href="/renew" className={buttonClass({ variant: 'secondary' })}>Renew</Link>`. */
|
|
275
293
|
export declare function buttonClass(opts?: {
|
|
@@ -284,6 +302,12 @@ declare function ServerCard(props: CardProps): React$1.ReactElement;
|
|
|
284
302
|
declare function ServerStatusPill(props: StatusPillProps): React$1.ReactElement;
|
|
285
303
|
declare function ServerBadge(props: BadgeProps): React$1.ReactElement;
|
|
286
304
|
declare function ServerEmptyState(props: EmptyStateProps): React$1.ReactElement;
|
|
305
|
+
/** Makes icon names as strings work: `registerIcons(allIcons)` once at startup, with `allIcons` from
|
|
306
|
+
* `@jirawatpyk/aura-react/icons`, or only the icons you use (`registerIcons([IconUsers, IconPlus])`). In 5.x every
|
|
307
|
+
* name already works and this only says you are ready for 6.0 (it silences the notice); in 6.0 it is required. Call it in the module
|
|
308
|
+
* graph that renders the names: a client module for the components, and also a server module if Server Components
|
|
309
|
+
* render names with `/server`'s Icon (the two entries keep separate registries). */
|
|
310
|
+
export declare function registerIcons(icons: readonly AuraIcon[]): void;
|
|
287
311
|
export declare const Icon: React$1.ForwardRefExoticComponent<IconProps & React$1.RefAttributes<SVGSVGElement>>;
|
|
288
312
|
|
|
289
313
|
export {
|
package/dist/server/index.d.ts
CHANGED
|
@@ -239,6 +239,12 @@ export interface AuraStrings {
|
|
|
239
239
|
pageN: (p: number) => string;
|
|
240
240
|
accepts: (list?: string, max?: number | string) => string;
|
|
241
241
|
}
|
|
242
|
+
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
243
|
+
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
|
244
|
+
/** A whole language for AuraProvider `strings` (5.9): every built-in label, and assignable to the prop. */
|
|
245
|
+
export type AuraLocalePack = AuraStrings & {
|
|
246
|
+
[key: string]: string | ((...args: any[]) => string);
|
|
247
|
+
};
|
|
242
248
|
export declare const STRINGS: {
|
|
243
249
|
en: AuraStrings;
|
|
244
250
|
th: AuraStrings;
|
|
@@ -270,6 +276,18 @@ export declare const breakpoints: {
|
|
|
270
276
|
lg: 1024;
|
|
271
277
|
xl: 1280;
|
|
272
278
|
};
|
|
279
|
+
/** One SVG child: element name and its attributes. */
|
|
280
|
+
export type IconShape = [
|
|
281
|
+
string,
|
|
282
|
+
Record<string, string>
|
|
283
|
+
];
|
|
284
|
+
/** An AURA icon component from `@jirawatpyk/aura-react/icons` (5.9), e.g. `IconUsers`. */
|
|
285
|
+
export type AuraIcon = React$1.ForwardRefExoticComponent<Omit<IconProps, "name"> & React$1.RefAttributes<SVGSVGElement>> & {
|
|
286
|
+
/** The icon's path data. */
|
|
287
|
+
readonly auraShapes: IconShape[];
|
|
288
|
+
/** Its name in the set, e.g. `users`. */
|
|
289
|
+
readonly iconName: string;
|
|
290
|
+
};
|
|
273
291
|
/** The class list of a Button (5.8): put it on your own link or `<Link>` to make it look like one, e.g. in a Server
|
|
274
292
|
* Component — `<Link href="/renew" className={buttonClass({ variant: 'secondary' })}>Renew</Link>`. */
|
|
275
293
|
export declare function buttonClass(opts?: {
|
|
@@ -284,6 +302,12 @@ declare function ServerCard(props: CardProps): React$1.ReactElement;
|
|
|
284
302
|
declare function ServerStatusPill(props: StatusPillProps): React$1.ReactElement;
|
|
285
303
|
declare function ServerBadge(props: BadgeProps): React$1.ReactElement;
|
|
286
304
|
declare function ServerEmptyState(props: EmptyStateProps): React$1.ReactElement;
|
|
305
|
+
/** Makes icon names as strings work: `registerIcons(allIcons)` once at startup, with `allIcons` from
|
|
306
|
+
* `@jirawatpyk/aura-react/icons`, or only the icons you use (`registerIcons([IconUsers, IconPlus])`). In 5.x every
|
|
307
|
+
* name already works and this only says you are ready for 6.0 (it silences the notice); in 6.0 it is required. Call it in the module
|
|
308
|
+
* graph that renders the names: a client module for the components, and also a server module if Server Components
|
|
309
|
+
* render names with `/server`'s Icon (the two entries keep separate registries). */
|
|
310
|
+
export declare function registerIcons(icons: readonly AuraIcon[]): void;
|
|
287
311
|
export declare const Icon: React$1.ForwardRefExoticComponent<IconProps & React$1.RefAttributes<SVGSVGElement>>;
|
|
288
312
|
|
|
289
313
|
export {
|