@jirawatpyk/aura-react 5.8.0 → 5.9.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.
Files changed (63) hide show
  1. package/README.md +27 -0
  2. package/dist/aura.bundle.js +1485 -1085
  3. package/dist/cjs/index.cjs +1485 -1085
  4. package/dist/esm/Accordion.js +2 -1
  5. package/dist/esm/Alert.js +2 -1
  6. package/dist/esm/AppShell.js +2 -1
  7. package/dist/esm/Breadcrumb.js +2 -1
  8. package/dist/esm/Button.js +2 -1
  9. package/dist/esm/Checkbox.js +2 -1
  10. package/dist/esm/Combobox.js +7 -6
  11. package/dist/esm/Command.js +3 -2
  12. package/dist/esm/DataTable.js +35 -13
  13. package/dist/esm/DatePicker.js +8 -7
  14. package/dist/esm/Dialog.js +38 -5
  15. package/dist/esm/Field.js +2 -1
  16. package/dist/esm/FileUpload.js +4 -3
  17. package/dist/esm/FilterBar.js +3 -2
  18. package/dist/esm/FormErrorSummary.js +2 -1
  19. package/dist/esm/Icon.js +50 -31
  20. package/dist/esm/Menu.js +2 -1
  21. package/dist/esm/NumberField.js +3 -2
  22. package/dist/esm/Pagination.js +3 -2
  23. package/dist/esm/PasswordField.js +2 -1
  24. package/dist/esm/Popover.js +2 -1
  25. package/dist/esm/RadioGroup.js +2 -1
  26. package/dist/esm/Select.js +4 -3
  27. package/dist/esm/SideNav.js +3 -2
  28. package/dist/esm/Stat.js +8 -1
  29. package/dist/esm/Stepper.js +2 -1
  30. package/dist/esm/Tabs.js +79 -9
  31. package/dist/esm/Tag.js +3 -2
  32. package/dist/esm/TimePicker.js +5 -4
  33. package/dist/esm/Toaster.js +3 -2
  34. package/dist/esm/classes.js +14 -1
  35. package/dist/esm/colorScheme.js +8 -1
  36. package/dist/esm/display.js +22 -12
  37. package/dist/esm/iconSvg.js +53 -0
  38. package/dist/esm/icons.js +531 -0
  39. package/dist/esm/index.js +2 -1
  40. package/dist/esm/internal.js +1 -14
  41. package/dist/esm/locale.js +7 -0
  42. package/dist/esm/strings.js +4 -245
  43. package/dist/esm/strings.sv.js +127 -0
  44. package/dist/esm/strings.th.js +127 -0
  45. package/dist/icons/index.cjs +613 -0
  46. package/dist/icons/index.d.cts +106 -0
  47. package/dist/icons/index.d.ts +106 -0
  48. package/dist/index.d.cts +44 -2
  49. package/dist/index.d.ts +44 -2
  50. package/dist/locales/sv.cjs +149 -0
  51. package/dist/locales/sv.d.cts +96 -0
  52. package/dist/locales/sv.d.ts +96 -0
  53. package/dist/locales/th.cjs +149 -0
  54. package/dist/locales/th.d.cts +96 -0
  55. package/dist/locales/th.d.ts +96 -0
  56. package/dist/server/index.cjs +445 -314
  57. package/dist/server/index.d.cts +24 -0
  58. package/dist/server/index.d.ts +24 -0
  59. package/dist/server/index.js +445 -314
  60. package/dist/styles.css +1 -0
  61. package/dist/styles.layer.css +1 -0
  62. package/package.json +35 -3
  63. package/scripts/aura-icons-codemod.mjs +345 -0
@@ -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 {
@@ -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 {