@orianatech/pire 0.4.0 → 0.6.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 (58) hide show
  1. package/NOTICE +19 -0
  2. package/dist/components/core/Heading.d.cts +15 -0
  3. package/dist/components/core/Heading.d.ts +16 -0
  4. package/dist/components/core/Heading.d.ts.map +1 -0
  5. package/dist/components/core/Link.d.cts +13 -0
  6. package/dist/components/core/Link.d.ts +14 -0
  7. package/dist/components/core/Link.d.ts.map +1 -0
  8. package/dist/components/core/Separator.d.cts +12 -0
  9. package/dist/components/core/Separator.d.ts +13 -0
  10. package/dist/components/core/Separator.d.ts.map +1 -0
  11. package/dist/components/core/Text.d.cts +29 -0
  12. package/dist/components/core/Text.d.ts +30 -0
  13. package/dist/components/core/Text.d.ts.map +1 -0
  14. package/dist/components/data/DataTable.d.ts.map +1 -1
  15. package/dist/components/data/FilterBar.d.cts +7 -1
  16. package/dist/components/data/FilterBar.d.ts +7 -1
  17. package/dist/components/data/FilterBar.d.ts.map +1 -1
  18. package/dist/components/feedback/Dialog.d.ts.map +1 -1
  19. package/dist/components/feedback/InlineMessage.d.ts.map +1 -1
  20. package/dist/components/feedback/Toast.d.ts.map +1 -1
  21. package/dist/components/forms/ComboBox.d.ts.map +1 -1
  22. package/dist/components/forms/DatePicker.d.ts.map +1 -1
  23. package/dist/components/forms/MultiComboBox.d.ts.map +1 -1
  24. package/dist/components/forms/NumberField.d.ts.map +1 -1
  25. package/dist/components/forms/ValueHelpField.d.ts.map +1 -1
  26. package/dist/components/navigation/Menu.d.cts +39 -0
  27. package/dist/components/navigation/Menu.d.ts +40 -0
  28. package/dist/components/navigation/Menu.d.ts.map +1 -0
  29. package/dist/components/navigation/Pagination.d.ts.map +1 -1
  30. package/dist/components/navigation/SideNav.d.ts.map +1 -1
  31. package/dist/components/patterns/SidePanel.d.ts.map +1 -1
  32. package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
  33. package/dist/components.css +67 -0
  34. package/dist/fonts/LICENSE-jetbrains-mono.txt +93 -0
  35. package/dist/fonts/LICENSE-public-sans.txt +93 -0
  36. package/dist/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  37. package/dist/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
  38. package/dist/fonts/jetbrains-mono-latin-600-normal.woff2 +0 -0
  39. package/dist/fonts/public-sans-latin-400-normal.woff2 +0 -0
  40. package/dist/fonts/public-sans-latin-500-normal.woff2 +0 -0
  41. package/dist/fonts/public-sans-latin-600-normal.woff2 +0 -0
  42. package/dist/fonts/public-sans-latin-700-normal.woff2 +0 -0
  43. package/dist/i18n/PireIntlProvider.d.cts +21 -0
  44. package/dist/i18n/PireIntlProvider.d.ts +22 -0
  45. package/dist/i18n/PireIntlProvider.d.ts.map +1 -0
  46. package/dist/i18n/messages.d.cts +64 -0
  47. package/dist/i18n/messages.d.ts +65 -0
  48. package/dist/i18n/messages.d.ts.map +1 -0
  49. package/dist/index.cjs +674 -399
  50. package/dist/index.cjs.map +1 -1
  51. package/dist/index.d.cts +8 -1
  52. package/dist/index.d.ts +8 -1
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +628 -359
  55. package/dist/index.js.map +1 -1
  56. package/dist/tokens/fonts.css +20 -15
  57. package/dist/tokens/typography.css +5 -0
  58. package/package.json +5 -2
@@ -0,0 +1,93 @@
1
+ Copyright 2015 The Public Sans Project Authors (https://github.com/uswds/public-sans) PublicSans-Italic[wght].ttf: Copyright 2015 The Public Sans Project Authors (https://github.com/uswds/public-sans)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import { type PireMessages } from './messages.cjs';
3
+ export interface PireIntlProviderProps {
4
+ /** Overrides merged over the English defaults, so a partial dictionary is enough. */
5
+ messages?: Partial<PireMessages>;
6
+ children?: React.ReactNode;
7
+ }
8
+ /**
9
+ * Supplies the strings Pire renders itself. Mount once near the app root, alongside React Aria's
10
+ * `I18nProvider` — that one localises React Aria's internals, this one localises Pire's.
11
+ */
12
+ export declare function PireIntlProvider({ messages, children }: PireIntlProviderProps): React.JSX.Element;
13
+ /** Reads the active dictionary. Without a provider this returns the English defaults. */
14
+ export declare function usePireMessages(): PireMessages;
15
+ /**
16
+ * Resolves one string, letting an explicit prop win over the dictionary.
17
+ *
18
+ * Components call this so a per-instance override is always available — a screen with two navs
19
+ * needs to name them differently even when the dictionary is correct.
20
+ */
21
+ export declare function useMessage(key: keyof PireMessages, override?: string): string;
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { type PireMessages } from './messages.js';
3
+ export interface PireIntlProviderProps {
4
+ /** Overrides merged over the English defaults, so a partial dictionary is enough. */
5
+ messages?: Partial<PireMessages>;
6
+ children?: React.ReactNode;
7
+ }
8
+ /**
9
+ * Supplies the strings Pire renders itself. Mount once near the app root, alongside React Aria's
10
+ * `I18nProvider` — that one localises React Aria's internals, this one localises Pire's.
11
+ */
12
+ export declare function PireIntlProvider({ messages, children }: PireIntlProviderProps): React.JSX.Element;
13
+ /** Reads the active dictionary. Without a provider this returns the English defaults. */
14
+ export declare function usePireMessages(): PireMessages;
15
+ /**
16
+ * Resolves one string, letting an explicit prop win over the dictionary.
17
+ *
18
+ * Components call this so a per-instance override is always available — a screen with two navs
19
+ * needs to name them differently even when the dictionary is correct.
20
+ */
21
+ export declare function useMessage(key: keyof PireMessages, override?: string): string;
22
+ //# sourceMappingURL=PireIntlProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PireIntlProvider.d.ts","sourceRoot":"","sources":["../../src/i18n/PireIntlProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,YAAY,CAAC;AAI3D,MAAM,WAAW,qBAAqB;IACpC,qFAAqF;IACrF,QAAQ,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,qBAAqB,qBAO7E;AAED,yFAAyF;AACzF,wBAAgB,eAAe,IAAI,YAAY,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAK7E"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Every string Pire renders that the consumer did not supply.
3
+ *
4
+ * Keys are `<component><thing>`. Values are the English defaults, so a consumer that installs
5
+ * nothing keeps working exactly as before.
6
+ *
7
+ * React Aria localises its own internals (date field segments, table sort announcements) through
8
+ * `I18nProvider`, which Pire re-exports. This dictionary is the parallel for Pire's own strings —
9
+ * install both to fully translate the UI.
10
+ */
11
+ export interface PireMessages {
12
+ /** FilterBar's landmark name. */
13
+ filterBarLabel: string;
14
+ /** Visible text of the apply button. Filters apply explicitly, never live. */
15
+ filterBarGo: string;
16
+ /** Visible text of the button that removes every active filter. */
17
+ filterBarClearAll: string;
18
+ /** Accessible name of the header checkbox that selects every row. */
19
+ dataTableSelectAll: string;
20
+ /** Accessible name of a row's selection checkbox. */
21
+ dataTableSelectRow: string;
22
+ /** Accessible name of the dialog's close affordance. */
23
+ dialogClose: string;
24
+ /** Accessible name of SidePanel's close affordance. */
25
+ sidePanelClose: string;
26
+ /** Accessible name of InlineMessage's dismiss affordance. */
27
+ inlineMessageDismiss: string;
28
+ /** Accessible name of a toast's dismiss affordance. */
29
+ toastDismiss: string;
30
+ /** Landmark name of the toast live region. */
31
+ toastRegionLabel: string;
32
+ /** Accessible name of the button that opens a ComboBox's list. */
33
+ comboBoxShowSuggestions: string;
34
+ /** Accessible name of the button that opens the calendar popover. */
35
+ datePickerOpenCalendar: string;
36
+ datePickerPreviousMonth: string;
37
+ datePickerNextMonth: string;
38
+ /** Accessible names of the NumberField steppers. */
39
+ numberFieldIncrease: string;
40
+ numberFieldDecrease: string;
41
+ /** Accessible name of the button that clears a ValueHelpField. */
42
+ valueHelpFieldClear: string;
43
+ /** Opens the value-help dialog. `{label}` is replaced with the field's own label. */
44
+ valueHelpFieldOpenNamed: string;
45
+ /** Same button, when the field has no string label to name it with. */
46
+ valueHelpFieldOpen: string;
47
+ /** Accessible name of ValueHelpDialog's search field. */
48
+ valueHelpDialogSearch: string;
49
+ /** Visible text of ValueHelpDialog's cancel button. */
50
+ valueHelpDialogCancel: string;
51
+ /** Pagination's landmark name and its controls. */
52
+ paginationLabel: string;
53
+ /** Record range. `{from}`, `{to}` and `{total}` are replaced with formatted numbers. */
54
+ paginationRange: string;
55
+ /** Current page. `{page}` and `{pages}` are replaced. */
56
+ paginationPageOf: string;
57
+ paginationPrevious: string;
58
+ paginationNext: string;
59
+ paginationRowsPerPage: string;
60
+ /** Landmark name of the main SideNav. Override it when a screen has more than one nav. */
61
+ sideNavLabel: string;
62
+ }
63
+ export declare const enMessages: PireMessages;
64
+ export declare const esMessages: PireMessages;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Every string Pire renders that the consumer did not supply.
3
+ *
4
+ * Keys are `<component><thing>`. Values are the English defaults, so a consumer that installs
5
+ * nothing keeps working exactly as before.
6
+ *
7
+ * React Aria localises its own internals (date field segments, table sort announcements) through
8
+ * `I18nProvider`, which Pire re-exports. This dictionary is the parallel for Pire's own strings —
9
+ * install both to fully translate the UI.
10
+ */
11
+ export interface PireMessages {
12
+ /** FilterBar's landmark name. */
13
+ filterBarLabel: string;
14
+ /** Visible text of the apply button. Filters apply explicitly, never live. */
15
+ filterBarGo: string;
16
+ /** Visible text of the button that removes every active filter. */
17
+ filterBarClearAll: string;
18
+ /** Accessible name of the header checkbox that selects every row. */
19
+ dataTableSelectAll: string;
20
+ /** Accessible name of a row's selection checkbox. */
21
+ dataTableSelectRow: string;
22
+ /** Accessible name of the dialog's close affordance. */
23
+ dialogClose: string;
24
+ /** Accessible name of SidePanel's close affordance. */
25
+ sidePanelClose: string;
26
+ /** Accessible name of InlineMessage's dismiss affordance. */
27
+ inlineMessageDismiss: string;
28
+ /** Accessible name of a toast's dismiss affordance. */
29
+ toastDismiss: string;
30
+ /** Landmark name of the toast live region. */
31
+ toastRegionLabel: string;
32
+ /** Accessible name of the button that opens a ComboBox's list. */
33
+ comboBoxShowSuggestions: string;
34
+ /** Accessible name of the button that opens the calendar popover. */
35
+ datePickerOpenCalendar: string;
36
+ datePickerPreviousMonth: string;
37
+ datePickerNextMonth: string;
38
+ /** Accessible names of the NumberField steppers. */
39
+ numberFieldIncrease: string;
40
+ numberFieldDecrease: string;
41
+ /** Accessible name of the button that clears a ValueHelpField. */
42
+ valueHelpFieldClear: string;
43
+ /** Opens the value-help dialog. `{label}` is replaced with the field's own label. */
44
+ valueHelpFieldOpenNamed: string;
45
+ /** Same button, when the field has no string label to name it with. */
46
+ valueHelpFieldOpen: string;
47
+ /** Accessible name of ValueHelpDialog's search field. */
48
+ valueHelpDialogSearch: string;
49
+ /** Visible text of ValueHelpDialog's cancel button. */
50
+ valueHelpDialogCancel: string;
51
+ /** Pagination's landmark name and its controls. */
52
+ paginationLabel: string;
53
+ /** Record range. `{from}`, `{to}` and `{total}` are replaced with formatted numbers. */
54
+ paginationRange: string;
55
+ /** Current page. `{page}` and `{pages}` are replaced. */
56
+ paginationPageOf: string;
57
+ paginationPrevious: string;
58
+ paginationNext: string;
59
+ paginationRowsPerPage: string;
60
+ /** Landmark name of the main SideNav. Override it when a screen has more than one nav. */
61
+ sideNavLabel: string;
62
+ }
63
+ export declare const enMessages: PireMessages;
64
+ export declare const esMessages: PireMessages;
65
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,iBAAiB,EAAE,MAAM,CAAC;IAE1B,qEAA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