@orianatech/pire 0.13.0 → 0.16.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/dist/components/core/Icon.d.ts.map +1 -1
- package/dist/components/core/Kbd.d.cts +17 -0
- package/dist/components/core/Kbd.d.ts +18 -0
- package/dist/components/core/Kbd.d.ts.map +1 -0
- package/dist/components/core/icon-data.generated.d.ts.map +1 -1
- package/dist/components/core/icon-map.d.cts +9 -0
- package/dist/components/core/icon-map.d.ts +9 -0
- package/dist/components/core/icon-map.d.ts.map +1 -1
- package/dist/components/forms/Input.d.cts +20 -2
- package/dist/components/forms/Input.d.ts +20 -2
- package/dist/components/forms/Input.d.ts.map +1 -1
- package/dist/components/forms/ValueHelpField.d.cts +12 -1
- package/dist/components/forms/ValueHelpField.d.ts +12 -1
- package/dist/components/forms/ValueHelpField.d.ts.map +1 -1
- package/dist/components/navigation/Menu.d.cts +7 -2
- package/dist/components/navigation/Menu.d.ts +7 -2
- package/dist/components/navigation/Menu.d.ts.map +1 -1
- package/dist/components/navigation/ShellBar.d.cts +13 -1
- package/dist/components/navigation/ShellBar.d.ts +13 -1
- package/dist/components/navigation/ShellBar.d.ts.map +1 -1
- package/dist/components/patterns/CommandPalette.d.cts +97 -0
- package/dist/components/patterns/CommandPalette.d.ts +98 -0
- package/dist/components/patterns/CommandPalette.d.ts.map +1 -0
- package/dist/components/patterns/ValueHelpDialog.d.cts +22 -1
- package/dist/components/patterns/ValueHelpDialog.d.ts +22 -1
- package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
- package/dist/components.css +94 -2
- package/dist/i18n/messages.d.cts +28 -0
- package/dist/i18n/messages.d.ts +28 -0
- package/dist/i18n/messages.d.ts.map +1 -1
- package/dist/index.cjs +1071 -664
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +985 -563
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -38,13 +38,14 @@ __export(src_exports, {
|
|
|
38
38
|
Card: () => Card,
|
|
39
39
|
Checkbox: () => Checkbox,
|
|
40
40
|
ComboBox: () => ComboBox,
|
|
41
|
+
CommandPalette: () => CommandPalette,
|
|
41
42
|
ConfirmDialog: () => ConfirmDialog,
|
|
42
43
|
DataTable: () => DataTable,
|
|
43
44
|
DatePicker: () => DatePicker,
|
|
44
45
|
DateRangePicker: () => DateRangePicker,
|
|
45
46
|
DescriptionList: () => DescriptionList,
|
|
46
47
|
Dialog: () => Dialog,
|
|
47
|
-
DialogTrigger: () =>
|
|
48
|
+
DialogTrigger: () => import_react_aria_components34.DialogTrigger,
|
|
48
49
|
DonutChart: () => DonutChart,
|
|
49
50
|
EmptyState: () => EmptyState,
|
|
50
51
|
FileDropZone: () => FileDropZone,
|
|
@@ -53,11 +54,13 @@ __export(src_exports, {
|
|
|
53
54
|
FooterBar: () => FooterBar,
|
|
54
55
|
FormField: () => FormField,
|
|
55
56
|
Heading: () => Heading,
|
|
56
|
-
I18nProvider: () =>
|
|
57
|
+
I18nProvider: () => import_react_aria_components34.I18nProvider,
|
|
58
|
+
ICON_NAMES: () => ICON_NAMES,
|
|
57
59
|
Icon: () => Icon,
|
|
58
60
|
IconButton: () => IconButton,
|
|
59
61
|
InlineMessage: () => InlineMessage,
|
|
60
62
|
Input: () => Input,
|
|
63
|
+
Kbd: () => Kbd,
|
|
61
64
|
KpiTile: () => KpiTile,
|
|
62
65
|
LineChart: () => LineChart,
|
|
63
66
|
Link: () => Link,
|
|
@@ -66,7 +69,7 @@ __export(src_exports, {
|
|
|
66
69
|
MenuItem: () => MenuItem,
|
|
67
70
|
MenuSection: () => MenuSection,
|
|
68
71
|
MenuSeparator: () => MenuSeparator,
|
|
69
|
-
MenuTrigger: () =>
|
|
72
|
+
MenuTrigger: () => import_react_aria_components34.MenuTrigger,
|
|
70
73
|
MultiComboBox: () => MultiComboBox,
|
|
71
74
|
NumberField: () => NumberField,
|
|
72
75
|
ObjectHeader: () => ObjectHeader,
|
|
@@ -74,11 +77,11 @@ __export(src_exports, {
|
|
|
74
77
|
PageHeader: () => PageHeader,
|
|
75
78
|
Pagination: () => Pagination,
|
|
76
79
|
PireIntlProvider: () => PireIntlProvider,
|
|
77
|
-
Popover: () =>
|
|
80
|
+
Popover: () => import_react_aria_components34.Popover,
|
|
78
81
|
ProgressBar: () => ProgressBar,
|
|
79
82
|
Radio: () => Radio,
|
|
80
83
|
RadioGroup: () => RadioGroup,
|
|
81
|
-
RouterProvider: () =>
|
|
84
|
+
RouterProvider: () => import_react_aria_components34.RouterProvider,
|
|
82
85
|
SectionHeader: () => SectionHeader,
|
|
83
86
|
SegmentedControl: () => SegmentedControl,
|
|
84
87
|
Select: () => Select,
|
|
@@ -90,7 +93,7 @@ __export(src_exports, {
|
|
|
90
93
|
Skeleton: () => Skeleton,
|
|
91
94
|
SkeletonTableRow: () => SkeletonTableRow,
|
|
92
95
|
Strong: () => Strong,
|
|
93
|
-
SubmenuTrigger: () =>
|
|
96
|
+
SubmenuTrigger: () => import_react_aria_components34.SubmenuTrigger,
|
|
94
97
|
Switch: () => Switch,
|
|
95
98
|
Tabs: () => Tabs,
|
|
96
99
|
Tag: () => Tag,
|
|
@@ -108,6 +111,7 @@ __export(src_exports, {
|
|
|
108
111
|
esMessages: () => esMessages,
|
|
109
112
|
formatFileSize: () => formatFileSize,
|
|
110
113
|
rangeLengthInDays: () => rangeLengthInDays,
|
|
114
|
+
useCommandPaletteShortcut: () => useCommandPaletteShortcut,
|
|
111
115
|
usePireMessages: () => usePireMessages,
|
|
112
116
|
useToast: () => useToast
|
|
113
117
|
});
|
|
@@ -117,16 +121,30 @@ module.exports = __toCommonJS(src_exports);
|
|
|
117
121
|
var ICON_MARKUP = {
|
|
118
122
|
"add": '<path d="M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"/>',
|
|
119
123
|
"apps": '<path d="M8,4V8H4V4Zm2-2H2v8h8Zm8,2V8H14V4Zm2-2H12v8h8Zm8,2V8H24V4Zm2-2H22v8h8ZM8,14v4H4V14Zm2-2H2v8h8Zm8,2v4H14V14Zm2-2H12v8h8Zm8,2v4H24V14Zm2-2H22v8h8ZM8,24v4H4V24Zm2-2H2v8h8Zm8,2v4H14V24Zm2-2H12v8h8Zm8,2v4H24V24Zm2-2H22v8h8Z"/>',
|
|
124
|
+
"archive": '<path d="M14 19H18V21H14z"/><path d="M6,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V2ZM24,28H8V16H24Zm0-14H8V10H24ZM8,8V4H24V8Z"/>',
|
|
120
125
|
"arrow--down": '<path d="M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"/>',
|
|
126
|
+
"arrow--left": '<path d="M14 26 15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z"/>',
|
|
121
127
|
"arrow--right": '<path d="M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"/>',
|
|
122
128
|
"arrow--up": '<path d="M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"/>',
|
|
123
129
|
"arrows--vertical": '<path d="M27.6 20.6 24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22z"/><path d="M9 4 3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"/>',
|
|
130
|
+
"asterisk": '<path d="M28.316 13.949 27.684 12.051 17 15.612 17 4 15 4 15 15.612 4.316 12.051 3.684 13.949 14.368 17.51 7.2 27.066 8.8 28.267 16 18.667 23.2 28.267 24.8 27.066 17.632 17.51 28.316 13.949z"/>',
|
|
124
131
|
"attachment": '<path d="M28.1,18.9L13.1,3.9c-2.5-2.6-6.6-2.6-9.2-0.1S1.3,10.5,3.9,13c0,0,0.1,0.1,0.1,0.1L6.8,16l1.4-1.4l-2.9-2.9 C3.6,10,3.6,7.1,5.3,5.4s4.6-1.8,6.3-0.1c0,0,0,0,0.1,0.1l14.9,14.9c1.8,1.7,1.8,4.6,0.1,6.3c-1.7,1.8-4.6,1.8-6.3,0.1 c0,0,0,0-0.1-0.1l-7.4-7.4c-1-1-0.9-2.6,0-3.5c1-0.9,2.5-0.9,3.5,0l4.1,4.1l1.4-1.4c0,0-4.2-4.2-4.2-4.2c-1.8-1.7-4.6-1.6-6.3,0.2 c-1.6,1.7-1.6,4.4,0,6.2l7.5,7.5c2.5,2.6,6.6,2.6,9.2,0.1S30.7,21.5,28.1,18.9C28.1,19,28.1,18.9,28.1,18.9L28.1,18.9z"/>',
|
|
132
|
+
"bank--vault": '<path d="M26,30h-2v-2H8v2h-2v-2h-2c-1.103,0-2-.8975-2-2V4c0-1.103.897-2,2-2h24c1.1025,0,2,.897,2,2v22c0,1.1025-.8975,2-2,2h-2v2ZM4,4v22h24.002l-.002-22H4ZM17,22h-2v-2.1006c-.626-.127-1.2207-.374-1.7573-.7285l-2.5356,2.5361-1.4141-1.4141,2.5366-2.5371c-.3555-.5371-.6021-1.1318-.729-1.7559h-2.1006v-2h2.1001c.1274-.626.374-1.2207.7285-1.7573l-2.5356-2.5356,1.4141-1.4141,2.5366,2.5366c.5376-.3555,1.1318-.6021,1.7563-.729v-2.1006h2v2.1006c.626.127,1.2207.3735,1.7568.728l2.5361-2.5356,1.4141,1.4141-2.5361,2.5356c.3545.5366.6016,1.1313.7285,1.7573h2.1006v2h-2.1006c-.127.626-.374,1.2207-.7285,1.7568l2.5361,2.5361-1.4141,1.4141-2.5371-2.5371c-.5371.3555-1.1318.6025-1.7559.7295v2.1006ZM16,12c-.7954,0-1.5513.3135-2.1279.8818-.5586.5669-.8721,1.3228-.8721,2.1182,0,.7949.3135,1.5508.8823,2.1279,1.1318,1.1162,3.0908,1.127,4.2456-.0098.5586-.5674.8721-1.3232.8721-2.1182,0-.793-.3115-1.5464-.877-2.1226-.5771-.5659-1.3306-.8774-2.123-.8774Z"/>',
|
|
133
|
+
"barcode": '<path d="M2 6H4V28H2z"/><path d="M12 6H14V26H12z"/><path d="M6 6H10V26H6z"/><path d="M16 6H20V26H16z"/><path d="M22 6H26V26H22z"/><path d="M28 6H30V28H28z"/>',
|
|
134
|
+
"book": '<path d="M19 10H26V12H19z"/><path d="M19 15H26V17H19z"/><path d="M19 20H26V22H19z"/><path d="M6 10H13V12H6z"/><path d="M6 15H13V17H6z"/><path d="M6 20H13V22H6z"/><path d="M28,5H4A2.002,2.002,0,0,0,2,7V25a2.002,2.002,0,0,0,2,2H28a2.002,2.002,0,0,0,2-2V7A2.002,2.002,0,0,0,28,5ZM4,7H15V25H4ZM17,25V7H28V25Z"/>',
|
|
135
|
+
"bookmark": '<path d="M24,4V26.75l-7.1-3.59-.9-.45-.9.45L8,26.75V4H24m0-2H8A2,2,0,0,0,6,4V30L16,25,26,30V4A2,2,0,0,0,24,2Z"/>',
|
|
125
136
|
"box": '<path d="M20,21H12a2,2,0,0,1-2-2V17a2,2,0,0,1,2-2h8a2,2,0,0,1,2,2v2A2,2,0,0,1,20,21Zm-8-4v2h8V17Z"/><path d="M28,4H4A2,2,0,0,0,2,6v4a2,2,0,0,0,2,2V28a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V12a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM26,28H6V12H26Zm2-18H4V6H28v4Z"/>',
|
|
126
137
|
"building": '<path d="M28,2H16a2.002,2.002,0,0,0-2,2V14H4a2.002,2.002,0,0,0-2,2V30H30V4A2.0023,2.0023,0,0,0,28,2ZM9,28V21h4v7Zm19,0H15V20a1,1,0,0,0-1-1H8a1,1,0,0,0-1,1v8H4V16H16V4H28Z"/><path d="M18 8H20V10H18z"/><path d="M24 8H26V10H24z"/><path d="M18 14H20V16H18z"/><path d="M24 14H26V16H24z"/><path d="M18 20H20V22H18z"/><path d="M24 20H26V22H24z"/>',
|
|
127
138
|
"building--insights-1": '<path d="M28,2H16a2.002,2.002,0,0,0-2,2V14H4a2.002,2.002,0,0,0-2,2V30H30V4A2.0023,2.0023,0,0,0,28,2ZM9,28V21h4v7Zm19,0H15V20a1,1,0,0,0-1-1H8a1,1,0,0,0-1,1v8H4V16H16V4H28Z"/><path d="M18 8H20V10H18z"/><path d="M24 8H26V10H24z"/><path d="M18 14H20V16H18z"/><path d="M24 14H26V16H24z"/><path d="M18 20H20V22H18z"/><path d="M24 20H26V22H24z"/><path d="M9,12H7a5.0059,5.0059,0,0,1,5-5V9A3.0033,3.0033,0,0,0,9,12Z"/><path d="M4,12H2A10.0114,10.0114,0,0,1,12,2V4A8.0092,8.0092,0,0,0,4,12Z"/>',
|
|
128
139
|
"calculator": '<path d="M26,4V28H6V4H26m0-2H6A2,2,0,0,0,4,4V28a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V4A2,2,0,0,0,26,2Z"/><path d="M9 23H11V25H9z"/><path d="M21 23H23V25H21z"/><path d="M9 18H11V20H9z"/><path d="M21 18H23V20H21z"/><path d="M9 13H11V15H9z"/><path d="M15 23H17V25H15z"/><path d="M15 18H17V20H15z"/><path d="M15 13H17V15H15z"/><path d="M21 13H23V15H21z"/><path d="M9 7H23V10H9z"/>',
|
|
129
140
|
"calendar": '<path d="M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20 V26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z"/>',
|
|
141
|
+
"calendar--add": '<switch><foreignObject width="1" height="1" x="0" y="0" requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/"/><g><path d="M30 22 24 22 24 16 22 16 22 22 16 22 16 24 22 24 22 30 24 30 24 24 30 24z"/><path d="M28,6c0-1.1-0.9-2-2-2h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h8v-2H6V6h4v2h2V6h8v2h2V6h4v8h2V6z"/></g></switch>',
|
|
142
|
+
"calendar--heat-map": '<path d="M26,4H22V2H20V4H12V2H10V4H6A2.0025,2.0025,0,0,0,4,6V26a2.0025,2.0025,0,0,0,2,2H26a2.0025,2.0025,0,0,0,2-2V6A2.0025,2.0025,0,0,0,26,4ZM6,6h4V8h2V6h8V8h2V6h4l0,4H6Zm0,6h5v6H6ZM19,26H13V20h6Zm0-8H13V12h6Zm2,8V20h5l.0012,6Z"/>',
|
|
143
|
+
"chart--area": '<path d="M20.4761,8.0151,13.4473,4.2109a2.0076,2.0076,0,0,0-2.1158.2051L4,10.001V2H2V28a2,2,0,0,0,2,2H30V5.7354ZM28,20.209l-7.62,1.8022-7.0288-2.8838a1.99,1.99,0,0,0-2.022.37L4,25.8359v-4.455l8.375-9.4,7.0186,5.62a2.0155,2.0155,0,0,0,2.0459.2119L28,14.6025ZM12.5239,5.9849l7.03,3.8042a2.012,2.012,0,0,0,1.3408.16L28,8.2646v4.1138L20.6187,16.02,13.6,10.4a1.99,1.99,0,0,0-2.6885.2642L4,18.3838v-5.87ZM4.5513,28,12.62,20.9888l7.0288,2.8838a1.9977,1.9977,0,0,0,1.147.0771L28,22.2612V28Z"/>',
|
|
144
|
+
"chart--bar": '<path d="M4,2H2V28a2,2,0,0,0,2,2H30V28H4V25H26V17H4V13H18V5H4ZM24,19v4H4V19ZM16,7v4H4V7Z"/>',
|
|
145
|
+
"chart--column": '<path d="M27,28V6H19V28H15V14H7V28H4V2H2V28a2,2,0,0,0,2,2H30V28ZM13,28H9V16h4Zm12,0H21V8h4Z"/>',
|
|
146
|
+
"chart--line": '<path d="M4.67,28l6.39-12,7.3,6.49a2,2,0,0,0,1.7.47,2,2,0,0,0,1.42-1.07L27,10.9,25.18,10,19.69,21l-7.3-6.49A2,2,0,0,0,10.71,14a2,2,0,0,0-1.42,1L4,25V2H2V28a2,2,0,0,0,2,2H30V28Z"/>',
|
|
147
|
+
"chart--pie": '<path d="M16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4ZM26,15H17V6.05A10,10,0,0,1,26,15ZM15.42,26A10,10,0,0,1,15,6.05v9a2,2,0,0,0,2,2h9A10,10,0,0,1,15.42,26Z"/>',
|
|
130
148
|
"checkmark": '<path d="M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"/>',
|
|
131
149
|
"checkmark--filled": '<path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"/><path fill="none" d="M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"/>',
|
|
132
150
|
"checkmark--outline": '<path d="M14 21.414 9 16.413 10.413 15 14 18.586 21.585 11 23 12.415 14 21.414z"/><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"/>',
|
|
@@ -134,48 +152,109 @@ var ICON_MARKUP = {
|
|
|
134
152
|
"chevron--left": '<path d="M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"/>',
|
|
135
153
|
"chevron--right": '<path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"/>',
|
|
136
154
|
"chevron--sort": '<path d="M16 28 9 21 10.41 19.59 16 25.17 21.59 19.59 23 21 16 28z"/><path d="M16 4 23 11 21.59 12.41 16 6.83 10.41 12.41 9 11 16 4z"/>',
|
|
155
|
+
"chevron--up": '<path d="M16 10 26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z"/>',
|
|
137
156
|
"circle-dash": '<path d="M7.7,4.7a14.7,14.7,0,0,0-3,3.1L6.3,9A13.26,13.26,0,0,1,8.9,6.3Z"/><path d="M4.6,12.3l-1.9-.6A12.51,12.51,0,0,0,2,16H4A11.48,11.48,0,0,1,4.6,12.3Z"/><path d="M2.7,20.4a14.4,14.4,0,0,0,2,3.9l1.6-1.2a12.89,12.89,0,0,1-1.7-3.3Z"/><path d="M7.8,27.3a14.4,14.4,0,0,0,3.9,2l.6-1.9A12.89,12.89,0,0,1,9,25.7Z"/><path d="M11.7,2.7l.6,1.9A11.48,11.48,0,0,1,16,4V2A12.51,12.51,0,0,0,11.7,2.7Z"/><path d="M24.2,27.3a15.18,15.18,0,0,0,3.1-3.1L25.7,23A11.53,11.53,0,0,1,23,25.7Z"/><path d="M27.4,19.7l1.9.6A15.47,15.47,0,0,0,30,16H28A11.48,11.48,0,0,1,27.4,19.7Z"/><path d="M29.2,11.6a14.4,14.4,0,0,0-2-3.9L25.6,8.9a12.89,12.89,0,0,1,1.7,3.3Z"/><path d="M24.1,4.6a14.4,14.4,0,0,0-3.9-2l-.6,1.9a12.89,12.89,0,0,1,3.3,1.7Z"/><path d="M20.3,29.3l-.6-1.9A11.48,11.48,0,0,1,16,28v2A21.42,21.42,0,0,0,20.3,29.3Z"/>',
|
|
138
157
|
"close": '<path d="M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"/>',
|
|
158
|
+
"cloud--download": '<path d="M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"/><path d="M17 26.17 17 14 15 14 15 26.17 12.41 23.59 11 25 16 30 21 25 19.59 23.59 17 26.17z"/>',
|
|
159
|
+
"cloud--upload": '<path d="M11 18 12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"/><path d="M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"/>',
|
|
139
160
|
"color-palette": '<circle cx="10" cy="12" r="2"/><circle cx="16" cy="9" r="2"/><circle cx="22" cy="12" r="2"/><circle cx="23" cy="18" r="2"/><circle cx="19" cy="23" r="2"/><path d="M16.54,2A14,14,0,0,0,2,16a4.82,4.82,0,0,0,6.09,4.65l1.12-.31A3,3,0,0,1,13,23.24V27a3,3,0,0,0,3,3A14,14,0,0,0,30,15.46,14.05,14.05,0,0,0,16.54,2Zm8.11,22.31A11.93,11.93,0,0,1,16,28a1,1,0,0,1-1-1V23.24a5,5,0,0,0-5-5,5.07,5.07,0,0,0-1.33.18l-1.12.31A2.82,2.82,0,0,1,4,16,12,12,0,0,1,16.47,4,12.18,12.18,0,0,1,28,15.53,11.89,11.89,0,0,1,24.65,24.32Z"/>',
|
|
140
161
|
"copy": '<path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"/><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"/>',
|
|
162
|
+
"currency": '<path d="M21,12V10H17V7H15v3H13a2.002,2.002,0,0,0-2,2v3a2.002,2.002,0,0,0,2,2h6v3H11v2h4v3h2V22h2a2.0023,2.0023,0,0,0,2-2V17a2.002,2.002,0,0,0-2-2H13V12Z"/><path d="M16,4A12,12,0,1,1,4,16,12.0353,12.0353,0,0,1,16,4m0-2A14,14,0,1,0,30,16,14.0412,14.0412,0,0,0,16,2Z"/>',
|
|
163
|
+
"currency--dollar": '<path d="M23,20.5151c0-4.6152-3.78-5.1411-6.8171-5.563-3.31-.4609-5.1829-.86-5.1829-3.71C11,8.8491,13.5071,8,15.6538,8a6.7538,6.7538,0,0,1,5.5681,2.6279l1.5562-1.2558A8.6508,8.6508,0,0,0,17,6.0962V3H15V6.022c-3.6152.2192-6,2.26-6,5.22,0,4.73,3.83,5.2627,6.9075,5.69C19.16,17.3848,21,17.7744,21,20.5151,21,23.5474,17.8674,24,16,24c-3.4294,0-4.8782-.9639-6.2219-2.6279L8.2219,22.6279A8.4382,8.4382,0,0,0,15,25.9648V29h2V25.9551C20.7256,25.6509,23,23.6279,23,20.5151Z"/>',
|
|
164
|
+
"currency--euro": '<path d="M17,26c-3.6162,0-6.3328-2.2974-7.4456-6H19V18H9.1321A15.2782,15.2782,0,0,1,9,16c0-.33.01-.6641.0259-1H19V13H9.2371C9.8447,9.3525,11.81,6,17,6c3.8533,0,5.5315,1.6465,7.1282,4.4893l1.7436-.9786C24.2649,6.6484,22.0779,4,17,4,10.6448,4,7,8.374,7,16c0,7.0654,4.1121,12,10,12,5.0779,0,7.2649-2.6484,8.8718-5.5107l-1.7436-.9786C22.5315,24.3535,20.8533,26,17,26Z"/>',
|
|
165
|
+
"data--base": '<path d="M24,3H8A2,2,0,0,0,6,5V27a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V5A2,2,0,0,0,24,3Zm0,2v6H8V5ZM8,19V13H24v6Zm0,8V21H24v6Z"/><circle cx="11" cy="8" r="1"/><circle cx="11" cy="16" r="1"/><circle cx="11" cy="24" r="1"/>',
|
|
166
|
+
"debug": '<path d="M29.83,20l.34-2L25,17.15V13c0-.08,0-.15,0-.23l5.06-1.36-.51-1.93-4.83,1.29A9,9,0,0,0,20,5V2H18V4.23a8.81,8.81,0,0,0-4,0V2H12V5a9,9,0,0,0-4.71,5.82L2.46,9.48,2,11.41,7,12.77c0,.08,0,.15,0,.23v4.15L1.84,18l.32,2L7,19.18a8.9,8.9,0,0,0,.82,3.57L3.29,27.29l1.42,1.42,4.19-4.2a9,9,0,0,0,14.2,0l4.19,4.2,1.42-1.42-4.54-4.54A8.9,8.9,0,0,0,25,19.18ZM15,25.92A7,7,0,0,1,9,19V13h6ZM9.29,11a7,7,0,0,1,13.42,0ZM23,19a7,7,0,0,1-6,6.92V13h6Z"/>',
|
|
167
|
+
"delivery--parcel": '<path d="M29.4819,8.624l-10-5.5a1,1,0,0,0-.9638,0l-10,5.5a1,1,0,0,0,0,1.752L18,15.5913V26.3086l-3.0362-1.6693L14,26.3912l4.5181,2.4848a.9984.9984,0,0,0,.9638,0l10-5.5A1,1,0,0,0,30,22.5V9.5A1,1,0,0,0,29.4819,8.624ZM19,5.1416,26.9248,9.5,19,13.8584,11.0752,9.5Zm9,16.7671-8,4.4V15.5913l8-4.4Z"/><path d="M2 14H10V16H2z" transform="matrix(-1 0 0 -1 12 30)"/><path d="M4 22H12V24H4z" transform="matrix(-1 0 0 -1 16 46)"/><path d="M6 18H14V20H6z" transform="matrix(-1 0 0 -1 20 38)"/>',
|
|
141
168
|
"delivery-truck": '<path d="M29.92,16.61l-3-7A1,1,0,0,0,26,9H23V7a1,1,0,0,0-1-1H3A1,1,0,0,0,2,7V24a1,1,0,0,0,1,1H5.14a4,4,0,0,0,7.72,0h6.28a4,4,0,0,0,7.72,0H29a1,1,0,0,0,1-1V17A1,1,0,0,0,29.92,16.61ZM23,11h2.34l2.14,5H23ZM9,26a2,2,0,1,1,2-2A2,2,0,0,1,9,26Zm10.14-3H12.86a4,4,0,0,0-7.72,0H4V8H21V20.56A4,4,0,0,0,19.14,23ZM23,26a2,2,0,1,1,2-2A2,2,0,0,1,23,26Zm5-3H26.86A4,4,0,0,0,23,20V18h5Z"/>',
|
|
142
169
|
"document": '<path d="M25.7,9.3l-7-7C18.5,2.1,18.3,2,18,2H8C6.9,2,6,2.9,6,4v24c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V10C26,9.7,25.9,9.5,25.7,9.3 z M18,4.4l5.6,5.6H18V4.4z M24,28H8V4h8v6c0,1.1,0.9,2,2,2h6V28z"/><path d="M10 22H22V24H10z"/><path d="M10 16H22V18H10z"/>',
|
|
170
|
+
"document--add": '<path d="M30 24 26 24 26 20 24 20 24 24 20 24 20 26 24 26 24 30 26 30 26 26 30 26 30 24z"/><path d="M16,28H8V4h8v6a2.0058,2.0058,0,0,0,2,2h6v4h2V10a.9092.9092,0,0,0-.3-.7l-7-7A.9087.9087,0,0,0,18,2H8A2.0058,2.0058,0,0,0,6,4V28a2.0058,2.0058,0,0,0,2,2h8ZM18,4.4,23.6,10H18Z"/>',
|
|
143
171
|
"download": '<path d="M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z"/><path d="M26 14 24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z"/>',
|
|
144
172
|
"edit": '<path d="M2 26H30V28H2z"/><path d="M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6 l-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z"/>',
|
|
173
|
+
"email": '<path d="M28,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V8A2,2,0,0,0,28,6ZM25.8,8,16,14.78,6.2,8ZM4,24V8.91l11.43,7.91a1,1,0,0,0,1.14,0L28,8.91V24Z"/>',
|
|
145
174
|
"error--filled": '<path fill="none" d="M14.9 7.2H17.1V24.799H14.9z" data-icon-path="inner-path" transform="rotate(-45 16 16)"/><path d="M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"/>',
|
|
175
|
+
"events": '<path d="M26,14H24v2h2a3.0033,3.0033,0,0,1,3,3v4h2V19A5.0058,5.0058,0,0,0,26,14Z"/><path d="M24,4a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,24,2Z"/><path d="M23,30H21V28a3.0033,3.0033,0,0,0-3-3H14a3.0033,3.0033,0,0,0-3,3v2H9V28a5.0059,5.0059,0,0,1,5-5h4a5.0059,5.0059,0,0,1,5,5Z"/><path d="M16,13a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,16,11Z"/><path d="M8,14H6a5.0059,5.0059,0,0,0-5,5v4H3V19a3.0033,3.0033,0,0,1,3-3H8Z"/><path d="M8,4A3,3,0,1,1,5,7,3,3,0,0,1,8,4M8,2a5,5,0,1,0,5,5A5,5,0,0,0,8,2Z"/>',
|
|
146
176
|
"filter": '<path d="M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z"/>',
|
|
177
|
+
"filter--edit": '<path d="M26,6H4V9.17l7.41,7.42.59.58V26h4V24h2v2a2,2,0,0,1-2,2H12a2,2,0,0,1-2-2V18L2.59,10.59A2,2,0,0,1,2,9.17V6A2,2,0,0,1,4,4H26Z"/><path d="M29.71,11.29l-3-3a1,1,0,0,0-1.42,0L16,17.59V22h4.41l9.3-9.29A1,1,0,0,0,29.71,11.29ZM19.59,20H18V18.41l5-5L24.59,15ZM26,13.59,24.41,12,26,10.41,27.59,12Z"/>',
|
|
147
178
|
"flash": '<path d="M11.61,29.92a1,1,0,0,1-.6-1.07L12.83,17H8a1,1,0,0,1-1-1.23l3-13A1,1,0,0,1,11,2H21a1,1,0,0,1,.78.37,1,1,0,0,1,.2.85L20.25,11H25a1,1,0,0,1,.9.56,1,1,0,0,1-.11,1l-13,17A1,1,0,0,1,12,30,1.09,1.09,0,0,1,11.61,29.92ZM17.75,13l2-9H11.8L9.26,15h5.91L13.58,25.28,23,13Z"/>',
|
|
179
|
+
"flow": '<path d="M27,22.14V17a2,2,0,0,0-2-2H17V9.86a4,4,0,1,0-2,0V15H7a2,2,0,0,0-2,2v5.14a4,4,0,1,0,2,0V17H25v5.14a4,4,0,1,0,2,0ZM8,26a2,2,0,1,1-2-2A2,2,0,0,1,8,26ZM14,6a2,2,0,1,1,2,2A2,2,0,0,1,14,6ZM26,28a2,2,0,1,1,2-2A2,2,0,0,1,26,28Z"/>',
|
|
180
|
+
"folder": '<path d="M11.17,6l3.42,3.41.58.59H28V26H4V6h7.17m0-2H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2H16L12.59,4.59A2,2,0,0,0,11.17,4Z"/>',
|
|
181
|
+
"function": '<path d="M19.6262,29.5256,19.11,27.5935A12.0035,12.0035,0,0,0,25.2312,8.3323l1.5376-1.2788a14.0033,14.0033,0,0,1-7.1426,22.4721Z"/><path d="M10,29H8V25.18l.8037-.1607C10.2617,24.728,12,23.6206,12,20V18.6182l-4-2V14.3818l4-2V12c0-5.4673,3.9253-9,10-9h2V6.82l-.8037.1607C21.7383,7.272,20,8.3794,20,12v.3818l4,2v2.2364l-4,2V20C20,25.4673,16.0747,29,10,29Zm0-2c4.9346,0,8-2.6821,8-7V17.3818L21.7642,15.5,18,13.6182V12c0-4.5781,2.3853-6.1924,4-6.76V5c-4.9346,0-8,2.6821-8,7v1.6182L10.2358,15.5,14,17.3818V20c0,4.5781-2.3853,6.1924-4,6.76Z"/><path d="M5.2312,24.9465A14.0032,14.0032,0,0,1,12.3779,2.4734l.5161,1.9321A12.0035,12.0035,0,0,0,6.7688,23.6677Z"/>',
|
|
182
|
+
"globe": '<path d="M14,4a7,7,0,1,1-7,7,7,7,0,0,1,7-7m0-2a9,9,0,1,0,9,9A9,9,0,0,0,14,2Z"/><path d="M28,11a13.9563,13.9563,0,0,0-4.1051-9.8949L22.4813,2.5187A11.9944,11.9944,0,0,1,5.5568,19.5194l-.0381-.0381L4.1051,20.8949A13.9563,13.9563,0,0,0,14,25v3H10v2H20V28H16V24.84A14.0094,14.0094,0,0,0,28,11Z"/>',
|
|
148
183
|
"grid": '<path d="M12,4H6A2,2,0,0,0,4,6v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V6A2,2,0,0,0,12,4Zm0,8H6V6h6Z"/><path d="M26,4H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,8H20V6h6Z"/><path d="M12,18H6a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V20A2,2,0,0,0,12,18Zm0,8H6V20h6Z"/><path d="M26,18H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V20A2,2,0,0,0,26,18Zm0,8H20V20h6Z"/>',
|
|
149
184
|
"hashtag": '<path d="M28,12V10H22V4H20v6H12V4H10v6H4v2h6v8H4v2h6v6h2V22h8v6h2V22h6V20H22V12Zm-8,8H12V12h8Z"/>',
|
|
150
185
|
"help": '<path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"/><circle cx="16" cy="23.5" r="1.5"/><path d="M17,8H15.5A4.49,4.49,0,0,0,11,12.5V13h2v-.5A2.5,2.5,0,0,1,15.5,10H17a2.5,2.5,0,0,1,0,5H15v4.5h2V17a4.5,4.5,0,0,0,0-9Z"/>',
|
|
151
186
|
"home": '<path d="M16.6123,2.2138a1.01,1.01,0,0,0-1.2427,0L1,13.4194l1.2427,1.5717L4,13.6209V26a2.0041,2.0041,0,0,0,2,2H26a2.0037,2.0037,0,0,0,2-2V13.63L29.7573,15,31,13.4282ZM18,26H14V18h4Zm2,0V18a2.0023,2.0023,0,0,0-2-2H14a2.002,2.002,0,0,0-2,2v8H6V12.0615l10-7.79,10,7.8005V26Z"/>',
|
|
187
|
+
"idea": '<path d="M11 24H21V26H11z"/><path d="M13 28H19V30H13z"/><path d="M16,2A10,10,0,0,0,6,12a9.19,9.19,0,0,0,3.46,7.62c1,.93,1.54,1.46,1.54,2.38h2c0-1.84-1.11-2.87-2.19-3.86A7.2,7.2,0,0,1,8,12a8,8,0,0,1,16,0,7.2,7.2,0,0,1-2.82,6.14c-1.07,1-2.18,2-2.18,3.86h2c0-.92.53-1.45,1.54-2.39A9.18,9.18,0,0,0,26,12,10,10,0,0,0,16,2Z"/>',
|
|
188
|
+
"identification": '<path d="M28,6V26H4V6H28m0-2H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V6a2,2,0,0,0-2-2Z"/><path d="M6 10H13V12H6z"/><path d="M6 14H10V16H6z"/><path d="M23,18H17a3,3,0,0,0-3,3v2h2V21a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1v2h2V21A3,3,0,0,0,23,18Z"/><path d="M20,17a4,4,0,1,0-4-4A4,4,0,0,0,20,17Zm0-6a2,2,0,1,1-2,2A2,2,0,0,1,20,11Z"/>',
|
|
152
189
|
"information": '<path d="M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"/><path d="M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"/><path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"/>',
|
|
190
|
+
"information--square": '<path d="M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"/><path d="M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"/><path d="M26,28H6a2.0023,2.0023,0,0,1-2-2V6A2.0023,2.0023,0,0,1,6,4H26a2.0023,2.0023,0,0,1,2,2V26A2.0023,2.0023,0,0,1,26,28ZM6,6V26H26V6Z"/>',
|
|
191
|
+
"inventory-management": '<path d="M19 24H23V28H19z"/><path d="M26 24H30V28H26z"/><path d="M19 17H23V21H19z"/><path d="M26 17H30V21H26z"/><path d="M17,24H4V10H28v5h2V10a2.0023,2.0023,0,0,0-2-2H22V4a2.0023,2.0023,0,0,0-2-2H12a2.002,2.002,0,0,0-2,2V8H4a2.002,2.002,0,0,0-2,2V24a2.0023,2.0023,0,0,0,2,2H17ZM12,4h8V8H12Z"/>',
|
|
153
192
|
"launch": '<path d="M26,28H6a2.0027,2.0027,0,0,1-2-2V6A2.0027,2.0027,0,0,1,6,4H16V6H6V26H26V16h2V26A2.0027,2.0027,0,0,1,26,28Z"/><path d="M20 2 20 4 26.586 4 18 12.586 19.414 14 28 5.414 28 12 30 12 30 2 20 2z"/>',
|
|
154
193
|
"layers": '<path d="M16,24a.9967.9967,0,0,1-.4741-.12l-13-7L3.4741,15.12,16,21.8643,28.5259,15.12l.9482,1.7607-13,7A.9967.9967,0,0,1,16,24Z"/><path d="M16,30a.9967.9967,0,0,1-.4741-.12l-13-7L3.4741,21.12,16,27.8643,28.5259,21.12l.9482,1.7607-13,7A.9967.9967,0,0,1,16,30Z"/><path d="M16,18a.9967.9967,0,0,1-.4741-.12l-13-7a1,1,0,0,1,0-1.7607l13-7a.9982.9982,0,0,1,.9482,0l13,7a1,1,0,0,1,0,1.7607l-13,7A.9967.9967,0,0,1,16,18ZM5.1094,10,16,15.8643,26.8906,10,16,4.1358Z"/>',
|
|
194
|
+
"license": '<path d="M10 6H22V8H10z"/><path d="M10 10H22V12H10z"/><path d="M10 24H16V26H10z"/><path d="M10 14H16V16H10z"/><path d="M24,30H8a2.0023,2.0023,0,0,1-2-2V4A2.0023,2.0023,0,0,1,8,2H24a2.0023,2.0023,0,0,1,2,2V28A2.0023,2.0023,0,0,1,24,30ZM8,4V28H24V4Z"/>',
|
|
155
195
|
"list": '<path d="M10 6H28V8H10z"/><path d="M10 24H28V26H10z"/><path d="M10 15H28V17H10z"/><path d="M4 15H6V17H4z"/><path d="M4 6H6V8H4z"/><path d="M4 24H6V26H4z"/>',
|
|
156
196
|
"list--boxes": '<path d="M16 8H30V10H16z"/><path d="M16 22H30V24H16z"/><path d="M10,14H4a2.0023,2.0023,0,0,1-2-2V6A2.0023,2.0023,0,0,1,4,4h6a2.0023,2.0023,0,0,1,2,2v6A2.0023,2.0023,0,0,1,10,14ZM4,6v6h6.0012L10,6Z"/><path d="M10,28H4a2.0023,2.0023,0,0,1-2-2V20a2.0023,2.0023,0,0,1,2-2h6a2.0023,2.0023,0,0,1,2,2v6A2.0023,2.0023,0,0,1,10,28ZM4,20v6h6.0012L10,20Z"/>',
|
|
157
197
|
"list--checked": '<path d="M16 22H30V24H16z"/><path d="M14 19.4 12.6 18 6 24.6 3.4 22 2 23.4 6 27.4z"/><path d="M16 8H30V10H16z"/><path d="M14 5.4 12.6 4 6 10.6 3.4 8 2 9.4 6 13.4z"/>',
|
|
158
198
|
"location": '<path d="M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z"/><path d="M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z"/>',
|
|
199
|
+
"location--company": '<path d="M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,0,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z"/><path d="M21,18H19V10H13v8H11V10a2.0021,2.0021,0,0,1,2-2h6a2.0021,2.0021,0,0,1,2,2Z"/><path d="M15 16H17V18H15z"/><path d="M15 12H17V14H15z"/>',
|
|
159
200
|
"locked": '<path d="M24,14H22V8A6,6,0,0,0,10,8v6H8a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V16A2,2,0,0,0,24,14ZM12,8a4,4,0,0,1,8,0v6H12ZM24,28H8V16H24Z"/>',
|
|
201
|
+
"login": '<path d="M26,30H14a2,2,0,0,1-2-2V25h2v3H26V4H14V7H12V4a2,2,0,0,1,2-2H26a2,2,0,0,1,2,2V28A2,2,0,0,1,26,30Z"/><path d="M14.59 20.59 18.17 17 4 17 4 15 18.17 15 14.59 11.41 16 10 22 16 16 22 14.59 20.59z"/>',
|
|
202
|
+
"logout": '<path d="M6,30H18a2.0023,2.0023,0,0,0,2-2V25H18v3H6V4H18V7h2V4a2.0023,2.0023,0,0,0-2-2H6A2.0023,2.0023,0,0,0,4,4V28A2.0023,2.0023,0,0,0,6,30Z"/><path d="M20.586 20.586 24.172 17 10 17 10 15 24.172 15 20.586 11.414 22 10 28 16 22 22 20.586 20.586z"/>',
|
|
203
|
+
"maximize": '<path d="M20 2 20 4 26.586 4 18 12.582 19.414 14 28 5.414 28 12 30 12 30 2 20 2z"/><path d="M14 19.416 12.592 18 4 26.586 4 20 2 20 2 30 12 30 12 28 5.414 28 14 19.416z"/>',
|
|
160
204
|
"menu": '<path d="M4 6H28V8H4z"/><path d="M4 24H28V26H4z"/><path d="M4 12H28V14H4z"/><path d="M4 18H28V20H4z"/>',
|
|
161
205
|
"minimize": '<path d="M4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18z"/><path d="M30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416z"/>',
|
|
162
206
|
"misuse": '<path d="M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14S23.7,2,16,2z M21.4,23L16,17.6L10.6,23L9,21.4l5.4-5.4L9,10.6L10.6,9 l5.4,5.4L21.4,9l1.6,1.6L17.6,16l5.4,5.4L21.4,23z"/><path fill="none" d="M21.4,23L16,17.6L10.6,23L9,21.4l5.4-5.4L9,10.6L10.6,9l5.4,5.4L21.4,9l1.6,1.6L17.6,16 l5.4,5.4L21.4,23z" data-icon-path="inner-path" opacity="0"/>',
|
|
207
|
+
"money": '<path d="M2 22H30V24H2z"/><path d="M2 26H30V28H2z"/><path d="M24,10a2,2,0,1,0,2,2,2,2,0,0,0-2-2Z"/><path d="M16,16a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,16,16Zm0-6a2,2,0,1,0,2,2A2.002,2.002,0,0,0,16,10Z"/><path d="M8,10a2,2,0,1,0,2,2,2,2,0,0,0-2-2Z"/><path d="M28,20H4a2.0051,2.0051,0,0,1-2-2V6A2.0051,2.0051,0,0,1,4,4H28a2.0051,2.0051,0,0,1,2,2V18A2.0027,2.0027,0,0,1,28,20ZM28,6H4V18H28Z"/>',
|
|
208
|
+
"notebook": '<path d="M19 10H26V12H19z"/><path d="M19 15H26V17H19z"/><path d="M19 20H26V22H19z"/><path d="M28,5H4A2.002,2.002,0,0,0,2,7V25a2.0023,2.0023,0,0,0,2,2H28a2.0027,2.0027,0,0,0,2-2V7A2.0023,2.0023,0,0,0,28,5ZM4,7H15V25H4ZM17,25V7H28l.002,18Z"/>',
|
|
163
209
|
"notification": '<path d="M28.7071,19.293,26,16.5859V13a10.0136,10.0136,0,0,0-9-9.9492V1H15V3.0508A10.0136,10.0136,0,0,0,6,13v3.5859L3.2929,19.293A1,1,0,0,0,3,20v3a1,1,0,0,0,1,1h7v.7768a5.152,5.152,0,0,0,4.5,5.1987A5.0057,5.0057,0,0,0,21,25V24h7a1,1,0,0,0,1-1V20A1,1,0,0,0,28.7071,19.293ZM19,25a3,3,0,0,1-6,0V24h6Zm8-3H5V20.4141L7.707,17.707A1,1,0,0,0,8,17V13a8,8,0,0,1,16,0v4a1,1,0,0,0,.293.707L27,20.4141Z"/>',
|
|
210
|
+
"overflow-menu--horizontal": '<circle cx="8" cy="16" r="2"/><circle cx="16" cy="16" r="2"/><circle cx="24" cy="16" r="2"/>',
|
|
164
211
|
"overflow-menu--vertical": '<circle cx="16" cy="8" r="2"/><circle cx="16" cy="16" r="2"/><circle cx="16" cy="24" r="2"/>',
|
|
212
|
+
"partnership": '<path d="M8,9a4,4,0,1,1,4-4A4,4,0,0,1,8,9ZM8,3a2,2,0,1,0,2,2A2,2,0,0,0,8,3Z"/><path d="M24,9a4,4,0,1,1,4-4A4,4,0,0,1,24,9Zm0-6a2,2,0,1,0,2,2A2,2,0,0,0,24,3Z"/><path d="M26,30H22a2,2,0,0,1-2-2V21h2v7h4V19h2V13a1,1,0,0,0-1-1H20.58L16,20l-4.58-8H5a1,1,0,0,0-1,1v6H6v9h4V21h2v7a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V21a2,2,0,0,1-2-2V13a3,3,0,0,1,3-3h7.58L16,16l3.42-6H27a3,3,0,0,1,3,3v6a2,2,0,0,1-2,2v7A2,2,0,0,1,26,30Z"/>',
|
|
213
|
+
"payment--methods": '<path d="M5,26V15.8281l-3.5859,3.586L0,18l6-6,6,6-1.4141,1.4141-3.5859-3.586v10.1719h12v2H7c-1.104-.0013-1.9987-.896-2-2Z"/><path d="M31,18h-3v-2h-2v2h-1c-1.1046,0-2,.8954-2,2v2c0,1.1046,.8954,2,2,2h4v2h-6s0,2,0,2h3v2h2v-2h1c1.1046,0,2-.8954,2-2v-2c0-1.1046-.8954-2-2-2h-4v-2h6v-2Z"/><path d="M28,12V6c-.0012-1.104-.896-1.9988-2-2H12v2h14v6"/><path d="M2 6H7V8H2z"/><path d="M2 2H10V4H2z"/>',
|
|
214
|
+
"percentage": '<path d="M9,14a5,5,0,1,1,5-5A5.0055,5.0055,0,0,1,9,14ZM9,6a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,9,6Z"/><path d="M.029 15H31.97V17H.029z" transform="rotate(-45 16 16)"/><path d="M23,28a5,5,0,1,1,5-5A5.0055,5.0055,0,0,1,23,28Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,23,20Z"/>',
|
|
215
|
+
"phone": '<path d="M26,29h-.17C6.18,27.87,3.39,11.29,3,6.23A3,3,0,0,1,5.76,3h5.51a2,2,0,0,1,1.86,1.26L14.65,8a2,2,0,0,1-.44,2.16l-2.13,2.15a9.37,9.37,0,0,0,7.58,7.6l2.17-2.15A2,2,0,0,1,24,17.35l3.77,1.51A2,2,0,0,1,29,20.72V26A3,3,0,0,1,26,29ZM6,5A1,1,0,0,0,5,6v.08C5.46,12,8.41,26,25.94,27A1,1,0,0,0,27,26.06V20.72l-3.77-1.51-2.87,2.85L19.88,22C11.18,20.91,10,12.21,10,12.12l-.06-.48,2.84-2.87L11.28,5Z"/>',
|
|
216
|
+
"piggy-bank": '<path d="M16.5,14H20V12H18V11H16v1.0508A2.5,2.5,0,0,0,16.5,17h1a.5.5,0,0,1,0,1H14v2h2v1h2V19.9492A2.5,2.5,0,0,0,17.5,15h-1a.5.5,0,0,1,0-1Z"/><path d="M29,13H26.98A5.7789,5.7789,0,0,0,25,8.8525V5a1,1,0,0,0-1.6-.8L19.6665,7H15c-5.5095,0-9.4634,3.2412-9.9485,8H5a1.0009,1.0009,0,0,1-1-1V12H2v2a3.0033,3.0033,0,0,0,3,3h.07A9.1733,9.1733,0,0,0,9,23.5566V27a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V25h3v2a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V23.6372A5.0926,5.0926,0,0,0,26.8188,20H29a1,1,0,0,0,1-1V14A1,1,0,0,0,29,13Zm-1,5H25.124c-.3052,2.7529-.8235,3.4854-3.124,4.3154V26H20V23H13v3H11V22.3779A7.013,7.013,0,0,1,7,16c0-4.8354,4.0181-7,8-7h5.3335L23,7V9.7764c2.4182,1.8593,1.9126,3.186,2.0183,5.2236H28Z"/>',
|
|
217
|
+
"portfolio": '<path d="M28,10H22V6a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2v4H4a2,2,0,0,0-2,2V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V12A2,2,0,0,0,28,10ZM12,6h8v4H12ZM4,26V12H28V26Z"/>',
|
|
165
218
|
"printer": '<path d="M28,9H25V3H7V9H4a2,2,0,0,0-2,2V21a2,2,0,0,0,2,2H7v6H25V23h3a2,2,0,0,0,2-2V11A2,2,0,0,0,28,9ZM9,5H23V9H9ZM23,27H9V17H23Zm5-6H25V15H7v6H4V11H28Z"/>',
|
|
219
|
+
"purchase": '<path d="M28,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V8A2,2,0,0,0,28,6Zm0,2v3H4V8ZM4,24V13H28V24Z"/><path d="M6 20H16V22H6z"/>',
|
|
166
220
|
"qr-code": '<path d="M24 26H26V28H24z" transform="rotate(-90 25 27)"/><path d="M18 22H20V24H18z" transform="rotate(-90 19 23)"/><path d="M18 30 22 30 22 28 20 28 20 26 18 26 18 30z"/><path d="M25 23H29V25H25z" transform="rotate(-90 27 24)"/><path d="M28 26 30 26 30 30 26 30 26 28 28 28 28 26z"/><path d="M26 20 26 18 30 18 30 22 28 22 28 20 26 20z"/><path d="M24 20 22 20 22 24 20 24 20 26 24 26 24 20z"/><path d="M19 17H21V21H19z" transform="rotate(-90 20 19)"/><path d="M6 22H10V26H6z"/><path d="M14,30H2V18H14ZM4,28h8V20H4Z"/><path d="M22 6H26V10H22z"/><path d="M30,14H18V2H30ZM20,12h8V4H20Z"/><path d="M6 6H10V10H6z"/><path d="M14,14H2V2H14ZM4,12h8V4H4Z"/>',
|
|
221
|
+
"receipt": '<path d="M21 16H23V18H21z"/><path d="M9 16H17V18H9z"/><path d="M21 12H23V14H21z"/><path d="M9 12H17V14H9z"/><path d="M9 8H23V10H9z"/><path d="M25,2H7A2.002,2.002,0,0,0,5,4V29a1,1,0,0,0,1,1H7a.9987.9987,0,0,0,.8-.4L10,26.667,12.2,29.6a1.0353,1.0353,0,0,0,1.6,0L16,26.667,18.2,29.6a1.0353,1.0353,0,0,0,1.6,0L22,26.667,24.2,29.6a.9993.9993,0,0,0,.8.4h1a1,1,0,0,0,1-1V4A2.0023,2.0023,0,0,0,25,2Zm0,25.333L22.8,24.4a1.0353,1.0353,0,0,0-1.6,0L19,27.333,16.8,24.4a1.0353,1.0353,0,0,0-1.6,0L13,27.333,10.8,24.4a1.0353,1.0353,0,0,0-1.6,0L7,27.333V4H25Z"/>',
|
|
167
222
|
"recently-viewed": '<path d="M20.59 22 15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"/><path d="M16,2A13.94,13.94,0,0,0,6,6.23V2H4v8h8V8H7.08A12,12,0,1,1,4,16H2A14,14,0,1,0,16,2Z"/>',
|
|
223
|
+
"redo": '<path d="M12,10H24.1851L20.5977,6.4141,22,5,28,11,22,17l-1.4023-1.4146L24.1821,12H12a6,6,0,0,0,0,12h8v2H12a8,8,0,0,1,0-16Z"/>',
|
|
168
224
|
"renew": '<path d="M12,10H6.78A11,11,0,0,1,27,16h2A13,13,0,0,0,6,7.68V4H4v8h8Z"/><path d="M20,22h5.22A11,11,0,0,1,5,16H3a13,13,0,0,0,23,8.32V28h2V20H20Z"/>',
|
|
225
|
+
"repeat": '<path d="M6,6H26.1719l-3.586-3.5859L24,1l6,6-6,6-1.4141-1.4141L26.1719,8H6v7H4V8A2.0024,2.0024,0,0,1,6,6Z"/><path d="M9.4141,20.4141,5.8281,24H26V17h2v7a2.0024,2.0024,0,0,1-2,2H5.8281L9.414,29.5859,8,31,2,25l6-6Z"/>',
|
|
226
|
+
"report": '<path d="M10 18H18V20H10z"/><path d="M10 13H22V15H10z"/><path d="M10 23H15V25H10z"/><path d="M25,5H22V4a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V5H7A2,2,0,0,0,5,7V28a2,2,0,0,0,2,2H25a2,2,0,0,0,2-2V7A2,2,0,0,0,25,5ZM12,4h8V8H12ZM25,28H7V7h3v3H22V7h3Z"/>',
|
|
227
|
+
"request-quote": '<path d="M22,22v6H6V4H16V2H6A2,2,0,0,0,4,4V28a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V22Z"/><path d="M29.54,5.76l-3.3-3.3a1.6,1.6,0,0,0-2.24,0l-14,14V22h5.53l14-14a1.6,1.6,0,0,0,0-2.24ZM14.7,20H12V17.3l9.44-9.45,2.71,2.71ZM25.56,9.15,22.85,6.44l2.27-2.27,2.71,2.71Z"/>',
|
|
228
|
+
"reset": '<path d="M18,28A12,12,0,1,0,6,16v6.2L2.4,18.6,1,20l6,6,6-6-1.4-1.4L8,22.2V16H8A10,10,0,1,1,18,26Z"/>',
|
|
229
|
+
"rule": '<path d="M10 16H22V18H10z"/><path d="M10 10H22V12H10z"/><path d="M16,30,9.8242,26.7071A10.9815,10.9815,0,0,1,4,17V4A2.0022,2.0022,0,0,1,6,2H26a2.0022,2.0022,0,0,1,2,2V17a10.9815,10.9815,0,0,1-5.8242,9.7069ZM6,4V17a8.9852,8.9852,0,0,0,4.7656,7.9423L16,27.7333l5.2344-2.791A8.9852,8.9852,0,0,0,26,17V4Z"/>',
|
|
230
|
+
"save": '<path d="M27.71,9.29l-5-5A1,1,0,0,0,22,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V10A1,1,0,0,0,27.71,9.29ZM12,6h8v4H12Zm8,20H12V18h8Zm2,0V18a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2v8H6V6h4v4a2,2,0,0,0,2,2h8a2,2,0,0,0,2-2V6.41l4,4V26Z"/>',
|
|
231
|
+
"scales": '<path d="M20,16a5,5,0,0,0,10,0,1,1,0,0,0-.1055-.4473L25.896,7.5562a.8913.8913,0,0,0-.0454-.0816A1,1,0,0,0,25,7H18.8218A3.0155,3.0155,0,0,0,17,5.1841V2H15V5.1841A3.0155,3.0155,0,0,0,13.1782,7H7a1,1,0,0,0-.8945.5527l-4,8A1,1,0,0,0,2,16a5,5,0,0,0,10,0,1,1,0,0,0-.1055-.4473L8.6182,9h4.56A3.0147,3.0147,0,0,0,15,10.8154V28H6v2H26V28H17V10.8159A3.0155,3.0155,0,0,0,18.8218,9h4.56l-3.2763,6.5527A1,1,0,0,0,20,16ZM7,19a2.9958,2.9958,0,0,1-2.8152-2h5.63A2.9956,2.9956,0,0,1,7,19Zm2.3821-4H4.6179L7,10.2363ZM16,9a1,1,0,1,1,1-1A1.0009,1.0009,0,0,1,16,9Zm9,10a2.9958,2.9958,0,0,1-2.8152-2h5.63A2.9956,2.9956,0,0,1,25,19Zm0-8.7637L27.3821,15H22.6179Z"/>',
|
|
169
232
|
"search": '<path d="M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"/>',
|
|
233
|
+
"send": '<path d="M27.45,15.11l-22-11a1,1,0,0,0-1.08.12,1,1,0,0,0-.33,1L7,16,4,26.74A1,1,0,0,0,5,28a1,1,0,0,0,.45-.11l22-11a1,1,0,0,0,0-1.78Zm-20.9,10L8.76,17H18V15H8.76L6.55,6.89,24.76,16Z"/>',
|
|
170
234
|
"settings": '<path d="M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"/><path d="M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"/>',
|
|
171
235
|
"settings--adjust": '<path d="M30,8h-4.1c-0.5-2.3-2.5-4-4.9-4s-4.4,1.7-4.9,4H2v2h14.1c0.5,2.3,2.5,4,4.9,4s4.4-1.7,4.9-4H30V8z M21,12c-1.7,0-3-1.3-3-3 s1.3-3,3-3s3,1.3,3,3S22.7,12,21,12z"/><path d="M2,24h4.1c0.5,2.3,2.5,4,4.9,4s4.4-1.7,4.9-4H30v-2H15.9c-0.5-2.3-2.5-4-4.9-4s-4.4,1.7-4.9,4H2V24z M11,20c1.7,0,3,1.3,3,3 s-1.3,3-3,3s-3-1.3-3-3S9.3,20,11,20z"/>',
|
|
236
|
+
"shopping--bag": '<path d="M28.76,11.35A1,1,0,0,0,28,11H22V7a3,3,0,0,0-3-3H13a3,3,0,0,0-3,3v4H4a1,1,0,0,0-1,1.15L4.88,24.3a2,2,0,0,0,2,1.7H25.14a2,2,0,0,0,2-1.7L29,12.15A1,1,0,0,0,28.76,11.35ZM12,7a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1v4H12ZM25.14,24H6.86L5.17,13H26.83Z"/>',
|
|
172
237
|
"shopping--cart": '<circle cx="10" cy="28" r="2"/><circle cx="24" cy="28" r="2"/><path d="M28,7H5.82L5,2.8A1,1,0,0,0,4,2H0V4H3.18L7,23.2A1,1,0,0,0,8,24H26V22H8.82L8,18H26a1,1,0,0,0,1-.78l2-9A1,1,0,0,0,28,7Zm-2.8,9H7.62L6.22,9H26.75Z"/>',
|
|
238
|
+
"sort--ascending": '<path d="M18 22 19.414 20.586 23 24.172 23 4 25 4 25 24.172 28.586 20.586 30 22 24 28 18 22z"/><path d="M2 18H16V20H2z"/><path d="M6 12H16V14H6z"/><path d="M10 6H16V8H10z"/>',
|
|
239
|
+
"sort--descending": '<path d="M18 22 19.414 20.586 23 24.172 23 4 25 4 25 24.172 28.586 20.586 30 22 24 28 18 22z"/><path d="M2 6H16V8H2z"/><path d="M6 12H16V14H6z"/><path d="M10 18H16V20H10z"/>',
|
|
240
|
+
"star": '<path d="M16,6.52l2.76,5.58.46,1,1,.15,6.16.89L22,18.44l-.75.73.18,1,1.05,6.13-5.51-2.89L16,23l-.93.49L9.56,26.34l1-6.13.18-1L10,18.44,5.58,14.09l6.16-.89,1-.15.46-1L16,6.52M16,2l-4.55,9.22L1.28,12.69l7.36,7.18L6.9,30,16,25.22,25.1,30,23.36,19.87l7.36-7.17L20.55,11.22Z"/>',
|
|
241
|
+
"star--filled": '<path d="M16,2l-4.55,9.22L1.28,12.69l7.36,7.18L6.9,30,16,25.22,25.1,30,23.36,19.87l7.36-7.17L20.55,11.22Z"/>',
|
|
173
242
|
"subtract": '<path d="M8 15H24V17H8z"/>',
|
|
243
|
+
"table--split": '<path d="M27,3H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2V5A2,2,0,0,0,27,3Zm0,2V9H5V5ZM17,11H27v7H17Zm-2,7H5V11H15ZM5,20H15v7H5Zm12,7V20H27v7Z"/>',
|
|
244
|
+
"tag": '<path d="M10,14a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,10,14Zm0-6a2,2,0,1,0,1.998,2.0044A2.002,2.002,0,0,0,10,8Z"/><path d="M16.6436,29.4145,2.5858,15.3555A2,2,0,0,1,2,13.9414V4A2,2,0,0,1,4,2h9.9413a2,2,0,0,1,1.4142.5858L29.4144,16.6436a2.0005,2.0005,0,0,1,0,2.8285l-9.9424,9.9425a2.0008,2.0008,0,0,1-2.8285,0ZM4,4v9.9417L18.0578,28,28,18.0579,13.9416,4Z"/>',
|
|
245
|
+
"task": '<path d="M14 20.18 10.41 16.59 9 18 14 23 23 14 21.59 12.58 14 20.18z"/><path d="M25,5H22V4a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V5H7A2,2,0,0,0,5,7V28a2,2,0,0,0,2,2H25a2,2,0,0,0,2-2V7A2,2,0,0,0,25,5ZM12,4h8V8H12ZM25,28H7V7h3v3H22V7h3Z"/>',
|
|
246
|
+
"task--complete": '<path d="M22 27.18 19.41 24.59 18 26 22 30 30 22 28.59 20.59 22 27.18z"/><path d="M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h9V28H7V7h3v3H22V7h3V18h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"/>',
|
|
174
247
|
"text--font": '<path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"/><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"/>',
|
|
175
248
|
"time": '<path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"/><path d="M20.59 22 15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"/>',
|
|
176
249
|
"trash-can": '<path d="M12 12H14V24H12z"/><path d="M18 12H20V24H18z"/><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"/><path d="M12 2H20V4H12z"/>',
|
|
250
|
+
"undo": '<path d="M20,10H7.8149l3.5874-3.5859L10,5,4,11,10,17l1.4023-1.4146L7.8179,12H20a6,6,0,0,1,0,12H12v2h8a8,8,0,0,0,0-16Z"/>',
|
|
177
251
|
"user": '<path d="M16,4a5,5,0,1,1-5,5,5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,16,2Z"/><path d="M26,30H24V25a5,5,0,0,0-5-5H13a5,5,0,0,0-5,5v5H6V25a7,7,0,0,1,7-7h6a7,7,0,0,1,7,7Z"/>',
|
|
252
|
+
"user--admin": '<path d="M12,4A5,5,0,1,1,7,9a5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,12,2Z"/><path d="M22,30H20V25a5,5,0,0,0-5-5H9a5,5,0,0,0-5,5v5H2V25a7,7,0,0,1,7-7h6a7,7,0,0,1,7,7Z"/><path d="M25 16.18 22.41 13.59 21 15 25 19 32 12 30.59 10.59 25 16.18z"/>',
|
|
253
|
+
"user--follow": '<path d="M32 14 28 14 28 10 26 10 26 14 22 14 22 16 26 16 26 20 28 20 28 16 32 16 32 14z"/><path d="M12,4A5,5,0,1,1,7,9a5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,12,2Z"/><path d="M22,30H20V25a5,5,0,0,0-5-5H9a5,5,0,0,0-5,5v5H2V25a7,7,0,0,1,7-7h6a7,7,0,0,1,7,7Z"/>',
|
|
254
|
+
"user--multiple": '<path d="M30,30H28V25a5.0057,5.0057,0,0,0-5-5V18a7.0078,7.0078,0,0,1,7,7Z"/><path d="M22,30H20V25a5.0059,5.0059,0,0,0-5-5H9a5.0059,5.0059,0,0,0-5,5v5H2V25a7.0082,7.0082,0,0,1,7-7h6a7.0082,7.0082,0,0,1,7,7Z"/><path d="M20,2V4a5,5,0,0,1,0,10v2A7,7,0,0,0,20,2Z"/><path d="M12,4A5,5,0,1,1,7,9a5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,12,2Z"/>',
|
|
255
|
+
"user--profile": '<path d="M12,4A5,5,0,1,1,7,9a5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,12,2Z"/><path d="M22,30H20V25a5,5,0,0,0-5-5H9a5,5,0,0,0-5,5v5H2V25a7,7,0,0,1,7-7h6a7,7,0,0,1,7,7Z"/><path d="M22 4H32V6H22z"/><path d="M22 9H32V11H22z"/><path d="M22 14H29V16H22z"/>',
|
|
178
256
|
"view": '<path d="M30.94,15.66A16.69,16.69,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16.69,16.69,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM16,25c-5.3,0-10.9-3.93-12.93-9C5.1,10.93,10.7,7,16,7s10.9,3.93,12.93,9C26.9,21.07,21.3,25,16,25Z"/><path d="M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,16,20Z"/>',
|
|
257
|
+
"wallet": '<path d="M22 17H24V19H22z"/><path d="M28,8H4V5H26V3H4A2,2,0,0,0,2,5V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM4,26V10H28v3H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h8v3ZM28,15v6H20V15Z"/>',
|
|
179
258
|
"warning--alt": '<path d="M16,23a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,23Z"/><path d="M15 12H17V21H15z"/><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"/>',
|
|
180
259
|
"warning--filled": '<path d="M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"/><path fill="none" d="M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z" data-icon-path="inner-path" opacity="0"/>'
|
|
181
260
|
};
|
|
@@ -248,8 +327,96 @@ var CARBON_MAP = {
|
|
|
248
327
|
"pencil": "edit",
|
|
249
328
|
"lock": "locked",
|
|
250
329
|
"eye": "view",
|
|
251
|
-
"minimize-2": "minimize"
|
|
330
|
+
"minimize-2": "minimize",
|
|
331
|
+
/* --- Direction and chrome, completing the sets above --------------------
|
|
332
|
+
`chevron-up` and `arrow-left` were missing while their three siblings shipped, so a collapsible
|
|
333
|
+
that pointed down had nothing to point back up with. */
|
|
334
|
+
"chevron-up": "chevron--up",
|
|
335
|
+
"arrow-left": "arrow--left",
|
|
336
|
+
"more-horizontal": "overflow-menu--horizontal",
|
|
337
|
+
"maximize-2": "maximize",
|
|
338
|
+
"log-out": "logout",
|
|
339
|
+
"log-in": "login",
|
|
340
|
+
"archive": "archive",
|
|
341
|
+
"folder": "folder",
|
|
342
|
+
"book": "book",
|
|
343
|
+
"notebook": "notebook",
|
|
344
|
+
"asterisk": "asterisk",
|
|
345
|
+
"bookmark": "bookmark",
|
|
346
|
+
"star": "star",
|
|
347
|
+
"star-filled": "star--filled",
|
|
348
|
+
"tag": "tag",
|
|
349
|
+
"repeat": "repeat",
|
|
350
|
+
"undo-2": "undo",
|
|
351
|
+
"redo-2": "redo",
|
|
352
|
+
"rotate-ccw": "reset",
|
|
353
|
+
"table": "table--split",
|
|
354
|
+
"database": "data--base",
|
|
355
|
+
"function-square": "function",
|
|
356
|
+
/* --- Money -------------------------------------------------------------
|
|
357
|
+
`credit-card` is here because its absence shipped: it resolved to nothing, rendered an empty
|
|
358
|
+
box, and reached production on the payment notifications. Carbon spells it `payment--methods`,
|
|
359
|
+
which is exactly the kind of mismatch this map exists to absorb. */
|
|
360
|
+
"credit-card": "payment--methods",
|
|
361
|
+
"wallet": "wallet",
|
|
362
|
+
"banknote": "money",
|
|
363
|
+
"coins": "currency",
|
|
364
|
+
"dollar-sign": "currency--dollar",
|
|
365
|
+
"euro": "currency--euro",
|
|
366
|
+
"receipt": "receipt",
|
|
367
|
+
"percent": "percentage",
|
|
368
|
+
"piggy-bank": "piggy-bank",
|
|
369
|
+
"landmark": "bank--vault",
|
|
370
|
+
"scale": "scales",
|
|
371
|
+
"purchase": "purchase",
|
|
372
|
+
/* --- Documents and ERP objects ----------------------------------------- */
|
|
373
|
+
"file-signature": "request-quote",
|
|
374
|
+
"scroll-text": "license",
|
|
375
|
+
"file-plus": "document--add",
|
|
376
|
+
"save": "save",
|
|
377
|
+
"file-bar-chart": "report",
|
|
378
|
+
"list-todo": "task",
|
|
379
|
+
"check-square": "task--complete",
|
|
380
|
+
"gavel": "rule",
|
|
381
|
+
"id-card": "identification",
|
|
382
|
+
"briefcase": "portfolio",
|
|
383
|
+
"handshake": "partnership",
|
|
384
|
+
"lightbulb": "idea",
|
|
385
|
+
"inventory": "inventory-management",
|
|
386
|
+
"package-2": "delivery--parcel",
|
|
387
|
+
"shopping-bag": "shopping--bag",
|
|
388
|
+
"barcode": "barcode",
|
|
389
|
+
"qr-code": "qr-code",
|
|
390
|
+
"git-branch": "flow",
|
|
391
|
+
"bug": "debug",
|
|
392
|
+
/* --- People and contact ------------------------------------------------- */
|
|
393
|
+
"users": "user--multiple",
|
|
394
|
+
"user-plus": "user--follow",
|
|
395
|
+
"user-cog": "user--admin",
|
|
396
|
+
"user-circle": "user--profile",
|
|
397
|
+
"mail": "email",
|
|
398
|
+
"phone": "phone",
|
|
399
|
+
"send": "send",
|
|
400
|
+
"globe": "globe",
|
|
401
|
+
"building": "location--company",
|
|
402
|
+
/* --- Charts and time ---------------------------------------------------- */
|
|
403
|
+
"bar-chart-3": "chart--column",
|
|
404
|
+
"bar-chart-horizontal": "chart--bar",
|
|
405
|
+
"line-chart": "chart--line",
|
|
406
|
+
"pie-chart": "chart--pie",
|
|
407
|
+
"area-chart": "chart--area",
|
|
408
|
+
"calendar-days": "events",
|
|
409
|
+
"calendar-plus": "calendar--add",
|
|
410
|
+
"calendar-heatmap": "calendar--heat-map",
|
|
411
|
+
/* --- Transfer ----------------------------------------------------------- */
|
|
412
|
+
"cloud-upload": "cloud--upload",
|
|
413
|
+
"cloud-download": "cloud--download",
|
|
414
|
+
"filter-x": "filter--edit",
|
|
415
|
+
"arrow-up-narrow-wide": "sort--ascending",
|
|
416
|
+
"arrow-down-wide-narrow": "sort--descending",
|
|
417
|
+
"badge-info": "information--square"
|
|
252
418
|
};
|
|
419
|
+
var ICON_NAMES = Object.freeze(Object.keys(CARBON_MAP).sort());
|
|
253
420
|
|
|
254
421
|
// src/components/core/Icon.tsx
|
|
255
422
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -302,7 +469,14 @@ function Icon({ name, size = 16, label, pack, style, ...rest }) {
|
|
|
302
469
|
"data-icon": name,
|
|
303
470
|
...rest,
|
|
304
471
|
style: { display: "inline-block", flex: "0 0 auto", width: size, height: size, ...style },
|
|
305
|
-
children: markup === void 0 ?
|
|
472
|
+
children: markup === void 0 ? (
|
|
473
|
+
// A broken icon has to look broken. In development the box gets a dashed outline so the
|
|
474
|
+
// gap is visible on screen instead of only in a console warning that is easy to lose in a
|
|
475
|
+
// busy log — which is how a missing `credit-card` reached production as a blank square.
|
|
476
|
+
// Production still renders nothing at all: a dev diagnostic must never become a user's
|
|
477
|
+
// first sight of a defect. Deliberately not an <svg>, so nothing reads it as a real glyph.
|
|
478
|
+
IS_DEV ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pire-icon-missing", title: `Unknown icon: ${name}` }) : null
|
|
479
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
306
480
|
"svg",
|
|
307
481
|
{
|
|
308
482
|
viewBox: "0 0 32 32",
|
|
@@ -626,25 +800,167 @@ function Separator({
|
|
|
626
800
|
);
|
|
627
801
|
}
|
|
628
802
|
|
|
629
|
-
// src/components/
|
|
803
|
+
// src/components/core/Kbd.tsx
|
|
630
804
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
805
|
+
function Kbd({ children, size = "md", className, ...rest }) {
|
|
806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("kbd", { className: cx("pire-kbd", className), "data-size": size, ...rest, children });
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// src/components/forms/FormField.tsx
|
|
810
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
631
811
|
function FormField({ label, htmlFor, isRequired, hint, error, layout = "stacked", children, className, ...rest }) {
|
|
632
|
-
return /* @__PURE__ */ (0,
|
|
633
|
-
/* @__PURE__ */ (0,
|
|
812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
|
|
813
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: "pire-field-label", htmlFor, children: [
|
|
634
814
|
label,
|
|
635
|
-
isRequired ? /* @__PURE__ */ (0,
|
|
815
|
+
isRequired ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
636
816
|
] }),
|
|
637
817
|
children,
|
|
638
|
-
error ? /* @__PURE__ */ (0,
|
|
639
|
-
/* @__PURE__ */ (0,
|
|
818
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "pire-field-error", role: "alert", children: [
|
|
819
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "alert-circle", size: 12 }),
|
|
640
820
|
error
|
|
641
|
-
] }) : hint ? /* @__PURE__ */ (0,
|
|
821
|
+
] }) : hint ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "pire-field-hint", children: hint }) : null
|
|
642
822
|
] });
|
|
643
823
|
}
|
|
644
824
|
|
|
645
825
|
// src/components/forms/Input.tsx
|
|
826
|
+
var React6 = __toESM(require("react"), 1);
|
|
646
827
|
var import_react_aria_components9 = require("react-aria-components");
|
|
647
|
-
|
|
828
|
+
|
|
829
|
+
// src/i18n/PireIntlProvider.tsx
|
|
830
|
+
var React5 = __toESM(require("react"), 1);
|
|
831
|
+
|
|
832
|
+
// src/i18n/messages.ts
|
|
833
|
+
var enMessages = {
|
|
834
|
+
filterBarLabel: "Filters",
|
|
835
|
+
filterBarGo: "Go",
|
|
836
|
+
filterBarClearAll: "Clear all",
|
|
837
|
+
dataTableSelectAll: "Select all rows",
|
|
838
|
+
dataTableSelectRow: "Select row",
|
|
839
|
+
dataTableLoading: "Loading records",
|
|
840
|
+
dialogClose: "Close",
|
|
841
|
+
sidePanelClose: "Close panel",
|
|
842
|
+
inlineMessageDismiss: "Dismiss message",
|
|
843
|
+
toastDismiss: "Dismiss",
|
|
844
|
+
toastRegionLabel: "Notifications",
|
|
845
|
+
selectEmpty: "No options available",
|
|
846
|
+
comboBoxShowSuggestions: "Show suggestions",
|
|
847
|
+
comboBoxLoading: "Searching\u2026",
|
|
848
|
+
datePickerOpenCalendar: "Open calendar",
|
|
849
|
+
datePickerPreviousMonth: "Previous month",
|
|
850
|
+
datePickerNextMonth: "Next month",
|
|
851
|
+
dateRangePresetsLabel: "Date range shortcuts",
|
|
852
|
+
numberFieldIncrease: "Increase",
|
|
853
|
+
numberFieldDecrease: "Decrease",
|
|
854
|
+
inputClear: "Clear",
|
|
855
|
+
valueHelpFieldPlaceholder: "Not selected",
|
|
856
|
+
valueHelpFieldClear: "Clear selection",
|
|
857
|
+
valueHelpFieldOpenNamed: "Select {label}",
|
|
858
|
+
valueHelpFieldOpen: "Open value help",
|
|
859
|
+
valueHelpDialogSearch: "Search records",
|
|
860
|
+
valueHelpDialogTitle: "Select a record",
|
|
861
|
+
valueHelpDialogSearchPlaceholder: "Search by ID or name",
|
|
862
|
+
valueHelpDialogEmpty: "No records found",
|
|
863
|
+
valueHelpDialogCancel: "Cancel",
|
|
864
|
+
paginationLabel: "Pagination",
|
|
865
|
+
paginationRange: "{from}\u2013{to} of {total}",
|
|
866
|
+
paginationPageOf: "Page {page} of {pages}",
|
|
867
|
+
paginationPrevious: "Previous page",
|
|
868
|
+
paginationNext: "Next page",
|
|
869
|
+
paginationRowsPerPage: "Rows per page",
|
|
870
|
+
sideNavLabel: "Main navigation",
|
|
871
|
+
fileUploadChoose: "Choose files",
|
|
872
|
+
fileUploadRemoveNamed: "Remove {name}",
|
|
873
|
+
fileUploadUploading: "Uploading",
|
|
874
|
+
fileDropZonePrompt: "Drag files here, or choose them",
|
|
875
|
+
shellBarUserMenu: "Account menu for {user}",
|
|
876
|
+
commandPaletteLabel: "Command palette",
|
|
877
|
+
commandPaletteSearchLabel: "Search commands and records",
|
|
878
|
+
commandPalettePlaceholder: "Search for a screen, an action or a record\u2026",
|
|
879
|
+
commandPaletteEmpty: "Nothing matches that",
|
|
880
|
+
commandPaletteLoading: "Searching\u2026",
|
|
881
|
+
commandPaletteHintNavigate: "navigate",
|
|
882
|
+
commandPaletteHintSelect: "open",
|
|
883
|
+
commandPaletteHintClose: "close",
|
|
884
|
+
chartCategoryHeader: "Category",
|
|
885
|
+
chartNoValue: "No data",
|
|
886
|
+
chartEmpty: "No data for this period"
|
|
887
|
+
};
|
|
888
|
+
var esMessages = {
|
|
889
|
+
filterBarLabel: "Filtros",
|
|
890
|
+
filterBarGo: "Buscar",
|
|
891
|
+
filterBarClearAll: "Limpiar todo",
|
|
892
|
+
dataTableSelectAll: "Seleccionar todas las filas",
|
|
893
|
+
dataTableSelectRow: "Seleccionar fila",
|
|
894
|
+
dataTableLoading: "Cargando registros",
|
|
895
|
+
dialogClose: "Cerrar",
|
|
896
|
+
sidePanelClose: "Cerrar panel",
|
|
897
|
+
inlineMessageDismiss: "Descartar mensaje",
|
|
898
|
+
toastDismiss: "Descartar",
|
|
899
|
+
toastRegionLabel: "Notificaciones",
|
|
900
|
+
selectEmpty: "Sin opciones disponibles",
|
|
901
|
+
comboBoxShowSuggestions: "Mostrar sugerencias",
|
|
902
|
+
comboBoxLoading: "Buscando\u2026",
|
|
903
|
+
datePickerOpenCalendar: "Abrir calendario",
|
|
904
|
+
datePickerPreviousMonth: "Mes anterior",
|
|
905
|
+
datePickerNextMonth: "Mes siguiente",
|
|
906
|
+
dateRangePresetsLabel: "Atajos de rango de fechas",
|
|
907
|
+
numberFieldIncrease: "Aumentar",
|
|
908
|
+
numberFieldDecrease: "Disminuir",
|
|
909
|
+
inputClear: "Limpiar",
|
|
910
|
+
valueHelpFieldPlaceholder: "Sin seleccionar",
|
|
911
|
+
valueHelpFieldClear: "Limpiar selecci\xF3n",
|
|
912
|
+
valueHelpFieldOpenNamed: "Seleccionar {label}",
|
|
913
|
+
valueHelpFieldOpen: "Abrir ayuda de valores",
|
|
914
|
+
valueHelpDialogSearch: "Buscar registros",
|
|
915
|
+
valueHelpDialogTitle: "Seleccionar un registro",
|
|
916
|
+
valueHelpDialogSearchPlaceholder: "Buscar por c\xF3digo o nombre",
|
|
917
|
+
valueHelpDialogEmpty: "No se encontraron registros",
|
|
918
|
+
valueHelpDialogCancel: "Cancelar",
|
|
919
|
+
paginationLabel: "Paginaci\xF3n",
|
|
920
|
+
paginationRange: "{from}\u2013{to} de {total}",
|
|
921
|
+
paginationPageOf: "P\xE1gina {page} de {pages}",
|
|
922
|
+
paginationPrevious: "P\xE1gina anterior",
|
|
923
|
+
paginationNext: "P\xE1gina siguiente",
|
|
924
|
+
paginationRowsPerPage: "Filas por p\xE1gina",
|
|
925
|
+
sideNavLabel: "Navegaci\xF3n principal",
|
|
926
|
+
fileUploadChoose: "Elegir archivos",
|
|
927
|
+
fileUploadRemoveNamed: "Quitar {name}",
|
|
928
|
+
fileUploadUploading: "Subiendo",
|
|
929
|
+
fileDropZonePrompt: "Arrastr\xE1 archivos ac\xE1, o elegilos",
|
|
930
|
+
shellBarUserMenu: "Men\xFA de cuenta de {user}",
|
|
931
|
+
commandPaletteLabel: "Paleta de comandos",
|
|
932
|
+
commandPaletteSearchLabel: "Buscar comandos y registros",
|
|
933
|
+
commandPalettePlaceholder: "Busc\xE1 una pantalla, una acci\xF3n o un registro\u2026",
|
|
934
|
+
commandPaletteEmpty: "No hay coincidencias",
|
|
935
|
+
commandPaletteLoading: "Buscando\u2026",
|
|
936
|
+
commandPaletteHintNavigate: "navegar",
|
|
937
|
+
commandPaletteHintSelect: "abrir",
|
|
938
|
+
commandPaletteHintClose: "cerrar",
|
|
939
|
+
chartCategoryHeader: "Categor\xEDa",
|
|
940
|
+
chartNoValue: "Sin datos",
|
|
941
|
+
chartEmpty: "Sin datos para este per\xEDodo"
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
// src/i18n/PireIntlProvider.tsx
|
|
945
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
946
|
+
var MessagesContext = React5.createContext(enMessages);
|
|
947
|
+
function PireIntlProvider({ messages, children }) {
|
|
948
|
+
const value = React5.useMemo(
|
|
949
|
+
() => messages ? { ...enMessages, ...messages } : enMessages,
|
|
950
|
+
[messages]
|
|
951
|
+
);
|
|
952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MessagesContext.Provider, { value, children });
|
|
953
|
+
}
|
|
954
|
+
function usePireMessages() {
|
|
955
|
+
return React5.useContext(MessagesContext);
|
|
956
|
+
}
|
|
957
|
+
function useMessage(key, override) {
|
|
958
|
+
const messages = React5.useContext(MessagesContext);
|
|
959
|
+
return override ?? messages[key];
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
// src/components/forms/Input.tsx
|
|
963
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
648
964
|
function Input({
|
|
649
965
|
label,
|
|
650
966
|
icon,
|
|
@@ -653,6 +969,8 @@ function Input({
|
|
|
653
969
|
errorMessage,
|
|
654
970
|
size = "md",
|
|
655
971
|
numeric,
|
|
972
|
+
isClearable,
|
|
973
|
+
clearLabel,
|
|
656
974
|
fullWidth = true,
|
|
657
975
|
className,
|
|
658
976
|
style,
|
|
@@ -660,20 +978,32 @@ function Input({
|
|
|
660
978
|
onChange,
|
|
661
979
|
...rest
|
|
662
980
|
}) {
|
|
663
|
-
|
|
981
|
+
const msg = usePireMessages();
|
|
982
|
+
const isControlled = rest.value !== void 0;
|
|
983
|
+
const [ownValue, setOwnValue] = React6.useState(rest.defaultValue ?? "");
|
|
984
|
+
const currentValue = isControlled ? rest.value : ownValue;
|
|
985
|
+
const handleChange = (next) => {
|
|
986
|
+
setOwnValue(next);
|
|
987
|
+
onChange?.(next);
|
|
988
|
+
};
|
|
989
|
+
const takesOverValue = isClearable && !isControlled;
|
|
990
|
+
const valueProps = takesOverValue ? { value: ownValue, defaultValue: void 0 } : {};
|
|
991
|
+
const showsClear = isClearable && currentValue !== "" && !rest.isDisabled && !rest.isReadOnly;
|
|
992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
664
993
|
import_react_aria_components9.TextField,
|
|
665
994
|
{
|
|
666
995
|
className: cx("pire-field", className),
|
|
667
996
|
style,
|
|
668
|
-
onChange,
|
|
997
|
+
onChange: handleChange,
|
|
669
998
|
validationBehavior: "aria",
|
|
670
999
|
...rest,
|
|
1000
|
+
...valueProps,
|
|
671
1001
|
children: [
|
|
672
|
-
label ? /* @__PURE__ */ (0,
|
|
1002
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_aria_components9.Label, { className: "pire-field-label", children: [
|
|
673
1003
|
label,
|
|
674
|
-
rest.isRequired ? /* @__PURE__ */ (0,
|
|
1004
|
+
rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
675
1005
|
] }) : null,
|
|
676
|
-
/* @__PURE__ */ (0,
|
|
1006
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
677
1007
|
import_react_aria_components9.Group,
|
|
678
1008
|
{
|
|
679
1009
|
className: "pire-control",
|
|
@@ -682,24 +1012,25 @@ function Input({
|
|
|
682
1012
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
683
1013
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
684
1014
|
children: [
|
|
685
|
-
icon ? /* @__PURE__ */ (0,
|
|
686
|
-
/* @__PURE__ */ (0,
|
|
687
|
-
|
|
1015
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: icon, size: 16, className: "pire-leading-icon" }) : null,
|
|
1016
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components9.Input, { ref: inputRef, className: "pire-input", "data-numeric": numeric ? "true" : void 0 }),
|
|
1017
|
+
showsClear ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components9.Button, { className: "pire-input-clear", onPress: () => handleChange(""), children: clearLabel ?? msg.inputClear }) : null,
|
|
1018
|
+
suffix ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "pire-affix", children: suffix }) : null
|
|
688
1019
|
]
|
|
689
1020
|
}
|
|
690
1021
|
),
|
|
691
|
-
description ? /* @__PURE__ */ (0,
|
|
692
|
-
/* @__PURE__ */ (0,
|
|
1022
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components9.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components9.FieldError, { className: "pire-field-error", children: errorMessage })
|
|
693
1024
|
]
|
|
694
1025
|
}
|
|
695
1026
|
);
|
|
696
1027
|
}
|
|
697
1028
|
|
|
698
1029
|
// src/components/forms/TextArea.tsx
|
|
699
|
-
var
|
|
1030
|
+
var React7 = __toESM(require("react"), 1);
|
|
700
1031
|
var import_react_aria_components10 = require("react-aria-components");
|
|
701
|
-
var
|
|
702
|
-
var useIsomorphicLayoutEffect = typeof document === "undefined" ?
|
|
1032
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1033
|
+
var useIsomorphicLayoutEffect = typeof document === "undefined" ? React7.useEffect : React7.useLayoutEffect;
|
|
703
1034
|
function TextArea({
|
|
704
1035
|
label,
|
|
705
1036
|
description,
|
|
@@ -715,13 +1046,13 @@ function TextArea({
|
|
|
715
1046
|
onChange,
|
|
716
1047
|
...rest
|
|
717
1048
|
}) {
|
|
718
|
-
const innerRef =
|
|
719
|
-
const ref =
|
|
1049
|
+
const innerRef = React7.useRef(null);
|
|
1050
|
+
const ref = React7.useCallback((node) => {
|
|
720
1051
|
innerRef.current = node;
|
|
721
1052
|
if (typeof textAreaRef === "function") textAreaRef(node);
|
|
722
1053
|
else if (textAreaRef) textAreaRef.current = node;
|
|
723
1054
|
}, [textAreaRef]);
|
|
724
|
-
const grow =
|
|
1055
|
+
const grow = React7.useCallback(() => {
|
|
725
1056
|
const el = innerRef.current;
|
|
726
1057
|
if (!el || !autoGrow) return;
|
|
727
1058
|
const styles = getComputedStyle(el);
|
|
@@ -739,7 +1070,7 @@ function TextArea({
|
|
|
739
1070
|
}
|
|
740
1071
|
grow();
|
|
741
1072
|
}, [autoGrow, grow, rest.value]);
|
|
742
|
-
return /* @__PURE__ */ (0,
|
|
1073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
743
1074
|
import_react_aria_components10.TextField,
|
|
744
1075
|
{
|
|
745
1076
|
className: cx("pire-field", className),
|
|
@@ -748,11 +1079,11 @@ function TextArea({
|
|
|
748
1079
|
validationBehavior: "aria",
|
|
749
1080
|
...rest,
|
|
750
1081
|
children: [
|
|
751
|
-
label ? /* @__PURE__ */ (0,
|
|
1082
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_aria_components10.Label, { className: "pire-field-label", children: [
|
|
752
1083
|
label,
|
|
753
|
-
rest.isRequired ? /* @__PURE__ */ (0,
|
|
1084
|
+
rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
754
1085
|
] }) : null,
|
|
755
|
-
/* @__PURE__ */ (0,
|
|
1086
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
756
1087
|
import_react_aria_components10.Group,
|
|
757
1088
|
{
|
|
758
1089
|
className: "pire-control",
|
|
@@ -761,7 +1092,7 @@ function TextArea({
|
|
|
761
1092
|
"data-multiline": "true",
|
|
762
1093
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
763
1094
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
764
|
-
children: /* @__PURE__ */ (0,
|
|
1095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
765
1096
|
import_react_aria_components10.TextArea,
|
|
766
1097
|
{
|
|
767
1098
|
ref,
|
|
@@ -773,8 +1104,8 @@ function TextArea({
|
|
|
773
1104
|
)
|
|
774
1105
|
}
|
|
775
1106
|
),
|
|
776
|
-
description ? /* @__PURE__ */ (0,
|
|
777
|
-
/* @__PURE__ */ (0,
|
|
1107
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components10.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1108
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components10.FieldError, { className: "pire-field-error", children: errorMessage })
|
|
778
1109
|
]
|
|
779
1110
|
}
|
|
780
1111
|
);
|
|
@@ -782,114 +1113,7 @@ function TextArea({
|
|
|
782
1113
|
|
|
783
1114
|
// src/components/forms/Select.tsx
|
|
784
1115
|
var import_react_aria_components11 = require("react-aria-components");
|
|
785
|
-
|
|
786
|
-
// src/i18n/PireIntlProvider.tsx
|
|
787
|
-
var React6 = __toESM(require("react"), 1);
|
|
788
|
-
|
|
789
|
-
// src/i18n/messages.ts
|
|
790
|
-
var enMessages = {
|
|
791
|
-
filterBarLabel: "Filters",
|
|
792
|
-
filterBarGo: "Go",
|
|
793
|
-
filterBarClearAll: "Clear all",
|
|
794
|
-
dataTableSelectAll: "Select all rows",
|
|
795
|
-
dataTableSelectRow: "Select row",
|
|
796
|
-
dataTableLoading: "Loading records",
|
|
797
|
-
dialogClose: "Close",
|
|
798
|
-
sidePanelClose: "Close panel",
|
|
799
|
-
inlineMessageDismiss: "Dismiss message",
|
|
800
|
-
toastDismiss: "Dismiss",
|
|
801
|
-
toastRegionLabel: "Notifications",
|
|
802
|
-
selectEmpty: "No options available",
|
|
803
|
-
comboBoxShowSuggestions: "Show suggestions",
|
|
804
|
-
comboBoxLoading: "Searching\u2026",
|
|
805
|
-
datePickerOpenCalendar: "Open calendar",
|
|
806
|
-
datePickerPreviousMonth: "Previous month",
|
|
807
|
-
datePickerNextMonth: "Next month",
|
|
808
|
-
dateRangePresetsLabel: "Date range shortcuts",
|
|
809
|
-
numberFieldIncrease: "Increase",
|
|
810
|
-
numberFieldDecrease: "Decrease",
|
|
811
|
-
valueHelpFieldClear: "Clear selection",
|
|
812
|
-
valueHelpFieldOpenNamed: "Select {label}",
|
|
813
|
-
valueHelpFieldOpen: "Open value help",
|
|
814
|
-
valueHelpDialogSearch: "Search records",
|
|
815
|
-
valueHelpDialogCancel: "Cancel",
|
|
816
|
-
paginationLabel: "Pagination",
|
|
817
|
-
paginationRange: "{from}\u2013{to} of {total}",
|
|
818
|
-
paginationPageOf: "Page {page} of {pages}",
|
|
819
|
-
paginationPrevious: "Previous page",
|
|
820
|
-
paginationNext: "Next page",
|
|
821
|
-
paginationRowsPerPage: "Rows per page",
|
|
822
|
-
sideNavLabel: "Main navigation",
|
|
823
|
-
fileUploadChoose: "Choose files",
|
|
824
|
-
fileUploadRemoveNamed: "Remove {name}",
|
|
825
|
-
fileUploadUploading: "Uploading",
|
|
826
|
-
fileDropZonePrompt: "Drag files here, or choose them",
|
|
827
|
-
chartCategoryHeader: "Category",
|
|
828
|
-
chartNoValue: "No data",
|
|
829
|
-
chartEmpty: "No data for this period"
|
|
830
|
-
};
|
|
831
|
-
var esMessages = {
|
|
832
|
-
filterBarLabel: "Filtros",
|
|
833
|
-
filterBarGo: "Buscar",
|
|
834
|
-
filterBarClearAll: "Limpiar todo",
|
|
835
|
-
dataTableSelectAll: "Seleccionar todas las filas",
|
|
836
|
-
dataTableSelectRow: "Seleccionar fila",
|
|
837
|
-
dataTableLoading: "Cargando registros",
|
|
838
|
-
dialogClose: "Cerrar",
|
|
839
|
-
sidePanelClose: "Cerrar panel",
|
|
840
|
-
inlineMessageDismiss: "Descartar mensaje",
|
|
841
|
-
toastDismiss: "Descartar",
|
|
842
|
-
toastRegionLabel: "Notificaciones",
|
|
843
|
-
selectEmpty: "Sin opciones disponibles",
|
|
844
|
-
comboBoxShowSuggestions: "Mostrar sugerencias",
|
|
845
|
-
comboBoxLoading: "Buscando\u2026",
|
|
846
|
-
datePickerOpenCalendar: "Abrir calendario",
|
|
847
|
-
datePickerPreviousMonth: "Mes anterior",
|
|
848
|
-
datePickerNextMonth: "Mes siguiente",
|
|
849
|
-
dateRangePresetsLabel: "Atajos de rango de fechas",
|
|
850
|
-
numberFieldIncrease: "Aumentar",
|
|
851
|
-
numberFieldDecrease: "Disminuir",
|
|
852
|
-
valueHelpFieldClear: "Limpiar selecci\xF3n",
|
|
853
|
-
valueHelpFieldOpenNamed: "Seleccionar {label}",
|
|
854
|
-
valueHelpFieldOpen: "Abrir ayuda de valores",
|
|
855
|
-
valueHelpDialogSearch: "Buscar registros",
|
|
856
|
-
valueHelpDialogCancel: "Cancelar",
|
|
857
|
-
paginationLabel: "Paginaci\xF3n",
|
|
858
|
-
paginationRange: "{from}\u2013{to} de {total}",
|
|
859
|
-
paginationPageOf: "P\xE1gina {page} de {pages}",
|
|
860
|
-
paginationPrevious: "P\xE1gina anterior",
|
|
861
|
-
paginationNext: "P\xE1gina siguiente",
|
|
862
|
-
paginationRowsPerPage: "Filas por p\xE1gina",
|
|
863
|
-
sideNavLabel: "Navegaci\xF3n principal",
|
|
864
|
-
fileUploadChoose: "Elegir archivos",
|
|
865
|
-
fileUploadRemoveNamed: "Quitar {name}",
|
|
866
|
-
fileUploadUploading: "Subiendo",
|
|
867
|
-
fileDropZonePrompt: "Arrastr\xE1 archivos ac\xE1, o elegilos",
|
|
868
|
-
chartCategoryHeader: "Categor\xEDa",
|
|
869
|
-
chartNoValue: "Sin datos",
|
|
870
|
-
chartEmpty: "Sin datos para este per\xEDodo"
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
// src/i18n/PireIntlProvider.tsx
|
|
874
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
875
|
-
var MessagesContext = React6.createContext(enMessages);
|
|
876
|
-
function PireIntlProvider({ messages, children }) {
|
|
877
|
-
const value = React6.useMemo(
|
|
878
|
-
() => messages ? { ...enMessages, ...messages } : enMessages,
|
|
879
|
-
[messages]
|
|
880
|
-
);
|
|
881
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessagesContext.Provider, { value, children });
|
|
882
|
-
}
|
|
883
|
-
function usePireMessages() {
|
|
884
|
-
return React6.useContext(MessagesContext);
|
|
885
|
-
}
|
|
886
|
-
function useMessage(key, override) {
|
|
887
|
-
const messages = React6.useContext(MessagesContext);
|
|
888
|
-
return override ?? messages[key];
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
// src/components/forms/Select.tsx
|
|
892
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1116
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
893
1117
|
var norm = (o) => typeof o === "string" ? { value: o, label: o, isDisabled: false } : o;
|
|
894
1118
|
function Select({
|
|
895
1119
|
label,
|
|
@@ -909,7 +1133,7 @@ function Select({
|
|
|
909
1133
|
}) {
|
|
910
1134
|
const msg = usePireMessages();
|
|
911
1135
|
const items = options.map(norm);
|
|
912
|
-
return /* @__PURE__ */ (0,
|
|
1136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
913
1137
|
import_react_aria_components11.Select,
|
|
914
1138
|
{
|
|
915
1139
|
className: cx("pire-field", className),
|
|
@@ -922,11 +1146,11 @@ function Select({
|
|
|
922
1146
|
validationBehavior: "aria",
|
|
923
1147
|
...rest,
|
|
924
1148
|
children: [
|
|
925
|
-
label ? /* @__PURE__ */ (0,
|
|
1149
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_aria_components11.Label, { className: "pire-field-label", children: [
|
|
926
1150
|
label,
|
|
927
|
-
rest.isRequired ? /* @__PURE__ */ (0,
|
|
1151
|
+
rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
928
1152
|
] }) : null,
|
|
929
|
-
/* @__PURE__ */ (0,
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
930
1154
|
import_react_aria_components11.Button,
|
|
931
1155
|
{
|
|
932
1156
|
className: "pire-control",
|
|
@@ -934,20 +1158,20 @@ function Select({
|
|
|
934
1158
|
"data-full-width": String(fullWidth),
|
|
935
1159
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
936
1160
|
children: [
|
|
937
|
-
/* @__PURE__ */ (0,
|
|
938
|
-
/* @__PURE__ */ (0,
|
|
1161
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.SelectValue, { className: "pire-select-value" }),
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "chevron-down", size: 16, className: "pire-leading-icon" })
|
|
939
1163
|
]
|
|
940
1164
|
}
|
|
941
1165
|
),
|
|
942
|
-
description ? /* @__PURE__ */ (0,
|
|
943
|
-
/* @__PURE__ */ (0,
|
|
944
|
-
/* @__PURE__ */ (0,
|
|
1166
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.FieldError, { className: "pire-field-error", children: errorMessage }),
|
|
1168
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
945
1169
|
import_react_aria_components11.ListBox,
|
|
946
1170
|
{
|
|
947
1171
|
className: "pire-listbox",
|
|
948
1172
|
items,
|
|
949
|
-
renderEmptyState: () => /* @__PURE__ */ (0,
|
|
950
|
-
children: (item) => /* @__PURE__ */ (0,
|
|
1173
|
+
renderEmptyState: () => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: emptyLabel ?? msg.selectEmpty }),
|
|
1174
|
+
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: item.label })
|
|
951
1175
|
}
|
|
952
1176
|
) })
|
|
953
1177
|
]
|
|
@@ -957,51 +1181,51 @@ function Select({
|
|
|
957
1181
|
|
|
958
1182
|
// src/components/forms/Checkbox.tsx
|
|
959
1183
|
var import_react_aria_components12 = require("react-aria-components");
|
|
960
|
-
var
|
|
1184
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
961
1185
|
function Checkbox({ label, hint, children, className, ...rest }) {
|
|
962
|
-
return /* @__PURE__ */ (0,
|
|
963
|
-
/* @__PURE__ */ (0,
|
|
964
|
-
/* @__PURE__ */ (0,
|
|
1186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.Checkbox, { className: cx("pire-choice", className), ...rest, children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "pire-choice-box", "aria-hidden": "true", children: isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "minus", size: 12 }) : isSelected ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "check", size: 12 }) : null }),
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
|
|
965
1189
|
label ?? children,
|
|
966
|
-
hint ? /* @__PURE__ */ (0,
|
|
1190
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "pire-choice-hint", children: hint }) : null
|
|
967
1191
|
] })
|
|
968
1192
|
] }) });
|
|
969
1193
|
}
|
|
970
1194
|
|
|
971
1195
|
// src/components/forms/Radio.tsx
|
|
972
1196
|
var import_react_aria_components13 = require("react-aria-components");
|
|
973
|
-
var
|
|
1197
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
974
1198
|
function RadioGroup({ label, description, errorMessage, children, className, ...rest }) {
|
|
975
|
-
return /* @__PURE__ */ (0,
|
|
976
|
-
label ? /* @__PURE__ */ (0,
|
|
977
|
-
/* @__PURE__ */ (0,
|
|
978
|
-
description ? /* @__PURE__ */ (0,
|
|
979
|
-
/* @__PURE__ */ (0,
|
|
1199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_aria_components13.RadioGroup, { className: cx("pire-field", className), validationBehavior: "aria", ...rest, children: [
|
|
1200
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Label, { className: "pire-field-label", children: label }) : null,
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "pire-radiogroup", children }),
|
|
1202
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.FieldError, { className: "pire-field-error", children: errorMessage })
|
|
980
1204
|
] });
|
|
981
1205
|
}
|
|
982
1206
|
function Radio({ label, hint, children, className, ...rest }) {
|
|
983
|
-
return /* @__PURE__ */ (0,
|
|
984
|
-
/* @__PURE__ */ (0,
|
|
985
|
-
/* @__PURE__ */ (0,
|
|
1207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_aria_components13.Radio, { className: cx("pire-choice", className), ...rest, children: [
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "pire-choice-box", "data-radio": "true", "aria-hidden": "true" }),
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { children: [
|
|
986
1210
|
label ?? children,
|
|
987
|
-
hint ? /* @__PURE__ */ (0,
|
|
1211
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "pire-choice-hint", children: hint }) : null
|
|
988
1212
|
] })
|
|
989
1213
|
] });
|
|
990
1214
|
}
|
|
991
1215
|
|
|
992
1216
|
// src/components/forms/Switch.tsx
|
|
993
1217
|
var import_react_aria_components14 = require("react-aria-components");
|
|
994
|
-
var
|
|
1218
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
995
1219
|
function Switch({ label, children, className, ...rest }) {
|
|
996
|
-
return /* @__PURE__ */ (0,
|
|
997
|
-
/* @__PURE__ */ (0,
|
|
998
|
-
/* @__PURE__ */ (0,
|
|
1220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_aria_components14.Switch, { className: cx("pire-choice", className), ...rest, children: [
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pire-switch-track", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pire-switch-thumb" }) }),
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: label ?? children })
|
|
999
1223
|
] });
|
|
1000
1224
|
}
|
|
1001
1225
|
|
|
1002
1226
|
// src/components/forms/ComboBox.tsx
|
|
1003
1227
|
var import_react_aria_components15 = require("react-aria-components");
|
|
1004
|
-
var
|
|
1228
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1005
1229
|
var norm2 = (o) => typeof o === "string" ? { value: o, label: o } : o;
|
|
1006
1230
|
function ComboBox({
|
|
1007
1231
|
label,
|
|
@@ -1028,7 +1252,7 @@ function ComboBox({
|
|
|
1028
1252
|
const items = options.map(norm2);
|
|
1029
1253
|
const collection = isFilteredExternally ? { items } : { defaultItems: items };
|
|
1030
1254
|
const showsStatus = isLoading || isFilteredExternally && items.length === 0 && emptyLabel != null;
|
|
1031
|
-
return /* @__PURE__ */ (0,
|
|
1255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1032
1256
|
import_react_aria_components15.ComboBox,
|
|
1033
1257
|
{
|
|
1034
1258
|
className: cx("pire-field", className),
|
|
@@ -1047,11 +1271,11 @@ function ComboBox({
|
|
|
1047
1271
|
validationBehavior: "aria",
|
|
1048
1272
|
...rest,
|
|
1049
1273
|
children: [
|
|
1050
|
-
label ? /* @__PURE__ */ (0,
|
|
1274
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_aria_components15.Label, { className: "pire-field-label", children: [
|
|
1051
1275
|
label,
|
|
1052
|
-
rest.isRequired ? /* @__PURE__ */ (0,
|
|
1276
|
+
rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
1053
1277
|
] }) : null,
|
|
1054
|
-
/* @__PURE__ */ (0,
|
|
1278
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1055
1279
|
import_react_aria_components15.Group,
|
|
1056
1280
|
{
|
|
1057
1281
|
className: "pire-control",
|
|
@@ -1059,15 +1283,15 @@ function ComboBox({
|
|
|
1059
1283
|
"data-full-width": String(fullWidth),
|
|
1060
1284
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
1061
1285
|
children: [
|
|
1062
|
-
/* @__PURE__ */ (0,
|
|
1063
|
-
/* @__PURE__ */ (0,
|
|
1064
|
-
/* @__PURE__ */ (0,
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
|
|
1287
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.Input, { className: "pire-input", placeholder: rest.placeholder }),
|
|
1288
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.Button, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "chevron-down", size: 16 }) })
|
|
1065
1289
|
]
|
|
1066
1290
|
}
|
|
1067
1291
|
),
|
|
1068
|
-
description ? /* @__PURE__ */ (0,
|
|
1069
|
-
/* @__PURE__ */ (0,
|
|
1070
|
-
/* @__PURE__ */ (0,
|
|
1292
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1293
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.FieldError, { className: "pire-field-error", children: errorMessage }),
|
|
1294
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1071
1295
|
import_react_aria_components15.ListBox,
|
|
1072
1296
|
{
|
|
1073
1297
|
className: "pire-listbox",
|
|
@@ -1075,10 +1299,10 @@ function ComboBox({
|
|
|
1075
1299
|
const el = e.currentTarget;
|
|
1076
1300
|
if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
|
|
1077
1301
|
} : void 0,
|
|
1078
|
-
renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0,
|
|
1079
|
-
children: (item) => /* @__PURE__ */ (0,
|
|
1080
|
-
/* @__PURE__ */ (0,
|
|
1081
|
-
item.secondary ? /* @__PURE__ */ (0,
|
|
1302
|
+
renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
|
|
1303
|
+
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_aria_components15.ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
|
|
1304
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-option-label", children: item.label }),
|
|
1305
|
+
item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
|
|
1082
1306
|
] })
|
|
1083
1307
|
}
|
|
1084
1308
|
) })
|
|
@@ -1088,9 +1312,9 @@ function ComboBox({
|
|
|
1088
1312
|
}
|
|
1089
1313
|
|
|
1090
1314
|
// src/components/forms/MultiComboBox.tsx
|
|
1091
|
-
var
|
|
1315
|
+
var React8 = __toESM(require("react"), 1);
|
|
1092
1316
|
var import_react_aria_components16 = require("react-aria-components");
|
|
1093
|
-
var
|
|
1317
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1094
1318
|
var norm3 = (o) => typeof o === "string" ? { value: o, label: o } : o;
|
|
1095
1319
|
function MultiComboBox({
|
|
1096
1320
|
label,
|
|
@@ -1114,15 +1338,15 @@ function MultiComboBox({
|
|
|
1114
1338
|
...rest
|
|
1115
1339
|
}) {
|
|
1116
1340
|
const msg = usePireMessages();
|
|
1117
|
-
const items =
|
|
1341
|
+
const items = React8.useMemo(() => options.map(norm3), [options]);
|
|
1118
1342
|
const collection = isFilteredExternally ? { items } : { defaultItems: items };
|
|
1119
1343
|
const showsStatus = isLoading || isFilteredExternally && items.length === 0 && emptyLabel != null;
|
|
1120
|
-
const [uncontrolled, setUncontrolled] =
|
|
1121
|
-
const [announcement, setAnnouncement] =
|
|
1122
|
-
const inputRef =
|
|
1344
|
+
const [uncontrolled, setUncontrolled] = React8.useState(defaultValue ?? []);
|
|
1345
|
+
const [announcement, setAnnouncement] = React8.useState("");
|
|
1346
|
+
const inputRef = React8.useRef(null);
|
|
1123
1347
|
const raw = value ?? uncontrolled;
|
|
1124
1348
|
const contentKey = raw.join("\0");
|
|
1125
|
-
const values =
|
|
1349
|
+
const values = React8.useMemo(() => raw, [contentKey]);
|
|
1126
1350
|
const labelOf = (v) => items.find((o) => o.value === v)?.label ?? v;
|
|
1127
1351
|
const isEditable = !rest.isDisabled && !rest.isReadOnly;
|
|
1128
1352
|
const commit = (next) => {
|
|
@@ -1155,7 +1379,7 @@ function MultiComboBox({
|
|
|
1155
1379
|
e.stopPropagation();
|
|
1156
1380
|
if (!values.includes(next)) commit([...values, next]);
|
|
1157
1381
|
};
|
|
1158
|
-
return /* @__PURE__ */ (0,
|
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1159
1383
|
import_react_aria_components16.ComboBox,
|
|
1160
1384
|
{
|
|
1161
1385
|
className: cx("pire-field", className),
|
|
@@ -1172,11 +1396,11 @@ function MultiComboBox({
|
|
|
1172
1396
|
validationBehavior: "aria",
|
|
1173
1397
|
...rest,
|
|
1174
1398
|
children: [
|
|
1175
|
-
label ? /* @__PURE__ */ (0,
|
|
1399
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components16.Label, { className: "pire-field-label", children: [
|
|
1176
1400
|
label,
|
|
1177
|
-
rest.isRequired ? /* @__PURE__ */ (0,
|
|
1401
|
+
rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
1178
1402
|
] }) : null,
|
|
1179
|
-
/* @__PURE__ */ (0,
|
|
1403
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1180
1404
|
import_react_aria_components16.Group,
|
|
1181
1405
|
{
|
|
1182
1406
|
className: "pire-control",
|
|
@@ -1186,14 +1410,14 @@ function MultiComboBox({
|
|
|
1186
1410
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
1187
1411
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
1188
1412
|
children: [
|
|
1189
|
-
/* @__PURE__ */ (0,
|
|
1190
|
-
/* @__PURE__ */ (0,
|
|
1191
|
-
/* @__PURE__ */ (0,
|
|
1413
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
|
|
1414
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "pire-chipfield", children: [
|
|
1415
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.ButtonContext.Provider, { value: null, children: values.map((v) => (
|
|
1192
1416
|
/* Disabled follows the field, not `isEditable`: a read-only field's chips are
|
|
1193
1417
|
real, current values and should read as such — they simply lose the × . */
|
|
1194
|
-
/* @__PURE__ */ (0,
|
|
1418
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Tag, { isDisabled: rest.isDisabled, onRemove: isEditable ? () => remove(v) : void 0, children: labelOf(v) }, v)
|
|
1195
1419
|
)) }),
|
|
1196
|
-
/* @__PURE__ */ (0,
|
|
1420
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1197
1421
|
import_react_aria_components16.Input,
|
|
1198
1422
|
{
|
|
1199
1423
|
ref: inputRef,
|
|
@@ -1203,14 +1427,14 @@ function MultiComboBox({
|
|
|
1203
1427
|
}
|
|
1204
1428
|
)
|
|
1205
1429
|
] }),
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1430
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Button, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "chevron-down", size: 16 }) })
|
|
1207
1431
|
]
|
|
1208
1432
|
}
|
|
1209
1433
|
),
|
|
1210
|
-
/* @__PURE__ */ (0,
|
|
1211
|
-
description ? /* @__PURE__ */ (0,
|
|
1212
|
-
/* @__PURE__ */ (0,
|
|
1213
|
-
/* @__PURE__ */ (0,
|
|
1434
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-live": "polite", children: announcement }) }),
|
|
1435
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1436
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.FieldError, { className: "pire-field-error", children: errorMessage }),
|
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1214
1438
|
import_react_aria_components16.ListBox,
|
|
1215
1439
|
{
|
|
1216
1440
|
className: "pire-listbox",
|
|
@@ -1218,10 +1442,10 @@ function MultiComboBox({
|
|
|
1218
1442
|
const el = e.currentTarget;
|
|
1219
1443
|
if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
|
|
1220
1444
|
} : void 0,
|
|
1221
|
-
renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0,
|
|
1222
|
-
children: (item) => /* @__PURE__ */ (0,
|
|
1223
|
-
/* @__PURE__ */ (0,
|
|
1224
|
-
item.secondary ? /* @__PURE__ */ (0,
|
|
1445
|
+
renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
|
|
1446
|
+
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components16.ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-option-label", children: item.label }),
|
|
1448
|
+
item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
|
|
1225
1449
|
] })
|
|
1226
1450
|
}
|
|
1227
1451
|
) })
|
|
@@ -1232,7 +1456,7 @@ function MultiComboBox({
|
|
|
1232
1456
|
|
|
1233
1457
|
// src/components/forms/NumberField.tsx
|
|
1234
1458
|
var import_react_aria_components17 = require("react-aria-components");
|
|
1235
|
-
var
|
|
1459
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1236
1460
|
function NumberField({
|
|
1237
1461
|
label,
|
|
1238
1462
|
suffix,
|
|
@@ -1246,12 +1470,12 @@ function NumberField({
|
|
|
1246
1470
|
...rest
|
|
1247
1471
|
}) {
|
|
1248
1472
|
const msg = usePireMessages();
|
|
1249
|
-
return /* @__PURE__ */ (0,
|
|
1250
|
-
label ? /* @__PURE__ */ (0,
|
|
1473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_aria_components17.NumberField, { className: cx("pire-field", className), style, validationBehavior: "aria", ...rest, children: [
|
|
1474
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_aria_components17.Label, { className: "pire-field-label", children: [
|
|
1251
1475
|
label,
|
|
1252
|
-
rest.isRequired ? /* @__PURE__ */ (0,
|
|
1476
|
+
rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
1253
1477
|
] }) : null,
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1478
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1255
1479
|
import_react_aria_components17.Group,
|
|
1256
1480
|
{
|
|
1257
1481
|
className: "pire-control",
|
|
@@ -1260,23 +1484,23 @@ function NumberField({
|
|
|
1260
1484
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
1261
1485
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
1262
1486
|
children: [
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1264
|
-
suffix ? /* @__PURE__ */ (0,
|
|
1265
|
-
hideStepper ? null : /* @__PURE__ */ (0,
|
|
1266
|
-
/* @__PURE__ */ (0,
|
|
1267
|
-
/* @__PURE__ */ (0,
|
|
1487
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.Input, { className: "pire-input", "data-numeric": "true" }),
|
|
1488
|
+
suffix ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-affix", children: suffix }) : null,
|
|
1489
|
+
hideStepper ? null : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "pire-stepper", children: [
|
|
1490
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.Button, { slot: "increment", className: "pire-stepper-btn", "aria-label": msg.numberFieldIncrease, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "plus", size: 10 }) }),
|
|
1491
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.Button, { slot: "decrement", className: "pire-stepper-btn", "aria-label": msg.numberFieldDecrease, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "minus", size: 10 }) })
|
|
1268
1492
|
] })
|
|
1269
1493
|
]
|
|
1270
1494
|
}
|
|
1271
1495
|
),
|
|
1272
|
-
description ? /* @__PURE__ */ (0,
|
|
1273
|
-
/* @__PURE__ */ (0,
|
|
1496
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.FieldError, { className: "pire-field-error", children: errorMessage })
|
|
1274
1498
|
] });
|
|
1275
1499
|
}
|
|
1276
1500
|
|
|
1277
1501
|
// src/components/forms/DatePicker.tsx
|
|
1278
1502
|
var import_react_aria_components18 = require("react-aria-components");
|
|
1279
|
-
var
|
|
1503
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1280
1504
|
function DatePicker({
|
|
1281
1505
|
label,
|
|
1282
1506
|
description,
|
|
@@ -1288,12 +1512,12 @@ function DatePicker({
|
|
|
1288
1512
|
...rest
|
|
1289
1513
|
}) {
|
|
1290
1514
|
const msg = usePireMessages();
|
|
1291
|
-
return /* @__PURE__ */ (0,
|
|
1292
|
-
label ? /* @__PURE__ */ (0,
|
|
1515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_aria_components18.DatePicker, { className: cx("pire-field", className), style, validationBehavior: "aria", ...rest, children: [
|
|
1516
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_aria_components18.Label, { className: "pire-field-label", children: [
|
|
1293
1517
|
label,
|
|
1294
|
-
rest.isRequired ? /* @__PURE__ */ (0,
|
|
1518
|
+
rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
1295
1519
|
] }) : null,
|
|
1296
|
-
/* @__PURE__ */ (0,
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1297
1521
|
import_react_aria_components18.Group,
|
|
1298
1522
|
{
|
|
1299
1523
|
className: "pire-control",
|
|
@@ -1302,22 +1526,22 @@ function DatePicker({
|
|
|
1302
1526
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
1303
1527
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
1304
1528
|
children: [
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1306
|
-
/* @__PURE__ */ (0,
|
|
1529
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.DateSegment, { segment, className: "pire-datesegment" }) }),
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Button, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerOpenCalendar, style: { width: 24, height: 24 }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "calendar", size: 16 }) })
|
|
1307
1531
|
]
|
|
1308
1532
|
}
|
|
1309
1533
|
),
|
|
1310
|
-
description ? /* @__PURE__ */ (0,
|
|
1311
|
-
/* @__PURE__ */ (0,
|
|
1312
|
-
/* @__PURE__ */ (0,
|
|
1313
|
-
/* @__PURE__ */ (0,
|
|
1314
|
-
/* @__PURE__ */ (0,
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1534
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1535
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.FieldError, { className: "pire-field-error", children: errorMessage }),
|
|
1536
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Dialog, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_aria_components18.Calendar, { className: "pire-calendar", children: [
|
|
1537
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("header", { className: "pire-calendar-head", children: [
|
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Button, { slot: "previous", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerPreviousMonth, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "chevron-left", size: 16 }) }),
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Heading, { className: "pire-calendar-title" }),
|
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Button, { slot: "next", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerNextMonth, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "chevron-right", size: 16 }) })
|
|
1317
1541
|
] }),
|
|
1318
|
-
/* @__PURE__ */ (0,
|
|
1319
|
-
/* @__PURE__ */ (0,
|
|
1320
|
-
/* @__PURE__ */ (0,
|
|
1542
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_aria_components18.CalendarGrid, { className: "pire-calendar-grid", children: [
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.CalendarGridHeader, { children: (day) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.CalendarHeaderCell, { children: day }) }),
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.CalendarGridBody, { children: (date) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.CalendarCell, { date, className: "pire-calendar-cell" }) })
|
|
1321
1545
|
] })
|
|
1322
1546
|
] }) }) })
|
|
1323
1547
|
] });
|
|
@@ -1325,7 +1549,7 @@ function DatePicker({
|
|
|
1325
1549
|
|
|
1326
1550
|
// src/components/forms/DateRangePicker.tsx
|
|
1327
1551
|
var import_react_aria_components19 = require("react-aria-components");
|
|
1328
|
-
var
|
|
1552
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1329
1553
|
function rangeLengthInDays(range) {
|
|
1330
1554
|
return range.end.toDate("UTC").getTime() / 864e5 - range.start.toDate("UTC").getTime() / 864e5 + 1;
|
|
1331
1555
|
}
|
|
@@ -1346,7 +1570,7 @@ function DateRangePicker({
|
|
|
1346
1570
|
const msg = usePireMessages();
|
|
1347
1571
|
const current = rest.value ?? rest.defaultValue ?? null;
|
|
1348
1572
|
const tooLong = maxRangeDays != null && current != null && rangeLengthInDays(current) > maxRangeDays;
|
|
1349
|
-
return /* @__PURE__ */ (0,
|
|
1573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1350
1574
|
import_react_aria_components19.DateRangePicker,
|
|
1351
1575
|
{
|
|
1352
1576
|
className: cx("pire-field", className),
|
|
@@ -1357,11 +1581,11 @@ function DateRangePicker({
|
|
|
1357
1581
|
...rest,
|
|
1358
1582
|
isInvalid: rest.isInvalid || tooLong,
|
|
1359
1583
|
children: [
|
|
1360
|
-
label ? /* @__PURE__ */ (0,
|
|
1584
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_aria_components19.Label, { className: "pire-field-label", children: [
|
|
1361
1585
|
label,
|
|
1362
|
-
rest.isRequired ? /* @__PURE__ */ (0,
|
|
1586
|
+
rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
1363
1587
|
] }) : null,
|
|
1364
|
-
/* @__PURE__ */ (0,
|
|
1588
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1365
1589
|
import_react_aria_components19.Group,
|
|
1366
1590
|
{
|
|
1367
1591
|
className: "pire-control pire-daterange-control",
|
|
@@ -1370,29 +1594,29 @@ function DateRangePicker({
|
|
|
1370
1594
|
"data-invalid": rest.isInvalid || tooLong ? "true" : void 0,
|
|
1371
1595
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
1372
1596
|
children: [
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1375
|
-
/* @__PURE__ */ (0,
|
|
1376
|
-
/* @__PURE__ */ (0,
|
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.DateInput, { slot: "start", className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.DateSegment, { segment, className: "pire-datesegment" }) }),
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { "aria-hidden": "true", className: "pire-daterange-dash", children: "\u2013" }),
|
|
1599
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.DateInput, { slot: "end", className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.DateSegment, { segment, className: "pire-datesegment" }) }),
|
|
1600
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1377
1601
|
import_react_aria_components19.Button,
|
|
1378
1602
|
{
|
|
1379
1603
|
className: "pire-iconbtn",
|
|
1380
1604
|
"data-size": "sm",
|
|
1381
1605
|
"aria-label": msg.datePickerOpenCalendar,
|
|
1382
1606
|
style: { width: 24, height: 24 },
|
|
1383
|
-
children: /* @__PURE__ */ (0,
|
|
1607
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "calendar", size: 16 })
|
|
1384
1608
|
}
|
|
1385
1609
|
)
|
|
1386
1610
|
]
|
|
1387
1611
|
}
|
|
1388
1612
|
),
|
|
1389
|
-
description ? /* @__PURE__ */ (0,
|
|
1390
|
-
/* @__PURE__ */ (0,
|
|
1391
|
-
/* @__PURE__ */ (0,
|
|
1613
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.FieldError, { className: "pire-field-error", children: errorMessage }),
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_aria_components19.Dialog, { className: "pire-daterange-dialog", children: [
|
|
1392
1616
|
presets?.length ? (
|
|
1393
1617
|
// Before the calendar in the DOM, so keyboard users reach the shortcut without
|
|
1394
1618
|
// arrowing through a month first.
|
|
1395
|
-
/* @__PURE__ */ (0,
|
|
1619
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "pire-daterange-presets", role: "group", "aria-label": msg.dateRangePresetsLabel, children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1396
1620
|
import_react_aria_components19.Button,
|
|
1397
1621
|
{
|
|
1398
1622
|
className: "pire-daterange-preset",
|
|
@@ -1402,33 +1626,33 @@ function DateRangePicker({
|
|
|
1402
1626
|
preset.id
|
|
1403
1627
|
)) })
|
|
1404
1628
|
) : null,
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1406
|
-
/* @__PURE__ */ (0,
|
|
1407
|
-
/* @__PURE__ */ (0,
|
|
1629
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_aria_components19.RangeCalendar, { className: "pire-calendar", children: [
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("header", { className: "pire-calendar-head", children: [
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1408
1632
|
import_react_aria_components19.Button,
|
|
1409
1633
|
{
|
|
1410
1634
|
slot: "previous",
|
|
1411
1635
|
className: "pire-iconbtn",
|
|
1412
1636
|
"data-size": "sm",
|
|
1413
1637
|
"aria-label": msg.datePickerPreviousMonth,
|
|
1414
|
-
children: /* @__PURE__ */ (0,
|
|
1638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "chevron-left", size: 16 })
|
|
1415
1639
|
}
|
|
1416
1640
|
),
|
|
1417
|
-
/* @__PURE__ */ (0,
|
|
1418
|
-
/* @__PURE__ */ (0,
|
|
1641
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.Heading, { className: "pire-calendar-title" }),
|
|
1642
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1419
1643
|
import_react_aria_components19.Button,
|
|
1420
1644
|
{
|
|
1421
1645
|
slot: "next",
|
|
1422
1646
|
className: "pire-iconbtn",
|
|
1423
1647
|
"data-size": "sm",
|
|
1424
1648
|
"aria-label": msg.datePickerNextMonth,
|
|
1425
|
-
children: /* @__PURE__ */ (0,
|
|
1649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "chevron-right", size: 16 })
|
|
1426
1650
|
}
|
|
1427
1651
|
)
|
|
1428
1652
|
] }),
|
|
1429
|
-
/* @__PURE__ */ (0,
|
|
1430
|
-
/* @__PURE__ */ (0,
|
|
1431
|
-
/* @__PURE__ */ (0,
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_aria_components19.CalendarGrid, { className: "pire-calendar-grid", children: [
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.CalendarGridHeader, { children: (day) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.CalendarHeaderCell, { children: day }) }),
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.CalendarGridBody, { children: (date) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.CalendarCell, { date, className: "pire-calendar-cell" }) })
|
|
1432
1656
|
] })
|
|
1433
1657
|
] })
|
|
1434
1658
|
] }) })
|
|
@@ -1438,14 +1662,14 @@ function DateRangePicker({
|
|
|
1438
1662
|
}
|
|
1439
1663
|
|
|
1440
1664
|
// src/components/forms/ValueHelpField.tsx
|
|
1441
|
-
var
|
|
1665
|
+
var React10 = __toESM(require("react"), 1);
|
|
1442
1666
|
|
|
1443
1667
|
// src/components/patterns/ValueHelpDialog.tsx
|
|
1444
|
-
var
|
|
1668
|
+
var React9 = __toESM(require("react"), 1);
|
|
1445
1669
|
|
|
1446
1670
|
// src/components/feedback/Dialog.tsx
|
|
1447
1671
|
var import_react_aria_components20 = require("react-aria-components");
|
|
1448
|
-
var
|
|
1672
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1449
1673
|
function Dialog({
|
|
1450
1674
|
isOpen,
|
|
1451
1675
|
onOpenChange,
|
|
@@ -1465,7 +1689,7 @@ function Dialog({
|
|
|
1465
1689
|
onClose?.();
|
|
1466
1690
|
onOpenChange?.(false);
|
|
1467
1691
|
};
|
|
1468
|
-
return /* @__PURE__ */ (0,
|
|
1692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1469
1693
|
import_react_aria_components20.ModalOverlay,
|
|
1470
1694
|
{
|
|
1471
1695
|
className: "pire-modal-overlay",
|
|
@@ -1474,16 +1698,16 @@ function Dialog({
|
|
|
1474
1698
|
onOpenChange: (o) => {
|
|
1475
1699
|
if (!o) close();
|
|
1476
1700
|
},
|
|
1477
|
-
children: /* @__PURE__ */ (0,
|
|
1478
|
-
title ? /* @__PURE__ */ (0,
|
|
1479
|
-
/* @__PURE__ */ (0,
|
|
1480
|
-
/* @__PURE__ */ (0,
|
|
1481
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
1701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.Modal, { className: cx("pire-modal", className), "data-size": size, style, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_aria_components20.Dialog, { className: "pire-dialog", children: [
|
|
1702
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("header", { className: "pire-dialog-head", children: [
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1704
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.Heading, { slot: "title", className: "pire-dialog-title", children: title }),
|
|
1705
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
|
|
1482
1706
|
] }),
|
|
1483
|
-
showClose ? /* @__PURE__ */ (0,
|
|
1707
|
+
showClose ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconButton, { icon: "x", label: msg.dialogClose, size: "sm", onPress: close }) : null
|
|
1484
1708
|
] }) : null,
|
|
1485
|
-
children ? /* @__PURE__ */ (0,
|
|
1486
|
-
footer ? /* @__PURE__ */ (0,
|
|
1709
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pire-dialog-body", children }) : null,
|
|
1710
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("footer", { className: "pire-dialog-foot", children: footer }) : null
|
|
1487
1711
|
] }) })
|
|
1488
1712
|
}
|
|
1489
1713
|
);
|
|
@@ -1493,9 +1717,9 @@ function Dialog({
|
|
|
1493
1717
|
var import_react_aria_components21 = require("react-aria-components");
|
|
1494
1718
|
|
|
1495
1719
|
// src/components/feedback/Skeleton.tsx
|
|
1496
|
-
var
|
|
1720
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1497
1721
|
function Skeleton({ shape = "text", width, height, className, style, ...rest }) {
|
|
1498
|
-
return /* @__PURE__ */ (0,
|
|
1722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1499
1723
|
"div",
|
|
1500
1724
|
{
|
|
1501
1725
|
className: cx("pire-skeleton", className),
|
|
@@ -1509,7 +1733,7 @@ function Skeleton({ shape = "text", width, height, className, style, ...rest })
|
|
|
1509
1733
|
var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
|
|
1510
1734
|
function SkeletonTableRow({ columns, density = "regular", className, style, ...rest }) {
|
|
1511
1735
|
const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
|
|
1512
|
-
return /* @__PURE__ */ (0,
|
|
1736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1513
1737
|
"div",
|
|
1514
1738
|
{
|
|
1515
1739
|
className: cx("pire-skeleton-row", className),
|
|
@@ -1521,13 +1745,13 @@ function SkeletonTableRow({ columns, density = "regular", className, style, ...r
|
|
|
1521
1745
|
const align = c.numeric ? "right" : c.align ?? "left";
|
|
1522
1746
|
return (
|
|
1523
1747
|
// biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.
|
|
1524
|
-
/* @__PURE__ */ (0,
|
|
1748
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1525
1749
|
"div",
|
|
1526
1750
|
{
|
|
1527
1751
|
className: "pire-skeleton-cell",
|
|
1528
1752
|
"data-align": align,
|
|
1529
1753
|
style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
|
|
1530
|
-
children: /* @__PURE__ */ (0,
|
|
1754
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
|
|
1531
1755
|
},
|
|
1532
1756
|
i
|
|
1533
1757
|
)
|
|
@@ -1538,7 +1762,7 @@ function SkeletonTableRow({ columns, density = "regular", className, style, ...r
|
|
|
1538
1762
|
}
|
|
1539
1763
|
|
|
1540
1764
|
// src/components/data/DataTable.tsx
|
|
1541
|
-
var
|
|
1765
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1542
1766
|
function DataTable({
|
|
1543
1767
|
columns,
|
|
1544
1768
|
rows,
|
|
@@ -1570,14 +1794,14 @@ function DataTable({
|
|
|
1570
1794
|
...columns.map((c) => ({ width: c.width, align: c.align, numeric: c.numeric }))
|
|
1571
1795
|
];
|
|
1572
1796
|
const body = isLoading ? [] : rows;
|
|
1573
|
-
return /* @__PURE__ */ (0,
|
|
1797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1574
1798
|
"div",
|
|
1575
1799
|
{
|
|
1576
1800
|
className: cx("pire-table-wrap", className),
|
|
1577
1801
|
style,
|
|
1578
1802
|
"data-loading": isLoading ? "true" : void 0,
|
|
1579
1803
|
"aria-busy": isLoading ? "true" : void 0,
|
|
1580
|
-
children: /* @__PURE__ */ (0,
|
|
1804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1581
1805
|
import_react_aria_components21.Table,
|
|
1582
1806
|
{
|
|
1583
1807
|
className: "pire-table",
|
|
@@ -1594,9 +1818,9 @@ function DataTable({
|
|
|
1594
1818
|
if (row) onRowAction(row);
|
|
1595
1819
|
} : void 0,
|
|
1596
1820
|
children: [
|
|
1597
|
-
/* @__PURE__ */ (0,
|
|
1598
|
-
selectable ? /* @__PURE__ */ (0,
|
|
1599
|
-
columns.map((c, i) => /* @__PURE__ */ (0,
|
|
1821
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_aria_components21.TableHeader, { className: "pire-thead-row", children: [
|
|
1822
|
+
selectable ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components21.Column, { className: "pire-th", width: 44, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectAll }) }) : null,
|
|
1823
|
+
columns.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1600
1824
|
import_react_aria_components21.Column,
|
|
1601
1825
|
{
|
|
1602
1826
|
id: c.key,
|
|
@@ -1606,9 +1830,9 @@ function DataTable({
|
|
|
1606
1830
|
width: c.width,
|
|
1607
1831
|
"data-align": c.numeric || c.align === "right" ? "right" : c.align,
|
|
1608
1832
|
"data-allows-sorting": c.sortable ? "true" : void 0,
|
|
1609
|
-
children: /* @__PURE__ */ (0,
|
|
1833
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "pire-th-inner", children: [
|
|
1610
1834
|
c.label,
|
|
1611
|
-
c.sortable ? /* @__PURE__ */ (0,
|
|
1835
|
+
c.sortable ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1612
1836
|
Icon,
|
|
1613
1837
|
{
|
|
1614
1838
|
size: 12,
|
|
@@ -1621,15 +1845,15 @@ function DataTable({
|
|
|
1621
1845
|
c.key
|
|
1622
1846
|
))
|
|
1623
1847
|
] }),
|
|
1624
|
-
/* @__PURE__ */ (0,
|
|
1625
|
-
/* @__PURE__ */ (0,
|
|
1848
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components21.TableBody, { renderEmptyState: () => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
|
|
1849
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
|
|
1626
1850
|
Array.from({ length: skeletonRows }, (_, i) => (
|
|
1627
1851
|
// biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
|
|
1628
|
-
/* @__PURE__ */ (0,
|
|
1852
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonTableRow, { columns: skeletonColumns, density }, i)
|
|
1629
1853
|
))
|
|
1630
|
-
] }) : /* @__PURE__ */ (0,
|
|
1631
|
-
selectable ? /* @__PURE__ */ (0,
|
|
1632
|
-
columns.map((c) => /* @__PURE__ */ (0,
|
|
1854
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "pire-table-empty", children: emptyLabel }), children: body.map((row) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_aria_components21.Row, { id: row.id, className: "pire-tr", "data-pressable": onRowAction ? "true" : void 0, children: [
|
|
1855
|
+
selectable ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components21.Cell, { className: "pire-td", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
|
|
1856
|
+
columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1633
1857
|
import_react_aria_components21.Cell,
|
|
1634
1858
|
{
|
|
1635
1859
|
className: "pire-td",
|
|
@@ -1648,69 +1872,83 @@ function DataTable({
|
|
|
1648
1872
|
}
|
|
1649
1873
|
|
|
1650
1874
|
// src/components/patterns/ValueHelpDialog.tsx
|
|
1651
|
-
var
|
|
1875
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1652
1876
|
function ValueHelpDialog({
|
|
1653
1877
|
isOpen,
|
|
1654
|
-
title
|
|
1878
|
+
title,
|
|
1655
1879
|
columns = [],
|
|
1656
1880
|
rows = [],
|
|
1657
|
-
searchPlaceholder
|
|
1881
|
+
searchPlaceholder,
|
|
1658
1882
|
emptyLabel,
|
|
1883
|
+
onSearch,
|
|
1884
|
+
isFilteredExternally,
|
|
1885
|
+
isLoading,
|
|
1886
|
+
onLoadMore,
|
|
1659
1887
|
onSelect,
|
|
1660
1888
|
onClose
|
|
1661
1889
|
}) {
|
|
1662
1890
|
const msg = usePireMessages();
|
|
1663
|
-
const [query, setQuery] =
|
|
1664
|
-
|
|
1891
|
+
const [query, setQuery] = React9.useState("");
|
|
1892
|
+
React9.useEffect(() => {
|
|
1665
1893
|
if (isOpen) setQuery("");
|
|
1666
1894
|
}, [isOpen]);
|
|
1667
|
-
const filtered =
|
|
1895
|
+
const filtered = React9.useMemo(() => {
|
|
1896
|
+
if (isFilteredExternally) return rows;
|
|
1668
1897
|
const q = query.trim().toLowerCase();
|
|
1669
1898
|
if (!q) return rows;
|
|
1670
1899
|
return rows.filter((row) => Object.values(row).some((v) => String(v).toLowerCase().includes(q)));
|
|
1671
|
-
}, [rows, query]);
|
|
1672
|
-
|
|
1900
|
+
}, [rows, query, isFilteredExternally]);
|
|
1901
|
+
const handleSearch = (value) => {
|
|
1902
|
+
setQuery(value);
|
|
1903
|
+
onSearch?.(value);
|
|
1904
|
+
};
|
|
1905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1673
1906
|
Dialog,
|
|
1674
1907
|
{
|
|
1675
1908
|
isOpen,
|
|
1676
1909
|
size: "lg",
|
|
1677
|
-
title,
|
|
1910
|
+
title: title ?? msg.valueHelpDialogTitle,
|
|
1678
1911
|
onClose,
|
|
1679
|
-
footer: /* @__PURE__ */ (0,
|
|
1680
|
-
children: /* @__PURE__ */ (0,
|
|
1681
|
-
/* @__PURE__ */ (0,
|
|
1912
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
|
|
1913
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1682
1915
|
Input,
|
|
1683
1916
|
{
|
|
1684
1917
|
"aria-label": msg.valueHelpDialogSearch,
|
|
1685
1918
|
icon: "search",
|
|
1686
1919
|
type: "search",
|
|
1687
1920
|
value: query,
|
|
1688
|
-
onChange:
|
|
1689
|
-
|
|
1921
|
+
onChange: handleSearch,
|
|
1922
|
+
isClearable: true,
|
|
1923
|
+
placeholder: searchPlaceholder ?? msg.valueHelpDialogSearchPlaceholder,
|
|
1690
1924
|
autoFocus: true
|
|
1691
1925
|
}
|
|
1692
1926
|
),
|
|
1693
|
-
/* @__PURE__ */ (0,
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { onScroll: onLoadMore ? (event) => {
|
|
1928
|
+
const el = event.currentTarget;
|
|
1929
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
|
|
1930
|
+
} : void 0, style: { overflow: "auto", maxHeight: "48vh" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1694
1931
|
DataTable,
|
|
1695
1932
|
{
|
|
1696
|
-
"aria-label": typeof title === "string" ? title :
|
|
1933
|
+
"aria-label": typeof title === "string" ? title : msg.valueHelpDialogTitle,
|
|
1697
1934
|
density: "condensed",
|
|
1698
1935
|
columns,
|
|
1699
1936
|
rows: filtered,
|
|
1700
|
-
|
|
1937
|
+
isLoading,
|
|
1938
|
+
emptyLabel: emptyLabel ?? msg.valueHelpDialogEmpty,
|
|
1701
1939
|
onRowAction: (row) => {
|
|
1702
1940
|
onSelect?.(row);
|
|
1703
1941
|
onClose?.();
|
|
1704
1942
|
}
|
|
1705
1943
|
}
|
|
1706
|
-
)
|
|
1944
|
+
) })
|
|
1707
1945
|
] })
|
|
1708
1946
|
}
|
|
1709
1947
|
);
|
|
1710
1948
|
}
|
|
1711
1949
|
|
|
1712
1950
|
// src/components/forms/ValueHelpField.tsx
|
|
1713
|
-
var
|
|
1951
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1714
1952
|
var defaultFormat = (row) => [row.id, row.name ?? row.label ?? row.text].filter(Boolean).join(" \u2014 ");
|
|
1715
1953
|
function ValueHelpField({
|
|
1716
1954
|
label,
|
|
@@ -1720,7 +1958,12 @@ function ValueHelpField({
|
|
|
1720
1958
|
rows = [],
|
|
1721
1959
|
columns = [],
|
|
1722
1960
|
dialogTitle,
|
|
1723
|
-
|
|
1961
|
+
onSearch,
|
|
1962
|
+
isFilteredExternally,
|
|
1963
|
+
isLoading,
|
|
1964
|
+
onLoadMore,
|
|
1965
|
+
emptyLabel,
|
|
1966
|
+
placeholder,
|
|
1724
1967
|
description,
|
|
1725
1968
|
errorMessage,
|
|
1726
1969
|
isInvalid,
|
|
@@ -1731,52 +1974,55 @@ function ValueHelpField({
|
|
|
1731
1974
|
style
|
|
1732
1975
|
}) {
|
|
1733
1976
|
const msg = usePireMessages();
|
|
1734
|
-
const [open, setOpen] =
|
|
1735
|
-
return /* @__PURE__ */ (0,
|
|
1736
|
-
/* @__PURE__ */ (0,
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
] }),
|
|
1772
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1977
|
+
const [open, setOpen] = React10.useState(false);
|
|
1978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cx(className), style, children: [
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1980
|
+
Input,
|
|
1981
|
+
{
|
|
1982
|
+
label,
|
|
1983
|
+
isReadOnly: true,
|
|
1984
|
+
isInvalid,
|
|
1985
|
+
isDisabled,
|
|
1986
|
+
isRequired,
|
|
1987
|
+
value: value ? format(value) : "",
|
|
1988
|
+
placeholder: placeholder ?? msg.valueHelpFieldPlaceholder,
|
|
1989
|
+
description,
|
|
1990
|
+
errorMessage,
|
|
1991
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "pire-valuehelp-actions", children: [
|
|
1992
|
+
allowsClear && value ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1993
|
+
IconButton,
|
|
1994
|
+
{
|
|
1995
|
+
icon: "x",
|
|
1996
|
+
label: msg.valueHelpFieldClear,
|
|
1997
|
+
isDisabled,
|
|
1998
|
+
onPress: () => onChange?.(null)
|
|
1999
|
+
}
|
|
2000
|
+
) : null,
|
|
2001
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2002
|
+
IconButton,
|
|
2003
|
+
{
|
|
2004
|
+
icon: "search",
|
|
2005
|
+
label: typeof label === "string" ? msg.valueHelpFieldOpenNamed.replace("{label}", label.toLowerCase()) : msg.valueHelpFieldOpen,
|
|
2006
|
+
isDisabled,
|
|
2007
|
+
onPress: () => setOpen(true)
|
|
2008
|
+
}
|
|
2009
|
+
)
|
|
2010
|
+
] })
|
|
2011
|
+
}
|
|
2012
|
+
),
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1773
2014
|
ValueHelpDialog,
|
|
1774
2015
|
{
|
|
1775
2016
|
isOpen: open,
|
|
1776
2017
|
onClose: () => setOpen(false),
|
|
1777
|
-
title: dialogTitle ?? label
|
|
2018
|
+
title: dialogTitle ?? label,
|
|
1778
2019
|
columns,
|
|
1779
2020
|
rows,
|
|
2021
|
+
onSearch,
|
|
2022
|
+
isFilteredExternally,
|
|
2023
|
+
isLoading,
|
|
2024
|
+
onLoadMore,
|
|
2025
|
+
emptyLabel,
|
|
1780
2026
|
onSelect: (row) => onChange?.(row)
|
|
1781
2027
|
}
|
|
1782
2028
|
)
|
|
@@ -1784,12 +2030,12 @@ function ValueHelpField({
|
|
|
1784
2030
|
}
|
|
1785
2031
|
|
|
1786
2032
|
// src/components/forms/FileUpload.tsx
|
|
1787
|
-
var
|
|
2033
|
+
var React11 = __toESM(require("react"), 1);
|
|
1788
2034
|
var import_react_aria_components23 = require("react-aria-components");
|
|
1789
2035
|
|
|
1790
2036
|
// src/components/feedback/ProgressBar.tsx
|
|
1791
2037
|
var import_react_aria_components22 = require("react-aria-components");
|
|
1792
|
-
var
|
|
2038
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1793
2039
|
function ProgressBar({
|
|
1794
2040
|
value = 0,
|
|
1795
2041
|
minValue = 0,
|
|
@@ -1802,7 +2048,7 @@ function ProgressBar({
|
|
|
1802
2048
|
className,
|
|
1803
2049
|
style
|
|
1804
2050
|
}) {
|
|
1805
|
-
return /* @__PURE__ */ (0,
|
|
2051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1806
2052
|
import_react_aria_components22.ProgressBar,
|
|
1807
2053
|
{
|
|
1808
2054
|
className: cx("pire-progress", className),
|
|
@@ -1813,19 +2059,19 @@ function ProgressBar({
|
|
|
1813
2059
|
maxValue,
|
|
1814
2060
|
isIndeterminate,
|
|
1815
2061
|
style,
|
|
1816
|
-
children: ({ percentage, valueText }) => /* @__PURE__ */ (0,
|
|
1817
|
-
label || showValue ? /* @__PURE__ */ (0,
|
|
1818
|
-
label ? /* @__PURE__ */ (0,
|
|
1819
|
-
showValue && !isIndeterminate ? /* @__PURE__ */ (0,
|
|
2062
|
+
children: ({ percentage, valueText }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
2063
|
+
label || showValue ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "pire-progress-head", children: [
|
|
2064
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components22.Label, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", {}),
|
|
2065
|
+
showValue && !isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "pire-numeric", children: valueText }) : null
|
|
1820
2066
|
] }) : null,
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pire-progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pire-progress-fill", style: { width: `${isIndeterminate ? 40 : percentage}%` } }) })
|
|
1822
2068
|
] })
|
|
1823
2069
|
}
|
|
1824
2070
|
);
|
|
1825
2071
|
}
|
|
1826
2072
|
|
|
1827
2073
|
// src/components/forms/FileUpload.tsx
|
|
1828
|
-
var
|
|
2074
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1829
2075
|
var isImage = (file) => file.type.startsWith("image/");
|
|
1830
2076
|
function formatFileSize(bytes) {
|
|
1831
2077
|
if (bytes < 1024) return `${bytes} B`;
|
|
@@ -1874,10 +2120,10 @@ function FileUpload({
|
|
|
1874
2120
|
style
|
|
1875
2121
|
}) {
|
|
1876
2122
|
const msg = usePireMessages();
|
|
1877
|
-
const [uncontrolled, setUncontrolled] =
|
|
2123
|
+
const [uncontrolled, setUncontrolled] = React11.useState(defaultValue ?? []);
|
|
1878
2124
|
const files = value ?? uncontrolled;
|
|
1879
|
-
const created =
|
|
1880
|
-
|
|
2125
|
+
const created = React11.useRef([]);
|
|
2126
|
+
React11.useEffect(() => () => {
|
|
1881
2127
|
for (const url of created.current) URL.revokeObjectURL(url);
|
|
1882
2128
|
}, []);
|
|
1883
2129
|
const commit = (next) => {
|
|
@@ -1897,7 +2143,7 @@ function FileUpload({
|
|
|
1897
2143
|
commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));
|
|
1898
2144
|
};
|
|
1899
2145
|
const remove = (target) => commit(files.filter((f) => f.file !== target));
|
|
1900
|
-
return /* @__PURE__ */ (0,
|
|
2146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1901
2147
|
"div",
|
|
1902
2148
|
{
|
|
1903
2149
|
className: cx("pire-field", "pire-fileupload", className),
|
|
@@ -1905,24 +2151,24 @@ function FileUpload({
|
|
|
1905
2151
|
"data-full-width": String(fullWidth),
|
|
1906
2152
|
"data-invalid": isInvalid ? "true" : void 0,
|
|
1907
2153
|
children: [
|
|
1908
|
-
label ? /* @__PURE__ */ (0,
|
|
2154
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "pire-field-label", children: [
|
|
1909
2155
|
label,
|
|
1910
|
-
isRequired ? /* @__PURE__ */ (0,
|
|
2156
|
+
isRequired ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
1911
2157
|
] }) : null,
|
|
1912
|
-
/* @__PURE__ */ (0,
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1913
2159
|
import_react_aria_components23.FileTrigger,
|
|
1914
2160
|
{
|
|
1915
2161
|
acceptedFileTypes,
|
|
1916
2162
|
allowsMultiple,
|
|
1917
2163
|
onSelect: accept,
|
|
1918
|
-
children: /* @__PURE__ */ (0,
|
|
2164
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { icon: "paperclip", isDisabled: isDisabled || isReadOnly, children: chooseLabel ?? msg.fileUploadChoose })
|
|
1919
2165
|
}
|
|
1920
2166
|
),
|
|
1921
|
-
files.length ? /* @__PURE__ */ (0,
|
|
1922
|
-
previewUrl ? /* @__PURE__ */ (0,
|
|
1923
|
-
/* @__PURE__ */ (0,
|
|
1924
|
-
/* @__PURE__ */ (0,
|
|
1925
|
-
isDisabled || isReadOnly ? null : /* @__PURE__ */ (0,
|
|
2167
|
+
files.length ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("li", { className: "pire-fileupload-item", children: [
|
|
2168
|
+
previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
|
|
2169
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "pire-fileupload-name", children: file.name }),
|
|
2170
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
|
|
2171
|
+
isDisabled || isReadOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1926
2172
|
IconButton,
|
|
1927
2173
|
{
|
|
1928
2174
|
icon: "x",
|
|
@@ -1932,16 +2178,17 @@ function FileUpload({
|
|
|
1932
2178
|
}
|
|
1933
2179
|
)
|
|
1934
2180
|
] }, `${file.name}-${file.size}-${file.lastModified}`)) }) : null,
|
|
1935
|
-
uploadProgress != null ? /* @__PURE__ */ (0,
|
|
1936
|
-
description ? /* @__PURE__ */ (0,
|
|
1937
|
-
isInvalid && errorMessage ? /* @__PURE__ */ (0,
|
|
2181
|
+
uploadProgress != null ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
|
|
2182
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_aria_components23.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
2183
|
+
isInvalid && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "pire-field-error", children: errorMessage }) : null
|
|
1938
2184
|
]
|
|
1939
2185
|
}
|
|
1940
2186
|
);
|
|
1941
2187
|
}
|
|
1942
2188
|
|
|
1943
2189
|
// src/components/navigation/ShellBar.tsx
|
|
1944
|
-
var
|
|
2190
|
+
var import_react_aria_components24 = require("react-aria-components");
|
|
2191
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1945
2192
|
var initials2 = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
|
|
1946
2193
|
function ShellBar({
|
|
1947
2194
|
product,
|
|
@@ -1953,33 +2200,51 @@ function ShellBar({
|
|
|
1953
2200
|
searchLabel = "Search",
|
|
1954
2201
|
actions,
|
|
1955
2202
|
user,
|
|
2203
|
+
userMenu,
|
|
2204
|
+
userMenuLabel,
|
|
1956
2205
|
className,
|
|
1957
2206
|
...rest
|
|
1958
2207
|
}) {
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
1965
|
-
|
|
2208
|
+
const msg = usePireMessages();
|
|
2209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("header", { className: cx("pire-shellbar", className), ...rest, children: [
|
|
2210
|
+
onMenu ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(IconButton, { icon: "menu", label: menuLabel, variant: "inverse", size: "sm", onPress: onMenu }) : null,
|
|
2211
|
+
monogram ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
|
|
2212
|
+
product ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-shellbar-product", children: product }) : null,
|
|
2213
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-shellbar-title", children: title }) : null,
|
|
2214
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-shellbar-spacer" }),
|
|
2215
|
+
onSearch ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(IconButton, { icon: "search", label: searchLabel, variant: "inverse", size: "sm", onPress: onSearch }) : null,
|
|
1966
2216
|
actions,
|
|
1967
|
-
user
|
|
2217
|
+
user && userMenu ? (
|
|
2218
|
+
// A real button, not the img-role span: the avatar is where "my profile", "switch company"
|
|
2219
|
+
// and "sign out" live in any ERP, and a span accepts neither focus nor onPress. Popover is
|
|
2220
|
+
// rendered here rather than expected from the consumer so the panel keeps shell placement.
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_aria_components24.MenuTrigger, { children: [
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2223
|
+
import_react_aria_components24.Button,
|
|
2224
|
+
{
|
|
2225
|
+
className: "pire-avatar pire-avatar-trigger",
|
|
2226
|
+
"aria-label": (userMenuLabel ?? msg.shellBarUserMenu).replace("{user}", user),
|
|
2227
|
+
children: initials2(user)
|
|
2228
|
+
}
|
|
2229
|
+
),
|
|
2230
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components24.Popover, { className: "pire-popover", children: userMenu })
|
|
2231
|
+
] })
|
|
2232
|
+
) : user ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
|
|
1968
2233
|
] });
|
|
1969
2234
|
}
|
|
1970
2235
|
|
|
1971
2236
|
// src/components/navigation/SideNav.tsx
|
|
1972
|
-
var
|
|
1973
|
-
var
|
|
2237
|
+
var React12 = __toESM(require("react"), 1);
|
|
2238
|
+
var import_react_aria_components26 = require("react-aria-components");
|
|
1974
2239
|
|
|
1975
2240
|
// src/components/navigation/Menu.tsx
|
|
1976
|
-
var
|
|
1977
|
-
var
|
|
2241
|
+
var import_react_aria_components25 = require("react-aria-components");
|
|
2242
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1978
2243
|
function Menu({ minWidth, className, style, ...rest }) {
|
|
1979
2244
|
const width = typeof minWidth === "number" ? `${minWidth}px` : minWidth;
|
|
1980
2245
|
const menuStyle = width == null ? style : { ["--pire-menu-min-w"]: width, ...style };
|
|
1981
|
-
return /* @__PURE__ */ (0,
|
|
1982
|
-
|
|
2246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2247
|
+
import_react_aria_components25.Menu,
|
|
1983
2248
|
{
|
|
1984
2249
|
className: cx("pire-menu", className),
|
|
1985
2250
|
style: menuStyle,
|
|
@@ -1987,6 +2252,11 @@ function Menu({ minWidth, className, style, ...rest }) {
|
|
|
1987
2252
|
}
|
|
1988
2253
|
);
|
|
1989
2254
|
}
|
|
2255
|
+
var shortcutKeys = (shortcut) => {
|
|
2256
|
+
if (shortcut == null) return [];
|
|
2257
|
+
const parts = Array.isArray(shortcut) ? shortcut : shortcut.split(/[+\s]+/);
|
|
2258
|
+
return parts.map((part) => part.trim()).filter(Boolean);
|
|
2259
|
+
};
|
|
1990
2260
|
function MenuItem({
|
|
1991
2261
|
children,
|
|
1992
2262
|
icon,
|
|
@@ -1996,35 +2266,36 @@ function MenuItem({
|
|
|
1996
2266
|
className,
|
|
1997
2267
|
...rest
|
|
1998
2268
|
}) {
|
|
1999
|
-
|
|
2000
|
-
|
|
2269
|
+
const keys = shortcutKeys(shortcut);
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2271
|
+
import_react_aria_components25.MenuItem,
|
|
2001
2272
|
{
|
|
2002
2273
|
className: cx("pire-menu-item", className),
|
|
2003
2274
|
"data-tone": tone === "danger" ? "danger" : void 0,
|
|
2004
2275
|
...rest,
|
|
2005
2276
|
children: [
|
|
2006
|
-
icon ? /* @__PURE__ */ (0,
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2008
|
-
/* @__PURE__ */ (0,
|
|
2009
|
-
description ? /* @__PURE__ */ (0,
|
|
2277
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: icon, size: 16, className: "pire-menu-item-icon" }) : null,
|
|
2278
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "pire-menu-item-body", children: [
|
|
2279
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-menu-item-label", children }),
|
|
2280
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-menu-item-desc", children: description }) : null
|
|
2010
2281
|
] }),
|
|
2011
|
-
|
|
2282
|
+
keys.length ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Kbd, { size: "sm", children: cap }, `${cap}-${index}`)) }) : null
|
|
2012
2283
|
]
|
|
2013
2284
|
}
|
|
2014
2285
|
);
|
|
2015
2286
|
}
|
|
2016
2287
|
function MenuSection({ title, children, className, ...rest }) {
|
|
2017
|
-
return /* @__PURE__ */ (0,
|
|
2018
|
-
title ? /* @__PURE__ */ (0,
|
|
2288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_aria_components25.MenuSection, { className: cx("pire-menu-section", className), ...rest, children: [
|
|
2289
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_aria_components25.Header, { className: "pire-menu-section-title", children: title }) : null,
|
|
2019
2290
|
children
|
|
2020
2291
|
] });
|
|
2021
2292
|
}
|
|
2022
2293
|
function MenuSeparator({ className }) {
|
|
2023
|
-
return /* @__PURE__ */ (0,
|
|
2294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_aria_components25.Separator, { className: cx("pire-menu-separator", className) });
|
|
2024
2295
|
}
|
|
2025
2296
|
|
|
2026
2297
|
// src/components/navigation/SideNav.tsx
|
|
2027
|
-
var
|
|
2298
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2028
2299
|
function findActiveParent(groups, value) {
|
|
2029
2300
|
if (value == null) return void 0;
|
|
2030
2301
|
for (const group of groups) {
|
|
@@ -2050,10 +2321,10 @@ function SideNav({
|
|
|
2050
2321
|
const msg = usePireMessages();
|
|
2051
2322
|
const activeParent = findActiveParent(groups, value);
|
|
2052
2323
|
const isControlled = expandedIds != null;
|
|
2053
|
-
const [ownExpanded, setOwnExpanded] =
|
|
2324
|
+
const [ownExpanded, setOwnExpanded] = React12.useState(
|
|
2054
2325
|
() => new Set(defaultExpandedIds ?? (activeParent ? [activeParent] : []))
|
|
2055
2326
|
);
|
|
2056
|
-
const [lastValue, setLastValue] =
|
|
2327
|
+
const [lastValue, setLastValue] = React12.useState(value);
|
|
2057
2328
|
if (value !== lastValue) {
|
|
2058
2329
|
setLastValue(value);
|
|
2059
2330
|
if (!isControlled && activeParent && !ownExpanded.has(activeParent)) {
|
|
@@ -2073,8 +2344,8 @@ function SideNav({
|
|
|
2073
2344
|
};
|
|
2074
2345
|
const renderRow = (item, onPress, isGroup) => {
|
|
2075
2346
|
const selected = !isGroup && item.id === value;
|
|
2076
|
-
const button = /* @__PURE__ */ (0,
|
|
2077
|
-
|
|
2347
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2348
|
+
import_react_aria_components26.Button,
|
|
2078
2349
|
{
|
|
2079
2350
|
className: "pire-sidenav-item",
|
|
2080
2351
|
"data-selected": selected ? "true" : void 0,
|
|
@@ -2083,70 +2354,70 @@ function SideNav({
|
|
|
2083
2354
|
"aria-label": collapsed ? item.label : void 0,
|
|
2084
2355
|
onPress,
|
|
2085
2356
|
children: [
|
|
2086
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2087
|
-
collapsed ? null : /* @__PURE__ */ (0,
|
|
2088
|
-
item.count != null && !collapsed ? /* @__PURE__ */ (0,
|
|
2357
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: item.icon, size: 16 }) : null,
|
|
2358
|
+
collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: item.label }),
|
|
2359
|
+
item.count != null && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null
|
|
2089
2360
|
]
|
|
2090
2361
|
},
|
|
2091
2362
|
item.id
|
|
2092
2363
|
);
|
|
2093
|
-
return collapsed ? /* @__PURE__ */ (0,
|
|
2364
|
+
return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
|
|
2094
2365
|
};
|
|
2095
|
-
const renderRailFlyout = (item) => /* @__PURE__ */ (0,
|
|
2096
|
-
/* @__PURE__ */ (0,
|
|
2097
|
-
|
|
2366
|
+
const renderRailFlyout = (item) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_aria_components26.MenuTrigger, { children: [
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2368
|
+
import_react_aria_components26.Button,
|
|
2098
2369
|
{
|
|
2099
2370
|
className: "pire-sidenav-item",
|
|
2100
2371
|
"aria-label": item.label,
|
|
2101
2372
|
"data-active-child": item.id === activeParent ? "true" : void 0,
|
|
2102
|
-
children: item.icon ? /* @__PURE__ */ (0,
|
|
2373
|
+
children: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: item.icon, size: 16 }) : null
|
|
2103
2374
|
}
|
|
2104
2375
|
),
|
|
2105
|
-
/* @__PURE__ */ (0,
|
|
2376
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_aria_components26.Popover, { className: "pire-popover", placement: "right top", offset: 4, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2106
2377
|
Menu,
|
|
2107
2378
|
{
|
|
2108
2379
|
"aria-label": item.label,
|
|
2109
2380
|
className: "pire-sidenav-flyout",
|
|
2110
2381
|
onAction: (key) => onChange?.(String(key)),
|
|
2111
|
-
children: (item.items ?? []).map((child) => /* @__PURE__ */ (0,
|
|
2382
|
+
children: (item.items ?? []).map((child) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MenuItem, { id: child.id, children: child.label }, child.id))
|
|
2112
2383
|
}
|
|
2113
2384
|
) })
|
|
2114
2385
|
] }, item.id);
|
|
2115
|
-
const renderSection = (item) => /* @__PURE__ */ (0,
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2117
|
-
|
|
2386
|
+
const renderSection = (item) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_aria_components26.Disclosure, { id: item.id, className: "pire-sidenav-section", children: [
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2388
|
+
import_react_aria_components26.Button,
|
|
2118
2389
|
{
|
|
2119
2390
|
slot: "trigger",
|
|
2120
2391
|
className: "pire-sidenav-item",
|
|
2121
2392
|
"data-kind": "group",
|
|
2122
2393
|
"data-active-child": item.id === activeParent ? "true" : void 0,
|
|
2123
2394
|
children: [
|
|
2124
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2125
|
-
/* @__PURE__ */ (0,
|
|
2126
|
-
item.count != null ? /* @__PURE__ */ (0,
|
|
2127
|
-
/* @__PURE__ */ (0,
|
|
2395
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: item.icon, size: 16 }) : null,
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: item.label }),
|
|
2397
|
+
item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null,
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: "chevron-down", size: 16, className: "pire-sidenav-chevron" })
|
|
2128
2399
|
]
|
|
2129
2400
|
}
|
|
2130
2401
|
),
|
|
2131
|
-
/* @__PURE__ */ (0,
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_aria_components26.DisclosurePanel, { className: "pire-sidenav-subnav", children: item.items?.map((child) => {
|
|
2132
2403
|
const selected = child.id === value;
|
|
2133
|
-
return /* @__PURE__ */ (0,
|
|
2134
|
-
|
|
2404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2405
|
+
import_react_aria_components26.Button,
|
|
2135
2406
|
{
|
|
2136
2407
|
className: "pire-sidenav-item pire-sidenav-subitem",
|
|
2137
2408
|
"data-selected": selected ? "true" : void 0,
|
|
2138
2409
|
"aria-current": selected ? "page" : void 0,
|
|
2139
2410
|
onPress: () => onChange?.(child.id),
|
|
2140
2411
|
children: [
|
|
2141
|
-
/* @__PURE__ */ (0,
|
|
2142
|
-
child.count != null ? /* @__PURE__ */ (0,
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: child.label }),
|
|
2413
|
+
child.count != null ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-sidenav-count", children: child.count }) : null
|
|
2143
2414
|
]
|
|
2144
2415
|
},
|
|
2145
2416
|
child.id
|
|
2146
2417
|
);
|
|
2147
2418
|
}) })
|
|
2148
2419
|
] }, item.id);
|
|
2149
|
-
return /* @__PURE__ */ (0,
|
|
2420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2150
2421
|
"nav",
|
|
2151
2422
|
{
|
|
2152
2423
|
className: cx("pire-sidenav", className),
|
|
@@ -2162,10 +2433,10 @@ function SideNav({
|
|
|
2162
2433
|
if (isGroup && collapsed && railFlyout) return renderRailFlyout(item);
|
|
2163
2434
|
return renderRow(item, () => isGroup ? toggleExpanded(item.id) : onChange?.(item.id), isGroup);
|
|
2164
2435
|
});
|
|
2165
|
-
return /* @__PURE__ */ (0,
|
|
2166
|
-
group.label && !collapsed ? /* @__PURE__ */ (0,
|
|
2167
|
-
hasSections ? /* @__PURE__ */ (0,
|
|
2168
|
-
|
|
2436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "pire-sidenav-group", children: [
|
|
2437
|
+
group.label && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "pire-sidenav-label", children: group.label }) : null,
|
|
2438
|
+
hasSections ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2439
|
+
import_react_aria_components26.DisclosureGroup,
|
|
2169
2440
|
{
|
|
2170
2441
|
className: "pire-sidenav-tree",
|
|
2171
2442
|
allowsMultipleExpanded: true,
|
|
@@ -2176,18 +2447,18 @@ function SideNav({
|
|
|
2176
2447
|
) : rows
|
|
2177
2448
|
] }, group.label ?? gi);
|
|
2178
2449
|
}),
|
|
2179
|
-
footer ? /* @__PURE__ */ (0,
|
|
2450
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "pire-sidenav-footer", children: footer }) : null
|
|
2180
2451
|
]
|
|
2181
2452
|
}
|
|
2182
2453
|
);
|
|
2183
2454
|
}
|
|
2184
2455
|
|
|
2185
2456
|
// src/components/navigation/Tabs.tsx
|
|
2186
|
-
var
|
|
2187
|
-
var
|
|
2457
|
+
var import_react_aria_components27 = require("react-aria-components");
|
|
2458
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2188
2459
|
function Tabs({ items, value, defaultValue, onChange, panels, className, style, ...rest }) {
|
|
2189
|
-
return /* @__PURE__ */ (0,
|
|
2190
|
-
|
|
2460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2461
|
+
import_react_aria_components27.Tabs,
|
|
2191
2462
|
{
|
|
2192
2463
|
className,
|
|
2193
2464
|
style,
|
|
@@ -2195,23 +2466,23 @@ function Tabs({ items, value, defaultValue, onChange, panels, className, style,
|
|
|
2195
2466
|
defaultSelectedKey: defaultValue,
|
|
2196
2467
|
onSelectionChange: (k) => onChange?.(String(k)),
|
|
2197
2468
|
children: [
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2199
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components27.TabList, { className: "pire-tablist", items, "aria-label": rest["aria-label"] ?? "Views", children: (item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_aria_components27.Tab, { className: cx("pire-tab"), id: item.id, isDisabled: item.isDisabled, children: [
|
|
2470
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: item.icon, size: 16 }) : null,
|
|
2200
2471
|
item.label,
|
|
2201
|
-
item.count != null ? /* @__PURE__ */ (0,
|
|
2472
|
+
item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-tab-count", children: item.count }) : null
|
|
2202
2473
|
] }) }),
|
|
2203
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
2474
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components27.TabPanel, { id: item.id, className: panels ? "pire-tabpanel" : void 0, children: panels?.[item.id] }, item.id))
|
|
2204
2475
|
]
|
|
2205
2476
|
}
|
|
2206
2477
|
);
|
|
2207
2478
|
}
|
|
2208
2479
|
|
|
2209
2480
|
// src/components/navigation/Breadcrumb.tsx
|
|
2210
|
-
var
|
|
2211
|
-
var
|
|
2481
|
+
var import_react_aria_components28 = require("react-aria-components");
|
|
2482
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2212
2483
|
function Breadcrumb({ items, onNavigate, className, style }) {
|
|
2213
|
-
return /* @__PURE__ */ (0,
|
|
2214
|
-
|
|
2484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2485
|
+
import_react_aria_components28.Breadcrumbs,
|
|
2215
2486
|
{
|
|
2216
2487
|
className: cx("pire-breadcrumbs", className),
|
|
2217
2488
|
style,
|
|
@@ -2219,9 +2490,9 @@ function Breadcrumb({ items, onNavigate, className, style }) {
|
|
|
2219
2490
|
onAction: (key) => onNavigate?.(String(key)),
|
|
2220
2491
|
children: (item) => {
|
|
2221
2492
|
const last = items[items.length - 1] === item;
|
|
2222
|
-
return /* @__PURE__ */ (0,
|
|
2223
|
-
last ? item.label : /* @__PURE__ */ (0,
|
|
2224
|
-
last ? null : /* @__PURE__ */ (0,
|
|
2493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_aria_components28.Breadcrumb, { className: "pire-breadcrumb", id: item.id ?? item.label, children: [
|
|
2494
|
+
last ? item.label : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components28.Link, { href: item.href, children: item.label }),
|
|
2495
|
+
last ? null : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: "chevron-right", size: 12, style: { color: "var(--text-tertiary)" } })
|
|
2225
2496
|
] });
|
|
2226
2497
|
}
|
|
2227
2498
|
}
|
|
@@ -2229,7 +2500,7 @@ function Breadcrumb({ items, onNavigate, className, style }) {
|
|
|
2229
2500
|
}
|
|
2230
2501
|
|
|
2231
2502
|
// src/components/navigation/Pagination.tsx
|
|
2232
|
-
var
|
|
2503
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2233
2504
|
function Pagination({
|
|
2234
2505
|
page = 1,
|
|
2235
2506
|
pageSize = 25,
|
|
@@ -2244,9 +2515,9 @@ function Pagination({
|
|
|
2244
2515
|
const pages = Math.max(1, Math.ceil(total / pageSize));
|
|
2245
2516
|
const from = total === 0 ? 0 : (page - 1) * pageSize + 1;
|
|
2246
2517
|
const to = Math.min(total, page * pageSize);
|
|
2247
|
-
return /* @__PURE__ */ (0,
|
|
2248
|
-
/* @__PURE__ */ (0,
|
|
2249
|
-
/* @__PURE__ */ (0,
|
|
2518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("nav", { className: cx("pire-pagination", className), style, "aria-label": msg.paginationLabel, children: [
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pire-pagination-count", children: msg.paginationRange.replace("{from}", from.toLocaleString()).replace("{to}", to.toLocaleString()).replace("{total}", total.toLocaleString()) }),
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2250
2521
|
IconButton,
|
|
2251
2522
|
{
|
|
2252
2523
|
icon: "chevron-left",
|
|
@@ -2257,8 +2528,8 @@ function Pagination({
|
|
|
2257
2528
|
onPress: () => onPageChange?.(page - 1)
|
|
2258
2529
|
}
|
|
2259
2530
|
),
|
|
2260
|
-
/* @__PURE__ */ (0,
|
|
2261
|
-
/* @__PURE__ */ (0,
|
|
2531
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pire-pagination-count", "aria-live": "polite", children: msg.paginationPageOf.replace("{page}", String(page)).replace("{pages}", String(pages)) }),
|
|
2532
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2262
2533
|
IconButton,
|
|
2263
2534
|
{
|
|
2264
2535
|
icon: "chevron-right",
|
|
@@ -2269,7 +2540,7 @@ function Pagination({
|
|
|
2269
2540
|
onPress: () => onPageChange?.(page + 1)
|
|
2270
2541
|
}
|
|
2271
2542
|
),
|
|
2272
|
-
onPageSizeChange ? /* @__PURE__ */ (0,
|
|
2543
|
+
onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2273
2544
|
Select,
|
|
2274
2545
|
{
|
|
2275
2546
|
"aria-label": msg.paginationRowsPerPage,
|
|
@@ -2285,7 +2556,7 @@ function Pagination({
|
|
|
2285
2556
|
}
|
|
2286
2557
|
|
|
2287
2558
|
// src/components/feedback/InlineMessage.tsx
|
|
2288
|
-
var
|
|
2559
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2289
2560
|
var KIND_ICON = {
|
|
2290
2561
|
info: "info",
|
|
2291
2562
|
success: "check-circle-2",
|
|
@@ -2295,7 +2566,7 @@ var KIND_ICON = {
|
|
|
2295
2566
|
function InlineMessage({ kind = "info", title, action, onClose, children, className, ...rest }) {
|
|
2296
2567
|
const msg = usePireMessages();
|
|
2297
2568
|
const assertive = kind === "error" || kind === "warning";
|
|
2298
|
-
return /* @__PURE__ */ (0,
|
|
2569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2299
2570
|
"div",
|
|
2300
2571
|
{
|
|
2301
2572
|
className: cx("pire-msg", className),
|
|
@@ -2304,21 +2575,21 @@ function InlineMessage({ kind = "info", title, action, onClose, children, classN
|
|
|
2304
2575
|
"aria-live": assertive ? "assertive" : "polite",
|
|
2305
2576
|
...rest,
|
|
2306
2577
|
children: [
|
|
2307
|
-
/* @__PURE__ */ (0,
|
|
2308
|
-
/* @__PURE__ */ (0,
|
|
2309
|
-
title ? /* @__PURE__ */ (0,
|
|
2310
|
-
children ? /* @__PURE__ */ (0,
|
|
2578
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: KIND_ICON[kind], size: 16, style: { marginTop: 2 } }),
|
|
2579
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--sp-1)" }, children: [
|
|
2580
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "pire-msg-title", children: title }) : null,
|
|
2581
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "pire-msg-body", children }) : null,
|
|
2311
2582
|
action
|
|
2312
2583
|
] }),
|
|
2313
|
-
onClose ? /* @__PURE__ */ (0,
|
|
2584
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(IconButton, { icon: "x", label: msg.inlineMessageDismiss, size: "sm", onPress: onClose }) : null
|
|
2314
2585
|
]
|
|
2315
2586
|
}
|
|
2316
2587
|
);
|
|
2317
2588
|
}
|
|
2318
2589
|
|
|
2319
2590
|
// src/components/feedback/Toast.tsx
|
|
2320
|
-
var
|
|
2321
|
-
var
|
|
2591
|
+
var React13 = __toESM(require("react"), 1);
|
|
2592
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2322
2593
|
var KIND_ICON2 = {
|
|
2323
2594
|
info: "info",
|
|
2324
2595
|
success: "check-circle-2",
|
|
@@ -2327,7 +2598,7 @@ var KIND_ICON2 = {
|
|
|
2327
2598
|
};
|
|
2328
2599
|
function Toast({ kind = "success", onClose, position = "bottom-center", children, className, ...rest }) {
|
|
2329
2600
|
const msg = usePireMessages();
|
|
2330
|
-
return /* @__PURE__ */ (0,
|
|
2601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2331
2602
|
"div",
|
|
2332
2603
|
{
|
|
2333
2604
|
className: cx("pire-toast", className),
|
|
@@ -2336,40 +2607,40 @@ function Toast({ kind = "success", onClose, position = "bottom-center", children
|
|
|
2336
2607
|
"aria-live": kind === "error" ? "assertive" : "polite",
|
|
2337
2608
|
...rest,
|
|
2338
2609
|
children: [
|
|
2339
|
-
/* @__PURE__ */ (0,
|
|
2340
|
-
/* @__PURE__ */ (0,
|
|
2341
|
-
onClose ? /* @__PURE__ */ (0,
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: KIND_ICON2[kind], size: 16 }),
|
|
2611
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { style: { flex: 1 }, children }),
|
|
2612
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { icon: "x", label: msg.toastDismiss, size: "sm", variant: "inverse", onPress: onClose }) : null
|
|
2342
2613
|
]
|
|
2343
2614
|
}
|
|
2344
2615
|
);
|
|
2345
2616
|
}
|
|
2346
|
-
var ToastContext =
|
|
2617
|
+
var ToastContext = React13.createContext(null);
|
|
2347
2618
|
function ToastProvider({ children, timeout = 6e3 }) {
|
|
2348
2619
|
const msg = usePireMessages();
|
|
2349
|
-
const [toasts, setToasts] =
|
|
2350
|
-
const close =
|
|
2351
|
-
const add =
|
|
2620
|
+
const [toasts, setToasts] = React13.useState([]);
|
|
2621
|
+
const close = React13.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
|
|
2622
|
+
const add = React13.useCallback((toast) => {
|
|
2352
2623
|
const id = Math.random().toString(36).slice(2);
|
|
2353
2624
|
setToasts((t) => [...t, { ...toast, id }]);
|
|
2354
2625
|
const ms = toast.timeout ?? timeout;
|
|
2355
2626
|
if (ms > 0) setTimeout(() => close(id), ms);
|
|
2356
2627
|
return id;
|
|
2357
2628
|
}, [close, timeout]);
|
|
2358
|
-
const value =
|
|
2359
|
-
return /* @__PURE__ */ (0,
|
|
2629
|
+
const value = React13.useMemo(() => ({ add, close }), [add, close]);
|
|
2630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(ToastContext.Provider, { value, children: [
|
|
2360
2631
|
children,
|
|
2361
|
-
/* @__PURE__ */ (0,
|
|
2632
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Toast, { kind: t.kind, onClose: () => close(t.id), style: { position: "static", transform: "none" }, children: t.message }, t.id)) })
|
|
2362
2633
|
] });
|
|
2363
2634
|
}
|
|
2364
2635
|
function useToast() {
|
|
2365
|
-
const ctx =
|
|
2636
|
+
const ctx = React13.useContext(ToastContext);
|
|
2366
2637
|
if (!ctx) throw new Error("useToast must be used inside <ToastProvider>");
|
|
2367
2638
|
return ctx;
|
|
2368
2639
|
}
|
|
2369
2640
|
|
|
2370
2641
|
// src/components/data/KpiTile.tsx
|
|
2371
|
-
var
|
|
2372
|
-
var
|
|
2642
|
+
var import_react_aria_components29 = require("react-aria-components");
|
|
2643
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2373
2644
|
function KpiTile({
|
|
2374
2645
|
label,
|
|
2375
2646
|
value,
|
|
@@ -2385,50 +2656,50 @@ function KpiTile({
|
|
|
2385
2656
|
style
|
|
2386
2657
|
}) {
|
|
2387
2658
|
const tone = deltaTone ?? (deltaDirection === "down" ? "negative" : "positive");
|
|
2388
|
-
const body = /* @__PURE__ */ (0,
|
|
2389
|
-
/* @__PURE__ */ (0,
|
|
2390
|
-
icon ? /* @__PURE__ */ (0,
|
|
2659
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
2660
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "pire-kpi-label", children: [
|
|
2661
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: icon, size: 16 }) : null,
|
|
2391
2662
|
label
|
|
2392
2663
|
] }),
|
|
2393
|
-
/* @__PURE__ */ (0,
|
|
2664
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "pire-kpi-value", children: [
|
|
2394
2665
|
value,
|
|
2395
|
-
unit ? /* @__PURE__ */ (0,
|
|
2666
|
+
unit ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pire-kpi-unit", children: unit }) : null
|
|
2396
2667
|
] }),
|
|
2397
|
-
delta ? /* @__PURE__ */ (0,
|
|
2398
|
-
deltaDirection ? /* @__PURE__ */ (0,
|
|
2668
|
+
delta ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "pire-kpi-delta", "data-tone": tone, children: [
|
|
2669
|
+
deltaDirection ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: deltaDirection === "up" ? "trending-up" : "trending-down", size: 12 }) : null,
|
|
2399
2670
|
delta
|
|
2400
2671
|
] }) : null,
|
|
2401
|
-
footnote ? /* @__PURE__ */ (0,
|
|
2672
|
+
footnote ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pire-kpi-foot", children: footnote }) : null
|
|
2402
2673
|
] });
|
|
2403
2674
|
const props = { className: cx("pire-kpi", className), "data-status": status, style };
|
|
2404
|
-
return onPress ? /* @__PURE__ */ (0,
|
|
2675
|
+
return onPress ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_aria_components29.Button, { ...props, "data-pressable": "true", onPress, children: body }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { ...props, children: body });
|
|
2405
2676
|
}
|
|
2406
2677
|
|
|
2407
2678
|
// src/components/data/ObjectHeader.tsx
|
|
2408
|
-
var
|
|
2679
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2409
2680
|
function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions, className, ...rest }) {
|
|
2410
|
-
return /* @__PURE__ */ (0,
|
|
2681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("header", { className: cx("pire-objheader", className), ...rest, children: [
|
|
2411
2682
|
breadcrumb,
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2413
|
-
/* @__PURE__ */ (0,
|
|
2414
|
-
/* @__PURE__ */ (0,
|
|
2415
|
-
subtitle || id ? /* @__PURE__ */ (0,
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "pire-objheader-row", children: [
|
|
2684
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { style: { minWidth: 0 }, children: [
|
|
2685
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("h1", { className: "pire-objheader-title", children: title }),
|
|
2686
|
+
subtitle || id ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "pire-objheader-sub", children: [
|
|
2416
2687
|
subtitle,
|
|
2417
|
-
id ? /* @__PURE__ */ (0,
|
|
2688
|
+
id ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pire-objheader-id", children: id }) : null
|
|
2418
2689
|
] }) : null
|
|
2419
2690
|
] }),
|
|
2420
2691
|
badge,
|
|
2421
|
-
actions ? /* @__PURE__ */ (0,
|
|
2692
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-objheader-actions", children: actions }) : null
|
|
2422
2693
|
] }),
|
|
2423
|
-
facts?.length ? /* @__PURE__ */ (0,
|
|
2424
|
-
/* @__PURE__ */ (0,
|
|
2425
|
-
/* @__PURE__ */ (0,
|
|
2694
|
+
facts?.length ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
|
|
2695
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("dt", { className: "pire-fact-label", children: fact.label }),
|
|
2696
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("dd", { className: "pire-fact-value", "data-numeric": fact.numeric ? "true" : void 0, style: { margin: 0 }, children: fact.value })
|
|
2426
2697
|
] }, fact.label)) }) : null
|
|
2427
2698
|
] });
|
|
2428
2699
|
}
|
|
2429
2700
|
|
|
2430
2701
|
// src/components/data/FilterBar.tsx
|
|
2431
|
-
var
|
|
2702
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2432
2703
|
function FilterBar({
|
|
2433
2704
|
children,
|
|
2434
2705
|
activeFilters = [],
|
|
@@ -2445,49 +2716,49 @@ function FilterBar({
|
|
|
2445
2716
|
const label = useMessage("filterBarLabel", rest["aria-label"]);
|
|
2446
2717
|
const go = useMessage("filterBarGo", goLabel);
|
|
2447
2718
|
const clearAll = useMessage("filterBarClearAll", clearAllLabel);
|
|
2448
|
-
return /* @__PURE__ */ (0,
|
|
2449
|
-
/* @__PURE__ */ (0,
|
|
2719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("section", { className: cx("pire-filterbar", className), ...rest, "aria-label": label, children: [
|
|
2720
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "pire-filterbar-controls", children: [
|
|
2450
2721
|
children,
|
|
2451
|
-
onGo ? /* @__PURE__ */ (0,
|
|
2722
|
+
onGo ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { variant: "primary", onPress: onGo, children: go }) : null
|
|
2452
2723
|
] }),
|
|
2453
|
-
activeFilters.length || resultLabel || actions ? /* @__PURE__ */ (0,
|
|
2454
|
-
activeFilters.map((filter) => /* @__PURE__ */ (0,
|
|
2455
|
-
activeFilters.length && onClear ? /* @__PURE__ */ (0,
|
|
2456
|
-
resultLabel ? /* @__PURE__ */ (0,
|
|
2457
|
-
actions ? /* @__PURE__ */ (0,
|
|
2724
|
+
activeFilters.length || resultLabel || actions ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "pire-filterbar-foot", children: [
|
|
2725
|
+
activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Tag, { onRemove: onRemoveFilter ? () => onRemoveFilter(filter.id) : void 0, children: filter.label }, filter.id)),
|
|
2726
|
+
activeFilters.length && onClear ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { variant: "tertiary", size: "sm", onPress: onClear, children: clearAll }) : null,
|
|
2727
|
+
resultLabel ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "pire-filterbar-result", "aria-live": "polite", children: resultLabel }) : null,
|
|
2728
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "pire-filterbar-actions", children: actions }) : null
|
|
2458
2729
|
] }) : null
|
|
2459
2730
|
] });
|
|
2460
2731
|
}
|
|
2461
2732
|
|
|
2462
2733
|
// src/components/data/DescriptionList.tsx
|
|
2463
|
-
var
|
|
2734
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2464
2735
|
function DescriptionList({ items, layout = "rows", columns = 3, className, style, ...rest }) {
|
|
2465
|
-
return /* @__PURE__ */ (0,
|
|
2736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2466
2737
|
"dl",
|
|
2467
2738
|
{
|
|
2468
2739
|
className: cx("pire-dl", className),
|
|
2469
2740
|
"data-layout": layout,
|
|
2470
2741
|
style: { ...layout === "grid" ? { "--pire-dl-cols": columns } : null, ...style },
|
|
2471
2742
|
...rest,
|
|
2472
|
-
children: items.map((item, i) => /* @__PURE__ */ (0,
|
|
2473
|
-
/* @__PURE__ */ (0,
|
|
2743
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "pire-dl-row", "data-emphasis": item.emphasis ? "true" : void 0, children: [
|
|
2744
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("dt", { className: "pire-dl-term", children: [
|
|
2474
2745
|
item.label,
|
|
2475
2746
|
item.hint
|
|
2476
2747
|
] }),
|
|
2477
|
-
/* @__PURE__ */ (0,
|
|
2748
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("dd", { className: "pire-dl-value", "data-numeric": item.numeric ? "true" : void 0, children: item.value })
|
|
2478
2749
|
] }, i))
|
|
2479
2750
|
}
|
|
2480
2751
|
);
|
|
2481
2752
|
}
|
|
2482
2753
|
|
|
2483
2754
|
// src/components/data/Timeline.tsx
|
|
2484
|
-
var
|
|
2755
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2485
2756
|
function Timeline({ entries, reverse = false, className, ...rest }) {
|
|
2486
2757
|
const list = reverse ? [...entries].reverse() : entries;
|
|
2487
|
-
return /* @__PURE__ */ (0,
|
|
2488
|
-
/* @__PURE__ */ (0,
|
|
2489
|
-
/* @__PURE__ */ (0,
|
|
2490
|
-
entry.actor ? /* @__PURE__ */ (0,
|
|
2758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ol", { className: cx("pire-timeline", className), ...rest, children: list.map((entry, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("li", { className: "pire-timeline-item", children: [
|
|
2759
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "pire-timeline-time", children: entry.time }),
|
|
2760
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "pire-timeline-text", children: entry.event }),
|
|
2761
|
+
entry.actor ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "pire-timeline-actor", children: entry.actor }) : null
|
|
2491
2762
|
] }, entry.id ?? i)) });
|
|
2492
2763
|
}
|
|
2493
2764
|
|
|
@@ -2570,7 +2841,7 @@ function alignToCategories(series, categoryCount) {
|
|
|
2570
2841
|
}
|
|
2571
2842
|
|
|
2572
2843
|
// src/components/data/ChartFrame.tsx
|
|
2573
|
-
var
|
|
2844
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2574
2845
|
function seriesLegend(series) {
|
|
2575
2846
|
return series.map((one, index) => ({
|
|
2576
2847
|
key: one.id,
|
|
@@ -2593,29 +2864,29 @@ function ChartFrame({
|
|
|
2593
2864
|
children
|
|
2594
2865
|
}) {
|
|
2595
2866
|
const msg = usePireMessages();
|
|
2596
|
-
return /* @__PURE__ */ (0,
|
|
2597
|
-
title || description ? /* @__PURE__ */ (0,
|
|
2598
|
-
title ? /* @__PURE__ */ (0,
|
|
2599
|
-
description ? /* @__PURE__ */ (0,
|
|
2867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("figure", { className: cx("pire-chart", className), style, children: [
|
|
2868
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("figcaption", { className: "pire-chart-head", children: [
|
|
2869
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "pire-chart-title", children: title }) : null,
|
|
2870
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "pire-chart-desc", children: description }) : null
|
|
2600
2871
|
] }) : null,
|
|
2601
|
-
legend && legend.length > 1 ? /* @__PURE__ */ (0,
|
|
2602
|
-
/* @__PURE__ */ (0,
|
|
2872
|
+
legend && legend.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("ul", { className: "pire-chart-legend", children: legend.map((item) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("li", { className: "pire-chart-legend-item", children: [
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "pire-chart-swatch", style: { background: item.color } }),
|
|
2603
2874
|
item.label
|
|
2604
2875
|
] }, item.key)) }) : null,
|
|
2605
|
-
/* @__PURE__ */ (0,
|
|
2606
|
-
/* @__PURE__ */ (0,
|
|
2607
|
-
/* @__PURE__ */ (0,
|
|
2608
|
-
/* @__PURE__ */ (0,
|
|
2609
|
-
/* @__PURE__ */ (0,
|
|
2610
|
-
series.map((one) => /* @__PURE__ */ (0,
|
|
2876
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "pire-chart-plot", "aria-hidden": "true", children }),
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: showDataTable ? "pire-chart-table" : "pire-sr-only", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("table", { children: [
|
|
2878
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("caption", { children: label }),
|
|
2879
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("tr", { children: [
|
|
2880
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { scope: "col", children: msg.chartCategoryHeader }),
|
|
2881
|
+
series.map((one) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { scope: "col", children: one.label }, one.id))
|
|
2611
2882
|
] }) }),
|
|
2612
|
-
/* @__PURE__ */ (0,
|
|
2883
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tbody", { children: categories.map((category, categoryIndex) => (
|
|
2613
2884
|
// biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
|
|
2614
|
-
/* @__PURE__ */ (0,
|
|
2615
|
-
/* @__PURE__ */ (0,
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("tr", { children: [
|
|
2886
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { scope: "row", children: category }),
|
|
2616
2887
|
series.map((one) => {
|
|
2617
2888
|
const value = one.values[categoryIndex];
|
|
2618
|
-
return /* @__PURE__ */ (0,
|
|
2889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("td", { children: value == null ? msg.chartNoValue : formatValue(value) }, one.id);
|
|
2619
2890
|
})
|
|
2620
2891
|
] }, categoryIndex)
|
|
2621
2892
|
)) })
|
|
@@ -2624,7 +2895,7 @@ function ChartFrame({
|
|
|
2624
2895
|
}
|
|
2625
2896
|
|
|
2626
2897
|
// src/components/data/BarChart.tsx
|
|
2627
|
-
var
|
|
2898
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2628
2899
|
function BarChart({
|
|
2629
2900
|
categories,
|
|
2630
2901
|
series: rawSeries,
|
|
@@ -2656,7 +2927,7 @@ function BarChart({
|
|
|
2656
2927
|
const value = series[0].values[categoryIndex];
|
|
2657
2928
|
return value == null ? msg.chartNoValue : formatValue(value);
|
|
2658
2929
|
};
|
|
2659
|
-
return /* @__PURE__ */ (0,
|
|
2930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2660
2931
|
ChartFrame,
|
|
2661
2932
|
{
|
|
2662
2933
|
label,
|
|
@@ -2669,7 +2940,7 @@ function BarChart({
|
|
|
2669
2940
|
showDataTable,
|
|
2670
2941
|
className,
|
|
2671
2942
|
style,
|
|
2672
|
-
children: !hasData ? /* @__PURE__ */ (0,
|
|
2943
|
+
children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2673
2944
|
"div",
|
|
2674
2945
|
{
|
|
2675
2946
|
className: "pire-chart-bars",
|
|
@@ -2678,12 +2949,12 @@ function BarChart({
|
|
|
2678
2949
|
style: { "--pire-chart-height": `${height}px` },
|
|
2679
2950
|
children: categories.map((category, categoryIndex) => (
|
|
2680
2951
|
// biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
|
|
2681
|
-
/* @__PURE__ */ (0,
|
|
2682
|
-
/* @__PURE__ */ (0,
|
|
2683
|
-
/* @__PURE__ */ (0,
|
|
2952
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "pire-chart-group", children: [
|
|
2953
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "pire-chart-cat", children: category }),
|
|
2954
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pire-chart-track", children: series.map((one, seriesIndex) => {
|
|
2684
2955
|
const value = one.values[categoryIndex];
|
|
2685
2956
|
if (value == null) return null;
|
|
2686
|
-
return /* @__PURE__ */ (0,
|
|
2957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
2687
2958
|
"div",
|
|
2688
2959
|
{
|
|
2689
2960
|
className: "pire-chart-bar",
|
|
@@ -2692,8 +2963,8 @@ function BarChart({
|
|
|
2692
2963
|
"--pire-bar-color": seriesColor(one, seriesIndex)
|
|
2693
2964
|
},
|
|
2694
2965
|
children: [
|
|
2695
|
-
withValues && orientation === "vertical" ? /* @__PURE__ */ (0,
|
|
2696
|
-
/* @__PURE__ */ (0,
|
|
2966
|
+
withValues && orientation === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "pire-chart-barval", children: formatValue(value) }) : null,
|
|
2967
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "pire-chart-tip", role: "presentation", children: [
|
|
2697
2968
|
series.length > 1 ? `${one.label}: ` : "",
|
|
2698
2969
|
formatValue(value)
|
|
2699
2970
|
] })
|
|
@@ -2702,7 +2973,7 @@ function BarChart({
|
|
|
2702
2973
|
one.id
|
|
2703
2974
|
);
|
|
2704
2975
|
}) }),
|
|
2705
|
-
withValues && orientation === "horizontal" ? /* @__PURE__ */ (0,
|
|
2976
|
+
withValues && orientation === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "pire-chart-val", children: horizontalLabelFor(categoryIndex) }) : null
|
|
2706
2977
|
] }, categoryIndex)
|
|
2707
2978
|
))
|
|
2708
2979
|
}
|
|
@@ -2712,14 +2983,14 @@ function BarChart({
|
|
|
2712
2983
|
}
|
|
2713
2984
|
|
|
2714
2985
|
// src/components/data/LineChart.tsx
|
|
2715
|
-
var
|
|
2716
|
-
var
|
|
2986
|
+
var React14 = __toESM(require("react"), 1);
|
|
2987
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2717
2988
|
var PLOT_INSET = { top: 10, right: 14, bottom: 24, left: 58 };
|
|
2718
2989
|
var MARKER_LIMIT = 20;
|
|
2719
|
-
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ?
|
|
2990
|
+
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? React14.useEffect : React14.useLayoutEffect;
|
|
2720
2991
|
function useMeasuredWidth() {
|
|
2721
|
-
const ref =
|
|
2722
|
-
const [width, setWidth] =
|
|
2992
|
+
const ref = React14.useRef(null);
|
|
2993
|
+
const [width, setWidth] = React14.useState(0);
|
|
2723
2994
|
useIsomorphicLayoutEffect2(() => {
|
|
2724
2995
|
const element = ref.current;
|
|
2725
2996
|
if (!element) return;
|
|
@@ -2780,7 +3051,7 @@ function LineChart({
|
|
|
2780
3051
|
return `M${xAt(present[0].index)} ${baseline} L${line} L${xAt(last.index)} ${baseline} Z`;
|
|
2781
3052
|
};
|
|
2782
3053
|
const labelEvery = Math.max(1, Math.ceil(categories.length / Math.max(2, Math.floor(innerWidth / 64))));
|
|
2783
|
-
return /* @__PURE__ */ (0,
|
|
3054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2784
3055
|
ChartFrame,
|
|
2785
3056
|
{
|
|
2786
3057
|
label,
|
|
@@ -2793,8 +3064,8 @@ function LineChart({
|
|
|
2793
3064
|
showDataTable,
|
|
2794
3065
|
className,
|
|
2795
3066
|
style,
|
|
2796
|
-
children: !hasData ? /* @__PURE__ */ (0,
|
|
2797
|
-
width > 0 ? /* @__PURE__ */ (0,
|
|
3067
|
+
children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "pire-chart-lines", ref: plotRef, style: { height }, children: [
|
|
3068
|
+
width > 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2798
3069
|
"svg",
|
|
2799
3070
|
{
|
|
2800
3071
|
width,
|
|
@@ -2803,7 +3074,7 @@ function LineChart({
|
|
|
2803
3074
|
"aria-hidden": "true",
|
|
2804
3075
|
focusable: "false",
|
|
2805
3076
|
children: [
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
3077
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("g", { className: "pire-chart-grid", children: scale.ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2807
3078
|
"line",
|
|
2808
3079
|
{
|
|
2809
3080
|
x1: PLOT_INSET.left,
|
|
@@ -2813,8 +3084,8 @@ function LineChart({
|
|
|
2813
3084
|
},
|
|
2814
3085
|
tick
|
|
2815
3086
|
)) }),
|
|
2816
|
-
/* @__PURE__ */ (0,
|
|
2817
|
-
scale.ticks.map((tick) => /* @__PURE__ */ (0,
|
|
3087
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("g", { className: "pire-chart-tick", children: [
|
|
3088
|
+
scale.ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2818
3089
|
"text",
|
|
2819
3090
|
{
|
|
2820
3091
|
x: PLOT_INSET.left - 8,
|
|
@@ -2827,10 +3098,10 @@ function LineChart({
|
|
|
2827
3098
|
)),
|
|
2828
3099
|
categories.map((category, index) => index % labelEvery === 0 ? (
|
|
2829
3100
|
// biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
|
|
2830
|
-
/* @__PURE__ */ (0,
|
|
3101
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
|
|
2831
3102
|
) : null)
|
|
2832
3103
|
] }),
|
|
2833
|
-
showArea && series[0] ? /* @__PURE__ */ (0,
|
|
3104
|
+
showArea && series[0] ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2834
3105
|
"path",
|
|
2835
3106
|
{
|
|
2836
3107
|
d: areaFor(series[0].values),
|
|
@@ -2838,10 +3109,10 @@ function LineChart({
|
|
|
2838
3109
|
style: { fill: seriesColor(series[0], 0) }
|
|
2839
3110
|
}
|
|
2840
3111
|
) : null,
|
|
2841
|
-
/* @__PURE__ */ (0,
|
|
2842
|
-
withMarkers ? /* @__PURE__ */ (0,
|
|
3112
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("g", { className: "pire-chart-line", fill: "none", children: series.map((one, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: pathFor(one.values), stroke: seriesColor(one, index) }, one.id)) }),
|
|
3113
|
+
withMarkers ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("g", { className: "pire-chart-marker", children: series.map((one, seriesIndex) => one.values.map((value, index) => value == null ? null : (
|
|
2843
3114
|
// biome-ignore lint/suspicious/noArrayIndexKey: a series is positional — the index is the point's identity, and category labels repeat.
|
|
2844
|
-
/* @__PURE__ */ (0,
|
|
3115
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2845
3116
|
"circle",
|
|
2846
3117
|
{
|
|
2847
3118
|
cx: xAt(index),
|
|
@@ -2855,18 +3126,18 @@ function LineChart({
|
|
|
2855
3126
|
]
|
|
2856
3127
|
}
|
|
2857
3128
|
) : null,
|
|
2858
|
-
/* @__PURE__ */ (0,
|
|
3129
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2859
3130
|
"div",
|
|
2860
3131
|
{
|
|
2861
3132
|
className: "pire-chart-hover",
|
|
2862
3133
|
style: { inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px` },
|
|
2863
3134
|
children: categories.map((category, categoryIndex) => (
|
|
2864
3135
|
// biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
|
|
2865
|
-
/* @__PURE__ */ (0,
|
|
2866
|
-
/* @__PURE__ */ (0,
|
|
3136
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "pire-chart-band", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "pire-chart-tip", role: "presentation", children: [
|
|
3137
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("strong", { children: category }),
|
|
2867
3138
|
series.map((one) => {
|
|
2868
3139
|
const value = one.values[categoryIndex];
|
|
2869
|
-
return /* @__PURE__ */ (0,
|
|
3140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "pire-chart-tip-row", children: [
|
|
2870
3141
|
one.label,
|
|
2871
3142
|
": ",
|
|
2872
3143
|
value == null ? "No data" : formatValue(value)
|
|
@@ -2882,8 +3153,8 @@ function LineChart({
|
|
|
2882
3153
|
}
|
|
2883
3154
|
|
|
2884
3155
|
// src/components/data/DonutChart.tsx
|
|
2885
|
-
var
|
|
2886
|
-
var
|
|
3156
|
+
var React15 = __toESM(require("react"), 1);
|
|
3157
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2887
3158
|
var SEGMENT_GAP_DEGREES = 1.5;
|
|
2888
3159
|
function DonutChart({
|
|
2889
3160
|
categories,
|
|
@@ -2903,7 +3174,7 @@ function DonutChart({
|
|
|
2903
3174
|
}) {
|
|
2904
3175
|
const label = rest["aria-label"];
|
|
2905
3176
|
const msg = usePireMessages();
|
|
2906
|
-
const [hoveredIndex, setHoveredIndex] =
|
|
3177
|
+
const [hoveredIndex, setHoveredIndex] = React15.useState(null);
|
|
2907
3178
|
warnOnDonutShape(series, categories.length, label);
|
|
2908
3179
|
const values = (series[0]?.values ?? []).slice(0, categories.length);
|
|
2909
3180
|
const segments = categories.map((category, index) => ({ category, index, value: values[index] ?? 0 })).filter((segment) => segment.value > 0);
|
|
@@ -2920,7 +3191,7 @@ function DonutChart({
|
|
|
2920
3191
|
}));
|
|
2921
3192
|
const hovered = hoveredIndex == null ? null : segments.find((segment) => segment.index === hoveredIndex) ?? null;
|
|
2922
3193
|
let arcStart = 0;
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
3194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2924
3195
|
ChartFrame,
|
|
2925
3196
|
{
|
|
2926
3197
|
label,
|
|
@@ -2933,8 +3204,8 @@ function DonutChart({
|
|
|
2933
3204
|
showDataTable,
|
|
2934
3205
|
className,
|
|
2935
3206
|
style,
|
|
2936
|
-
children: !hasData ? /* @__PURE__ */ (0,
|
|
2937
|
-
/* @__PURE__ */ (0,
|
|
3207
|
+
children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "pire-chart-donut", style: { height: size }, children: [
|
|
3208
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2938
3209
|
"svg",
|
|
2939
3210
|
{
|
|
2940
3211
|
width: size,
|
|
@@ -2942,13 +3213,13 @@ function DonutChart({
|
|
|
2942
3213
|
"aria-hidden": "true",
|
|
2943
3214
|
focusable: "false",
|
|
2944
3215
|
onMouseLeave: () => setHoveredIndex(null),
|
|
2945
|
-
children: /* @__PURE__ */ (0,
|
|
3216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("g", { transform: `rotate(-90 ${size / 2} ${size / 2})`, children: segments.map((segment) => {
|
|
2946
3217
|
const arcLength = segment.value / total * circumference;
|
|
2947
3218
|
const offset = arcStart;
|
|
2948
3219
|
arcStart += arcLength;
|
|
2949
3220
|
return (
|
|
2950
3221
|
// biome-ignore lint/a11y/noStaticElementInteractions: pointer-only enhancement inside an aria-hidden plot — the arcs carry nothing the data table does not, so there is nothing here for a keyboard to reach.
|
|
2951
|
-
/* @__PURE__ */ (0,
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2952
3223
|
"circle",
|
|
2953
3224
|
{
|
|
2954
3225
|
className: "pire-chart-arc",
|
|
@@ -2968,9 +3239,9 @@ function DonutChart({
|
|
|
2968
3239
|
}) })
|
|
2969
3240
|
}
|
|
2970
3241
|
),
|
|
2971
|
-
/* @__PURE__ */ (0,
|
|
2972
|
-
/* @__PURE__ */ (0,
|
|
2973
|
-
/* @__PURE__ */ (0,
|
|
3242
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "pire-chart-donut-center", style: { width: size - thickness * 2 - 8 }, children: [
|
|
3243
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "pire-chart-donut-value", children: hovered ? formatValue(hovered.value) : centerLabel ?? formatValue(total) }),
|
|
3244
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "pire-chart-donut-caption", children: hovered ? hovered.category : centerCaption })
|
|
2974
3245
|
] })
|
|
2975
3246
|
] })
|
|
2976
3247
|
}
|
|
@@ -2981,15 +3252,15 @@ function colorForSegment(index) {
|
|
|
2981
3252
|
}
|
|
2982
3253
|
|
|
2983
3254
|
// src/components/data/LinkList.tsx
|
|
2984
|
-
var
|
|
2985
|
-
var
|
|
3255
|
+
var import_react_aria_components30 = require("react-aria-components");
|
|
3256
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2986
3257
|
function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
|
|
2987
|
-
return /* @__PURE__ */ (0,
|
|
2988
|
-
const keySlot = item.key ? /* @__PURE__ */ (0,
|
|
2989
|
-
const textSlot = item.text ? /* @__PURE__ */ (0,
|
|
3258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: cx("pire-linklist", className), role: "list", "data-emphasis": emphasis, ...rest, children: items.map((item) => {
|
|
3259
|
+
const keySlot = item.key ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "pire-linklist-key", children: item.key }) : null;
|
|
3260
|
+
const textSlot = item.text ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "pire-linklist-text", children: item.text }) : null;
|
|
2990
3261
|
const [first, second] = emphasis === "text" ? [textSlot, keySlot] : [keySlot, textSlot];
|
|
2991
|
-
return /* @__PURE__ */ (0,
|
|
2992
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { role: "listitem", className: "pire-linklist-row", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react_aria_components30.Button, { className: "pire-linklist-item", onPress: () => onSelect?.(item.id), children: [
|
|
3263
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { name: item.icon, size: 16, style: { color: "var(--text-secondary)" } }) : null,
|
|
2993
3264
|
first,
|
|
2994
3265
|
second,
|
|
2995
3266
|
item.trailing
|
|
@@ -2998,7 +3269,7 @@ function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
|
|
|
2998
3269
|
}
|
|
2999
3270
|
|
|
3000
3271
|
// src/components/layout/PageBand.tsx
|
|
3001
|
-
var
|
|
3272
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3002
3273
|
function PageBand({
|
|
3003
3274
|
surface = "card",
|
|
3004
3275
|
hasBorder = true,
|
|
@@ -3006,7 +3277,7 @@ function PageBand({
|
|
|
3006
3277
|
className,
|
|
3007
3278
|
...rest
|
|
3008
3279
|
}) {
|
|
3009
|
-
return /* @__PURE__ */ (0,
|
|
3280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3010
3281
|
"div",
|
|
3011
3282
|
{
|
|
3012
3283
|
className: cx("pire-pageband", className),
|
|
@@ -3019,56 +3290,56 @@ function PageBand({
|
|
|
3019
3290
|
}
|
|
3020
3291
|
|
|
3021
3292
|
// src/components/layout/PageHeader.tsx
|
|
3022
|
-
var
|
|
3293
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3023
3294
|
function PageHeader({ title, subtitle, actions, className, ...rest }) {
|
|
3024
|
-
return /* @__PURE__ */ (0,
|
|
3025
|
-
/* @__PURE__ */ (0,
|
|
3026
|
-
/* @__PURE__ */ (0,
|
|
3027
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
3295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("header", { className: cx("pire-pageheader", className), ...rest, children: [
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { style: { minWidth: 0 }, children: [
|
|
3297
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h1", { className: "pire-pageheader-title", children: title }),
|
|
3298
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "pire-pageheader-sub", children: subtitle }) : null
|
|
3028
3299
|
] }),
|
|
3029
|
-
actions ? /* @__PURE__ */ (0,
|
|
3300
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "pire-pageheader-actions", children: actions }) : null
|
|
3030
3301
|
] });
|
|
3031
3302
|
}
|
|
3032
3303
|
|
|
3033
3304
|
// src/components/layout/SectionHeader.tsx
|
|
3034
|
-
var
|
|
3305
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3035
3306
|
function SectionHeader({ title, meta, actions, className, ...rest }) {
|
|
3036
|
-
return /* @__PURE__ */ (0,
|
|
3037
|
-
/* @__PURE__ */ (0,
|
|
3038
|
-
meta ? /* @__PURE__ */ (0,
|
|
3039
|
-
actions ? /* @__PURE__ */ (0,
|
|
3307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: cx("pire-sectionhead", className), ...rest, children: [
|
|
3308
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "pire-eyebrow", children: title }),
|
|
3309
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { style: { font: "var(--type-caption)", color: "var(--text-tertiary)" }, children: meta }) : null,
|
|
3310
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "pire-sectionhead-actions", children: actions }) : null
|
|
3040
3311
|
] });
|
|
3041
3312
|
}
|
|
3042
3313
|
|
|
3043
3314
|
// src/components/layout/SelectionBar.tsx
|
|
3044
|
-
var
|
|
3315
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3045
3316
|
function SelectionBar({ count, noun = "record", children, actions, className, ...rest }) {
|
|
3046
3317
|
if (!count) return null;
|
|
3047
|
-
return /* @__PURE__ */ (0,
|
|
3048
|
-
/* @__PURE__ */ (0,
|
|
3318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
|
|
3319
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "pire-selectionbar-count", children: [
|
|
3049
3320
|
count.toLocaleString(),
|
|
3050
3321
|
" ",
|
|
3051
3322
|
noun,
|
|
3052
3323
|
count === 1 ? "" : "s",
|
|
3053
3324
|
" selected"
|
|
3054
3325
|
] }),
|
|
3055
|
-
children ? /* @__PURE__ */ (0,
|
|
3056
|
-
actions ? /* @__PURE__ */ (0,
|
|
3326
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: "var(--text-secondary)", font: "var(--type-caption)" }, children }) : null,
|
|
3327
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "pire-selectionbar-actions", children: actions }) : null
|
|
3057
3328
|
] });
|
|
3058
3329
|
}
|
|
3059
3330
|
|
|
3060
3331
|
// src/components/layout/FooterBar.tsx
|
|
3061
|
-
var
|
|
3332
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3062
3333
|
function FooterBar({ note, actions, children, className, ...rest }) {
|
|
3063
|
-
return /* @__PURE__ */ (0,
|
|
3064
|
-
note ? /* @__PURE__ */ (0,
|
|
3334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("footer", { className: cx("pire-footerbar", className), ...rest, children: [
|
|
3335
|
+
note ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-footerbar-note", children: note }) : null,
|
|
3065
3336
|
children,
|
|
3066
|
-
actions ? /* @__PURE__ */ (0,
|
|
3337
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "pire-footerbar-actions", children: actions }) : null
|
|
3067
3338
|
] });
|
|
3068
3339
|
}
|
|
3069
3340
|
|
|
3070
3341
|
// src/components/patterns/ConfirmDialog.tsx
|
|
3071
|
-
var
|
|
3342
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3072
3343
|
function ConfirmDialog({
|
|
3073
3344
|
isOpen,
|
|
3074
3345
|
title,
|
|
@@ -3082,7 +3353,7 @@ function ConfirmDialog({
|
|
|
3082
3353
|
onConfirm,
|
|
3083
3354
|
onCancel
|
|
3084
3355
|
}) {
|
|
3085
|
-
return /* @__PURE__ */ (0,
|
|
3356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
3086
3357
|
Dialog,
|
|
3087
3358
|
{
|
|
3088
3359
|
isOpen,
|
|
@@ -3092,25 +3363,157 @@ function ConfirmDialog({
|
|
|
3092
3363
|
onClose: onCancel,
|
|
3093
3364
|
isDismissable: !isBusy,
|
|
3094
3365
|
showClose: false,
|
|
3095
|
-
footer: /* @__PURE__ */ (0,
|
|
3096
|
-
/* @__PURE__ */ (0,
|
|
3097
|
-
/* @__PURE__ */ (0,
|
|
3366
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
3367
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
|
|
3368
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
|
|
3098
3369
|
] }),
|
|
3099
3370
|
children: [
|
|
3100
|
-
consequence ? /* @__PURE__ */ (0,
|
|
3371
|
+
consequence ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(InlineMessage, { kind: tone === "danger" ? "error" : "warning", style: { marginBottom: children ? "var(--sp-3)" : 0 }, children: consequence }) : null,
|
|
3101
3372
|
children
|
|
3102
3373
|
]
|
|
3103
3374
|
}
|
|
3104
3375
|
);
|
|
3105
3376
|
}
|
|
3106
3377
|
|
|
3378
|
+
// src/components/patterns/CommandPalette.tsx
|
|
3379
|
+
var React16 = __toESM(require("react"), 1);
|
|
3380
|
+
var import_react_aria_components31 = require("react-aria-components");
|
|
3381
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3382
|
+
var RESULTS_SECTION_KEY = "__pire_results__";
|
|
3383
|
+
var searchableText = (item) => [item.label, item.description, item.keywords].filter(Boolean).join(" ");
|
|
3384
|
+
function CommandPalette({
|
|
3385
|
+
isOpen,
|
|
3386
|
+
onOpenChange,
|
|
3387
|
+
groups = [],
|
|
3388
|
+
resultsGroup,
|
|
3389
|
+
onAction,
|
|
3390
|
+
onSearch,
|
|
3391
|
+
isLoading,
|
|
3392
|
+
emptyLabel,
|
|
3393
|
+
loadingLabel,
|
|
3394
|
+
placeholder,
|
|
3395
|
+
footer,
|
|
3396
|
+
showFooter = true,
|
|
3397
|
+
"aria-label": ariaLabel,
|
|
3398
|
+
className,
|
|
3399
|
+
style
|
|
3400
|
+
}) {
|
|
3401
|
+
const msg = usePireMessages();
|
|
3402
|
+
const [query, setQuery] = React16.useState("");
|
|
3403
|
+
const { contains } = (0, import_react_aria_components31.useFilter)({ sensitivity: "base" });
|
|
3404
|
+
React16.useEffect(() => {
|
|
3405
|
+
if (isOpen) setQuery("");
|
|
3406
|
+
}, [isOpen]);
|
|
3407
|
+
const searchableById = React16.useMemo(() => {
|
|
3408
|
+
const byId = /* @__PURE__ */ new Map();
|
|
3409
|
+
for (const group of groups) for (const item of group.items) byId.set(item.id, searchableText(item));
|
|
3410
|
+
return byId;
|
|
3411
|
+
}, [groups]);
|
|
3412
|
+
const filter = React16.useCallback((textValue, inputValue, node) => {
|
|
3413
|
+
if (node.parentKey === RESULTS_SECTION_KEY) return true;
|
|
3414
|
+
return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);
|
|
3415
|
+
}, [contains, searchableById]);
|
|
3416
|
+
const handleInputChange = (value) => {
|
|
3417
|
+
setQuery(value);
|
|
3418
|
+
onSearch?.(value);
|
|
3419
|
+
};
|
|
3420
|
+
const sections = [...groups, ...resultsGroup ? [{ ...resultsGroup, id: RESULTS_SECTION_KEY }] : []];
|
|
3421
|
+
const status = isLoading ? loadingLabel ?? msg.commandPaletteLoading : emptyLabel ?? msg.commandPaletteEmpty;
|
|
3422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3423
|
+
import_react_aria_components31.ModalOverlay,
|
|
3424
|
+
{
|
|
3425
|
+
className: "pire-cp-overlay",
|
|
3426
|
+
isOpen,
|
|
3427
|
+
isDismissable: true,
|
|
3428
|
+
onOpenChange: (open) => {
|
|
3429
|
+
if (!open) onOpenChange?.(false);
|
|
3430
|
+
},
|
|
3431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_aria_components31.Modal, { className: cx("pire-cp-modal", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_aria_components31.Dialog, { className: "pire-cp-dialog", "aria-label": ariaLabel ?? msg.commandPaletteLabel, children: [
|
|
3432
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_aria_components31.Autocomplete, { filter, inputValue: query, onInputChange: handleInputChange, children: [
|
|
3433
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_aria_components31.SearchField, { className: "pire-cp-search", "aria-label": msg.commandPaletteSearchLabel, children: [
|
|
3434
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { name: "search", size: 18, className: "pire-cp-search-icon" }),
|
|
3435
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3436
|
+
import_react_aria_components31.Input,
|
|
3437
|
+
{
|
|
3438
|
+
className: "pire-cp-input",
|
|
3439
|
+
autoFocus: true,
|
|
3440
|
+
placeholder: placeholder ?? msg.commandPalettePlaceholder
|
|
3441
|
+
}
|
|
3442
|
+
)
|
|
3443
|
+
] }),
|
|
3444
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pire-cp-loading", role: "status", "aria-live": "polite", children: loadingLabel ?? msg.commandPaletteLoading }) : null,
|
|
3445
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3446
|
+
import_react_aria_components31.Menu,
|
|
3447
|
+
{
|
|
3448
|
+
className: "pire-cp-list",
|
|
3449
|
+
onAction: (key) => onAction?.(String(key)),
|
|
3450
|
+
renderEmptyState: () => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pire-cp-status", children: status }),
|
|
3451
|
+
children: sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_aria_components31.MenuSection, { id: section.id, className: "pire-cp-section", children: [
|
|
3452
|
+
section.label ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_aria_components31.Header, { className: "pire-cp-section-title", children: section.label }) : null,
|
|
3453
|
+
section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3454
|
+
MenuItem,
|
|
3455
|
+
{
|
|
3456
|
+
id: item.id,
|
|
3457
|
+
textValue: item.label,
|
|
3458
|
+
icon: item.icon,
|
|
3459
|
+
description: item.description,
|
|
3460
|
+
shortcut: item.shortcut,
|
|
3461
|
+
isDisabled: item.isDisabled,
|
|
3462
|
+
children: item.label
|
|
3463
|
+
},
|
|
3464
|
+
item.id
|
|
3465
|
+
))
|
|
3466
|
+
] }, section.id))
|
|
3467
|
+
}
|
|
3468
|
+
)
|
|
3469
|
+
] }),
|
|
3470
|
+
showFooter ? (
|
|
3471
|
+
// aria-hidden: the glyphs are a sighted affordance for discovering the keys. A screen
|
|
3472
|
+
// reader already announces the listbox semantics that make those keys work, so reading
|
|
3473
|
+
// "up arrow down arrow navigate" out loud is noise on every open.
|
|
3474
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pire-cp-foot", "aria-hidden": "true", children: footer ?? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
3475
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "pire-cp-hint", children: [
|
|
3476
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Kbd, { children: "\u2191" }),
|
|
3477
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Kbd, { children: "\u2193" }),
|
|
3478
|
+
msg.commandPaletteHintNavigate
|
|
3479
|
+
] }),
|
|
3480
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "pire-cp-hint", children: [
|
|
3481
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Kbd, { children: "\u21B5" }),
|
|
3482
|
+
msg.commandPaletteHintSelect
|
|
3483
|
+
] }),
|
|
3484
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "pire-cp-hint", children: [
|
|
3485
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Kbd, { children: "esc" }),
|
|
3486
|
+
msg.commandPaletteHintClose
|
|
3487
|
+
] })
|
|
3488
|
+
] }) })
|
|
3489
|
+
) : null
|
|
3490
|
+
] }) })
|
|
3491
|
+
}
|
|
3492
|
+
);
|
|
3493
|
+
}
|
|
3494
|
+
function useCommandPaletteShortcut(onTrigger, { key = "k", isDisabled } = {}) {
|
|
3495
|
+
const handler = React16.useRef(onTrigger);
|
|
3496
|
+
handler.current = onTrigger;
|
|
3497
|
+
React16.useEffect(() => {
|
|
3498
|
+
if (isDisabled) return;
|
|
3499
|
+
const onKeyDown = (event) => {
|
|
3500
|
+
if (!(event.metaKey || event.ctrlKey) || event.altKey) return;
|
|
3501
|
+
if (event.key.toLowerCase() !== key.toLowerCase()) return;
|
|
3502
|
+
event.preventDefault();
|
|
3503
|
+
handler.current();
|
|
3504
|
+
};
|
|
3505
|
+
document.addEventListener("keydown", onKeyDown);
|
|
3506
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
3507
|
+
}, [key, isDisabled]);
|
|
3508
|
+
}
|
|
3509
|
+
|
|
3107
3510
|
// src/components/patterns/SidePanel.tsx
|
|
3108
|
-
var
|
|
3109
|
-
var
|
|
3511
|
+
var import_react_aria_components32 = require("react-aria-components");
|
|
3512
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3110
3513
|
function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }) {
|
|
3111
3514
|
const msg = usePireMessages();
|
|
3112
|
-
return /* @__PURE__ */ (0,
|
|
3113
|
-
|
|
3515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3516
|
+
import_react_aria_components32.ModalOverlay,
|
|
3114
3517
|
{
|
|
3115
3518
|
className: "pire-sidepanel-overlay",
|
|
3116
3519
|
isOpen,
|
|
@@ -3118,36 +3521,36 @@ function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onC
|
|
|
3118
3521
|
onOpenChange: (o) => {
|
|
3119
3522
|
if (!o) onClose?.();
|
|
3120
3523
|
},
|
|
3121
|
-
children: /* @__PURE__ */ (0,
|
|
3122
|
-
/* @__PURE__ */ (0,
|
|
3123
|
-
/* @__PURE__ */ (0,
|
|
3124
|
-
/* @__PURE__ */ (0,
|
|
3125
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
3524
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_aria_components32.Modal, { className: cx("pire-sidepanel", className), style: { width }, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react_aria_components32.Dialog, { className: "pire-dialog", style: { height: "100%" }, children: [
|
|
3525
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("header", { className: "pire-dialog-head", children: [
|
|
3526
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
3527
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_aria_components32.Heading, { slot: "title", className: "pire-dialog-title", children: title }),
|
|
3528
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
|
|
3126
3529
|
] }),
|
|
3127
|
-
/* @__PURE__ */ (0,
|
|
3530
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(IconButton, { icon: "x", label: msg.sidePanelClose, size: "sm", onPress: onClose })
|
|
3128
3531
|
] }),
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3130
|
-
footer ? /* @__PURE__ */ (0,
|
|
3532
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "pire-dialog-body", style: { flex: 1 }, children }),
|
|
3533
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("footer", { className: "pire-dialog-foot", children: footer }) : null
|
|
3131
3534
|
] }) })
|
|
3132
3535
|
}
|
|
3133
3536
|
);
|
|
3134
3537
|
}
|
|
3135
3538
|
|
|
3136
3539
|
// src/components/patterns/EmptyState.tsx
|
|
3137
|
-
var
|
|
3540
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3138
3541
|
function EmptyState({ icon = "file-text", title, action, compact, children, className, ...rest }) {
|
|
3139
|
-
return /* @__PURE__ */ (0,
|
|
3140
|
-
/* @__PURE__ */ (0,
|
|
3141
|
-
title ? /* @__PURE__ */ (0,
|
|
3142
|
-
children ? /* @__PURE__ */ (0,
|
|
3542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
|
|
3543
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
|
|
3544
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
|
|
3545
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "pire-empty-body", style: { margin: 0 }, children }) : null,
|
|
3143
3546
|
action
|
|
3144
3547
|
] });
|
|
3145
3548
|
}
|
|
3146
3549
|
|
|
3147
3550
|
// src/components/patterns/FileDropZone.tsx
|
|
3148
|
-
var
|
|
3149
|
-
var
|
|
3150
|
-
var
|
|
3551
|
+
var React17 = __toESM(require("react"), 1);
|
|
3552
|
+
var import_react_aria_components33 = require("react-aria-components");
|
|
3553
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3151
3554
|
var isImage2 = (file) => file.type.startsWith("image/");
|
|
3152
3555
|
function FileDropZone({
|
|
3153
3556
|
label,
|
|
@@ -3173,10 +3576,10 @@ function FileDropZone({
|
|
|
3173
3576
|
style
|
|
3174
3577
|
}) {
|
|
3175
3578
|
const msg = usePireMessages();
|
|
3176
|
-
const [uncontrolled, setUncontrolled] =
|
|
3579
|
+
const [uncontrolled, setUncontrolled] = React17.useState(defaultValue ?? []);
|
|
3177
3580
|
const files = value ?? uncontrolled;
|
|
3178
|
-
const created =
|
|
3179
|
-
|
|
3581
|
+
const created = React17.useRef([]);
|
|
3582
|
+
React17.useEffect(() => () => {
|
|
3180
3583
|
for (const url of created.current) URL.revokeObjectURL(url);
|
|
3181
3584
|
}, []);
|
|
3182
3585
|
const commit = (next) => {
|
|
@@ -3196,43 +3599,43 @@ function FileDropZone({
|
|
|
3196
3599
|
commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));
|
|
3197
3600
|
};
|
|
3198
3601
|
const remove = (target) => commit(files.filter((f) => f.file !== target));
|
|
3199
|
-
return /* @__PURE__ */ (0,
|
|
3200
|
-
label ? /* @__PURE__ */ (0,
|
|
3602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cx("pire-field", className), style, "data-full-width": String(fullWidth), children: [
|
|
3603
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "pire-field-label", children: [
|
|
3201
3604
|
label,
|
|
3202
|
-
isRequired ? /* @__PURE__ */ (0,
|
|
3605
|
+
isRequired ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
3203
3606
|
] }) : null,
|
|
3204
|
-
/* @__PURE__ */ (0,
|
|
3205
|
-
|
|
3607
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3608
|
+
import_react_aria_components33.DropZone,
|
|
3206
3609
|
{
|
|
3207
3610
|
className: "pire-dropzone",
|
|
3208
3611
|
"data-height": height,
|
|
3209
3612
|
isDisabled: isDisabled || isReadOnly,
|
|
3210
3613
|
onDrop: async (e) => {
|
|
3211
3614
|
const dropped = await Promise.all(
|
|
3212
|
-
e.items.filter(
|
|
3615
|
+
e.items.filter(import_react_aria_components33.isFileDropItem).map((item) => item.getFile())
|
|
3213
3616
|
);
|
|
3214
3617
|
accept(dropped);
|
|
3215
3618
|
},
|
|
3216
3619
|
children: [
|
|
3217
|
-
/* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
3219
|
-
/* @__PURE__ */ (0,
|
|
3220
|
-
|
|
3620
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: "download", size: 24, className: "pire-dropzone-icon" }),
|
|
3621
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-dropzone-prompt", children: promptLabel ?? msg.fileDropZonePrompt }),
|
|
3622
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3623
|
+
import_react_aria_components33.FileTrigger,
|
|
3221
3624
|
{
|
|
3222
3625
|
acceptedFileTypes,
|
|
3223
3626
|
allowsMultiple,
|
|
3224
3627
|
onSelect: (list) => accept(list ? [...list] : []),
|
|
3225
|
-
children: /* @__PURE__ */ (0,
|
|
3628
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Button, { variant: "secondary", isDisabled: isDisabled || isReadOnly, children: msg.fileUploadChoose })
|
|
3226
3629
|
}
|
|
3227
3630
|
)
|
|
3228
3631
|
]
|
|
3229
3632
|
}
|
|
3230
3633
|
),
|
|
3231
|
-
files.length ? /* @__PURE__ */ (0,
|
|
3232
|
-
previewUrl ? /* @__PURE__ */ (0,
|
|
3233
|
-
/* @__PURE__ */ (0,
|
|
3234
|
-
/* @__PURE__ */ (0,
|
|
3235
|
-
isDisabled || isReadOnly ? null : /* @__PURE__ */ (0,
|
|
3634
|
+
files.length ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("li", { className: "pire-fileupload-item", children: [
|
|
3635
|
+
previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
|
|
3636
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-fileupload-name", children: file.name }),
|
|
3637
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
|
|
3638
|
+
isDisabled || isReadOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3236
3639
|
IconButton,
|
|
3237
3640
|
{
|
|
3238
3641
|
icon: "x",
|
|
@@ -3242,14 +3645,14 @@ function FileDropZone({
|
|
|
3242
3645
|
}
|
|
3243
3646
|
)
|
|
3244
3647
|
] }, `${file.name}-${file.size}-${file.lastModified}`)) }) : null,
|
|
3245
|
-
uploadProgress != null ? /* @__PURE__ */ (0,
|
|
3246
|
-
description ? /* @__PURE__ */ (0,
|
|
3247
|
-
isInvalid && errorMessage ? /* @__PURE__ */ (0,
|
|
3648
|
+
uploadProgress != null ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
|
|
3649
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-field-hint", children: description }) : null,
|
|
3650
|
+
isInvalid && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-field-error", children: errorMessage }) : null
|
|
3248
3651
|
] });
|
|
3249
3652
|
}
|
|
3250
3653
|
|
|
3251
3654
|
// src/index.ts
|
|
3252
|
-
var
|
|
3655
|
+
var import_react_aria_components34 = require("react-aria-components");
|
|
3253
3656
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3254
3657
|
0 && (module.exports = {
|
|
3255
3658
|
Avatar,
|
|
@@ -3260,6 +3663,7 @@ var import_react_aria_components32 = require("react-aria-components");
|
|
|
3260
3663
|
Card,
|
|
3261
3664
|
Checkbox,
|
|
3262
3665
|
ComboBox,
|
|
3666
|
+
CommandPalette,
|
|
3263
3667
|
ConfirmDialog,
|
|
3264
3668
|
DataTable,
|
|
3265
3669
|
DatePicker,
|
|
@@ -3276,10 +3680,12 @@ var import_react_aria_components32 = require("react-aria-components");
|
|
|
3276
3680
|
FormField,
|
|
3277
3681
|
Heading,
|
|
3278
3682
|
I18nProvider,
|
|
3683
|
+
ICON_NAMES,
|
|
3279
3684
|
Icon,
|
|
3280
3685
|
IconButton,
|
|
3281
3686
|
InlineMessage,
|
|
3282
3687
|
Input,
|
|
3688
|
+
Kbd,
|
|
3283
3689
|
KpiTile,
|
|
3284
3690
|
LineChart,
|
|
3285
3691
|
Link,
|
|
@@ -3330,6 +3736,7 @@ var import_react_aria_components32 = require("react-aria-components");
|
|
|
3330
3736
|
esMessages,
|
|
3331
3737
|
formatFileSize,
|
|
3332
3738
|
rangeLengthInDays,
|
|
3739
|
+
useCommandPaletteShortcut,
|
|
3333
3740
|
usePireMessages,
|
|
3334
3741
|
useToast
|
|
3335
3742
|
});
|