@orianatech/pire 0.3.0 → 0.4.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/index.cjs CHANGED
@@ -91,9 +91,74 @@ __export(src_exports, {
91
91
  });
92
92
  module.exports = __toCommonJS(src_exports);
93
93
 
94
- // src/components/core/Icon.tsx
95
- var React = __toESM(require("react"), 1);
96
- var import_jsx_runtime = require("react/jsx-runtime");
94
+ // src/components/core/icon-data.generated.ts
95
+ var ICON_MARKUP = {
96
+ "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"/>',
97
+ "apps": '<path d="M8,4V8H4V4Zm2-2H2v8h8Zm8,2V8H14V4Zm2-2H12v8h8Zm8,2V8H24V4Zm2-2H22v8h8ZM8,14v4H4V14Zm2-2H2v8h8Zm8,2v4H14V14Zm2-2H12v8h8Zm8,2v4H24V14Zm2-2H22v8h8ZM8,24v4H4V24Zm2-2H2v8h8Zm8,2v4H14V24Zm2-2H12v8h8Zm8,2v4H24V24Zm2-2H22v8h8Z"/>',
98
+ "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"/>',
99
+ "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"/>',
100
+ "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"/>',
101
+ "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"/>',
102
+ "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"/>',
103
+ "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"/>',
104
+ "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"/>',
105
+ "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"/>',
106
+ "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"/>',
107
+ "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"/>',
108
+ "checkmark": '<path d="M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"/>',
109
+ "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"/>',
110
+ "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"/>',
111
+ "chevron--down": '<path d="M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"/>',
112
+ "chevron--left": '<path d="M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"/>',
113
+ "chevron--right": '<path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"/>',
114
+ "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"/>',
115
+ "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"/>',
116
+ "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"/>',
117
+ "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"/>',
118
+ "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"/>',
119
+ "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"/>',
120
+ "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"/>',
121
+ "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"/>',
122
+ "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"/>',
123
+ "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"/>',
124
+ "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"/>',
125
+ "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"/>',
126
+ "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"/>',
127
+ "hashtag": '<path d="M28,12V10H22V4H20v6H12V4H10v6H4v2h6v8H4v2h6v6h2V22h8v6h2V22h6V20H22V12Zm-8,8H12V12h8Z"/>',
128
+ "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"/>',
129
+ "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"/>',
130
+ "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"/>',
131
+ "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"/>',
132
+ "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"/>',
133
+ "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"/>',
134
+ "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"/>',
135
+ "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"/>',
136
+ "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"/>',
137
+ "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"/>',
138
+ "menu": '<path d="M4 6H28V8H4z"/><path d="M4 24H28V26H4z"/><path d="M4 12H28V14H4z"/><path d="M4 18H28V20H4z"/>',
139
+ "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"/>',
140
+ "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"/>',
141
+ "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"/>',
142
+ "overflow-menu--vertical": '<circle cx="16" cy="8" r="2"/><circle cx="16" cy="16" r="2"/><circle cx="16" cy="24" r="2"/>',
143
+ "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"/>',
144
+ "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"/>',
145
+ "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"/>',
146
+ "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"/>',
147
+ "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"/>',
148
+ "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"/>',
149
+ "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"/>',
150
+ "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"/>',
151
+ "subtract": '<path d="M8 15H24V17H8z"/>',
152
+ "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"/>',
153
+ "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"/>',
154
+ "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"/>',
155
+ "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"/>',
156
+ "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"/>',
157
+ "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"/>',
158
+ "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"/>'
159
+ };
160
+
161
+ // src/components/core/icon-map.ts
97
162
  var CARBON_MAP = {
98
163
  "menu": "menu",
99
164
  "search": "search",
@@ -163,21 +228,49 @@ var CARBON_MAP = {
163
228
  "eye": "view",
164
229
  "minimize-2": "minimize"
165
230
  };
166
- var PACKS = {
167
- carbon: { base: "https://cdn.jsdelivr.net/npm/@carbon/icons@11/svg/32/", map: CARBON_MAP },
168
- lucide: { base: "https://cdn.jsdelivr.net/npm/lucide-static/icons/", map: null }
169
- };
231
+
232
+ // src/components/core/Icon.tsx
233
+ var import_jsx_runtime = require("react/jsx-runtime");
234
+ var IS_DEV = process.env.NODE_ENV !== "production";
235
+ var warned = /* @__PURE__ */ new Set();
236
+ function warnOnce(key, message) {
237
+ if (warned.has(key)) return;
238
+ warned.add(key);
239
+ console.warn(`[pire] ${message}`);
240
+ }
170
241
  var config = {};
171
242
  function configureIcons(next) {
172
243
  config = { ...config, ...next };
244
+ if (!IS_DEV) return;
245
+ if (next.base !== void 0) {
246
+ warnOnce(
247
+ "config:base",
248
+ "configureIcons({ base }) is ignored: glyphs are inlined in the bundle and no longer fetched over the network. Remove the call, and the self-hosted SVGs it pointed at."
249
+ );
250
+ }
251
+ if (next.pack !== void 0) {
252
+ warnOnce(
253
+ "config:pack",
254
+ "configureIcons({ pack }) is ignored: the bundled Carbon pack is the only pack. Use configureIcons({ resolve }) to supply a glyph Pire does not ship."
255
+ );
256
+ }
173
257
  }
174
258
  function Icon({ name, size = 16, label, pack, style, ...rest }) {
175
- const cfg = PACKS[pack ?? config.pack ?? "carbon"] ?? PACKS.lucide;
176
- const slug = cfg.map ? cfg.map[name] ?? name : name;
177
- const url = `${config.base ?? cfg.base}${slug}.svg`;
178
- const [failed, setFailed] = React.useState(false);
179
- React.useEffect(() => setFailed(false), [url]);
180
- const mask = `url("${url}") center / ${size}px ${size}px no-repeat`;
259
+ const markup = config.resolve?.(name) ?? ICON_MARKUP[CARBON_MAP[name] ?? name];
260
+ if (IS_DEV) {
261
+ if (pack !== void 0) {
262
+ warnOnce(
263
+ "prop:pack",
264
+ "The Icon `pack` prop is ignored: the bundled Carbon pack is the only pack. Drop the prop."
265
+ );
266
+ }
267
+ if (markup === void 0) {
268
+ warnOnce(
269
+ `missing:${name}`,
270
+ `Unknown icon name "${name}" \u2014 nothing will render. Add it to CARBON_MAP in src/components/core/icon-map.ts and rebuild, or register it with configureIcons({ resolve }).`
271
+ );
272
+ }
273
+ }
181
274
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
182
275
  "span",
183
276
  {
@@ -186,26 +279,18 @@ function Icon({ name, size = 16, label, pack, style, ...rest }) {
186
279
  "aria-hidden": label ? void 0 : true,
187
280
  "data-icon": name,
188
281
  ...rest,
189
- style: {
190
- position: "relative",
191
- display: "inline-block",
192
- flex: "0 0 auto",
193
- width: size,
194
- height: size,
195
- backgroundColor: failed ? "transparent" : "currentColor",
196
- WebkitMaskImage: failed ? void 0 : `url("${url}")`,
197
- WebkitMask: failed ? void 0 : mask,
198
- mask: failed ? void 0 : mask,
199
- ...style
200
- },
201
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
202
- "img",
282
+ style: { display: "inline-block", flex: "0 0 auto", width: size, height: size, ...style },
283
+ children: markup === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
284
+ "svg",
203
285
  {
204
- src: url,
205
- alt: "",
286
+ viewBox: "0 0 32 32",
287
+ width: size,
288
+ height: size,
289
+ fill: "currentColor",
290
+ focusable: "false",
206
291
  "aria-hidden": "true",
207
- onError: () => setFailed(true),
208
- style: { position: "absolute", width: 1, height: 1, opacity: 0, pointerEvents: "none" }
292
+ style: { display: "block" },
293
+ dangerouslySetInnerHTML: { __html: markup }
209
294
  }
210
295
  )
211
296
  }
@@ -213,7 +298,7 @@ function Icon({ name, size = 16, label, pack, style, ...rest }) {
213
298
  }
214
299
 
215
300
  // src/components/core/Button.tsx
216
- var React2 = __toESM(require("react"), 1);
301
+ var React = __toESM(require("react"), 1);
217
302
  var import_react_aria_components = require("react-aria-components");
218
303
 
219
304
  // src/components/utils/cx.ts
@@ -223,7 +308,7 @@ function cx(...parts) {
223
308
 
224
309
  // src/components/core/Button.tsx
225
310
  var import_jsx_runtime2 = require("react/jsx-runtime");
226
- var Button = React2.forwardRef(function Button2({ children, variant = "secondary", size = "md", icon, iconEnd, fullWidth, className, ...rest }, ref) {
311
+ var Button = React.forwardRef(function Button2({ children, variant = "secondary", size = "md", icon, iconEnd, fullWidth, className, ...rest }, ref) {
227
312
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
228
313
  import_react_aria_components.Button,
229
314
  {
@@ -243,7 +328,7 @@ var Button = React2.forwardRef(function Button2({ children, variant = "secondary
243
328
  });
244
329
 
245
330
  // src/components/core/IconButton.tsx
246
- var React3 = __toESM(require("react"), 1);
331
+ var React2 = __toESM(require("react"), 1);
247
332
  var import_react_aria_components3 = require("react-aria-components");
248
333
 
249
334
  // src/components/feedback/Tooltip.tsx
@@ -261,7 +346,7 @@ function Tooltip({ label, placement = "top", delay = 500, children }) {
261
346
 
262
347
  // src/components/core/IconButton.tsx
263
348
  var import_jsx_runtime4 = require("react/jsx-runtime");
264
- var IconButton = React3.forwardRef(function IconButton2({ icon, label, size = "md", variant = "tertiary", selected, hideTooltip, className, ...rest }, ref) {
349
+ var IconButton = React2.forwardRef(function IconButton2({ icon, label, size = "md", variant = "tertiary", selected, hideTooltip, className, ...rest }, ref) {
265
350
  const button = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
266
351
  import_react_aria_components3.Button,
267
352
  {
@@ -332,11 +417,11 @@ function Card({ title, subtitle, icon, actions, footer, interactive, children, c
332
417
  }
333
418
 
334
419
  // src/components/core/Avatar.tsx
335
- var React4 = __toESM(require("react"), 1);
420
+ var React3 = __toESM(require("react"), 1);
336
421
  var import_jsx_runtime8 = require("react/jsx-runtime");
337
422
  var initials = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
338
423
  function Avatar({ name, size = "md", src, className, ...rest }) {
339
- const [failed, setFailed] = React4.useState(false);
424
+ const [failed, setFailed] = React3.useState(false);
340
425
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cx("pire-avatar", className), "data-size": size, role: "img", "aria-label": name, ...rest, children: src && !failed ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
341
426
  "img",
342
427
  {
@@ -349,7 +434,7 @@ function Avatar({ name, size = "md", src, className, ...rest }) {
349
434
  }
350
435
 
351
436
  // src/components/core/SegmentedControl.tsx
352
- var React5 = __toESM(require("react"), 1);
437
+ var React4 = __toESM(require("react"), 1);
353
438
  var import_react_aria_components5 = require("react-aria-components");
354
439
  var import_jsx_runtime9 = require("react/jsx-runtime");
355
440
  function SegmentedControl({
@@ -363,7 +448,7 @@ function SegmentedControl({
363
448
  style,
364
449
  ...rest
365
450
  }) {
366
- const selected = React5.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);
451
+ const selected = React4.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);
367
452
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
368
453
  import_react_aria_components5.ToggleButtonGroup,
369
454
  {
@@ -466,10 +551,10 @@ function Input({
466
551
  }
467
552
 
468
553
  // src/components/forms/TextArea.tsx
469
- var React6 = __toESM(require("react"), 1);
554
+ var React5 = __toESM(require("react"), 1);
470
555
  var import_react_aria_components7 = require("react-aria-components");
471
556
  var import_jsx_runtime12 = require("react/jsx-runtime");
472
- var useIsomorphicLayoutEffect = typeof document === "undefined" ? React6.useEffect : React6.useLayoutEffect;
557
+ var useIsomorphicLayoutEffect = typeof document === "undefined" ? React5.useEffect : React5.useLayoutEffect;
473
558
  function TextArea({
474
559
  label,
475
560
  description,
@@ -485,13 +570,13 @@ function TextArea({
485
570
  onChange,
486
571
  ...rest
487
572
  }) {
488
- const innerRef = React6.useRef(null);
489
- const ref = React6.useCallback((node) => {
573
+ const innerRef = React5.useRef(null);
574
+ const ref = React5.useCallback((node) => {
490
575
  innerRef.current = node;
491
576
  if (typeof textAreaRef === "function") textAreaRef(node);
492
577
  else if (textAreaRef) textAreaRef.current = node;
493
578
  }, [textAreaRef]);
494
- const grow = React6.useCallback(() => {
579
+ const grow = React5.useCallback(() => {
495
580
  const el = innerRef.current;
496
581
  if (!el || !autoGrow) return;
497
582
  const styles = getComputedStyle(el);
@@ -715,7 +800,7 @@ function ComboBox({
715
800
  }
716
801
 
717
802
  // src/components/forms/MultiComboBox.tsx
718
- var React7 = __toESM(require("react"), 1);
803
+ var React6 = __toESM(require("react"), 1);
719
804
  var import_react_aria_components13 = require("react-aria-components");
720
805
  var import_jsx_runtime18 = require("react/jsx-runtime");
721
806
  var norm3 = (o) => typeof o === "string" ? { value: o, label: o } : o;
@@ -735,13 +820,13 @@ function MultiComboBox({
735
820
  style,
736
821
  ...rest
737
822
  }) {
738
- const items = React7.useMemo(() => options.map(norm3), [options]);
739
- const [uncontrolled, setUncontrolled] = React7.useState(defaultValue ?? []);
740
- const [announcement, setAnnouncement] = React7.useState("");
741
- const inputRef = React7.useRef(null);
823
+ const items = React6.useMemo(() => options.map(norm3), [options]);
824
+ const [uncontrolled, setUncontrolled] = React6.useState(defaultValue ?? []);
825
+ const [announcement, setAnnouncement] = React6.useState("");
826
+ const inputRef = React6.useRef(null);
742
827
  const raw = value ?? uncontrolled;
743
828
  const contentKey = raw.join("\0");
744
- const values = React7.useMemo(() => raw, [contentKey]);
829
+ const values = React6.useMemo(() => raw, [contentKey]);
745
830
  const labelOf = (v) => items.find((o) => o.value === v)?.label ?? v;
746
831
  const isEditable = !rest.isDisabled && !rest.isReadOnly;
747
832
  const commit = (next) => {
@@ -927,10 +1012,10 @@ function DatePicker({
927
1012
  }
928
1013
 
929
1014
  // src/components/forms/ValueHelpField.tsx
930
- var React9 = __toESM(require("react"), 1);
1015
+ var React8 = __toESM(require("react"), 1);
931
1016
 
932
1017
  // src/components/patterns/ValueHelpDialog.tsx
933
- var React8 = __toESM(require("react"), 1);
1018
+ var React7 = __toESM(require("react"), 1);
934
1019
 
935
1020
  // src/components/feedback/Dialog.tsx
936
1021
  var import_react_aria_components16 = require("react-aria-components");
@@ -1075,11 +1160,11 @@ function ValueHelpDialog({
1075
1160
  onSelect,
1076
1161
  onClose
1077
1162
  }) {
1078
- const [query, setQuery] = React8.useState("");
1079
- React8.useEffect(() => {
1163
+ const [query, setQuery] = React7.useState("");
1164
+ React7.useEffect(() => {
1080
1165
  if (isOpen) setQuery("");
1081
1166
  }, [isOpen]);
1082
- const filtered = React8.useMemo(() => {
1167
+ const filtered = React7.useMemo(() => {
1083
1168
  const q = query.trim().toLowerCase();
1084
1169
  if (!q) return rows;
1085
1170
  return rows.filter((row) => Object.values(row).some((v) => String(v).toLowerCase().includes(q)));
@@ -1145,7 +1230,7 @@ function ValueHelpField({
1145
1230
  className,
1146
1231
  style
1147
1232
  }) {
1148
- const [open, setOpen] = React9.useState(false);
1233
+ const [open, setOpen] = React8.useState(false);
1149
1234
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cx(className), style, children: [
1150
1235
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { display: "flex", gap: "var(--sp-2)", alignItems: "flex-end" }, children: [
1151
1236
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
@@ -1200,23 +1285,133 @@ function ValueHelpField({
1200
1285
  // src/components/navigation/ShellBar.tsx
1201
1286
  var import_jsx_runtime25 = require("react/jsx-runtime");
1202
1287
  var initials2 = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
1203
- function ShellBar({ product, monogram, title, onMenu, onSearch, actions, user, className, ...rest }) {
1288
+ function ShellBar({
1289
+ product,
1290
+ monogram,
1291
+ title,
1292
+ onMenu,
1293
+ onSearch,
1294
+ menuLabel = "Open navigation",
1295
+ searchLabel = "Search",
1296
+ actions,
1297
+ user,
1298
+ className,
1299
+ ...rest
1300
+ }) {
1204
1301
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("header", { className: cx("pire-shellbar", className), ...rest, children: [
1205
- onMenu ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconButton, { icon: "menu", label: "Open navigation", variant: "inverse", size: "sm", onPress: onMenu }) : null,
1302
+ onMenu ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconButton, { icon: "menu", label: menuLabel, variant: "inverse", size: "sm", onPress: onMenu }) : null,
1206
1303
  monogram ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
1207
1304
  product ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-shellbar-product", children: product }) : null,
1208
1305
  title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-shellbar-title", children: title }) : null,
1209
1306
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-shellbar-spacer" }),
1210
- onSearch ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconButton, { icon: "search", label: "Search", variant: "inverse", size: "sm", onPress: onSearch }) : null,
1307
+ onSearch ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconButton, { icon: "search", label: searchLabel, variant: "inverse", size: "sm", onPress: onSearch }) : null,
1211
1308
  actions,
1212
1309
  user ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
1213
1310
  ] });
1214
1311
  }
1215
1312
 
1216
1313
  // src/components/navigation/SideNav.tsx
1314
+ var React9 = __toESM(require("react"), 1);
1217
1315
  var import_react_aria_components18 = require("react-aria-components");
1218
1316
  var import_jsx_runtime26 = require("react/jsx-runtime");
1219
- function SideNav({ groups, value, onChange, collapsed, footer, className, ...rest }) {
1317
+ function findActiveParent(groups, value) {
1318
+ if (value == null) return void 0;
1319
+ for (const group of groups) {
1320
+ for (const item of group.items) {
1321
+ if (item.items?.some((child) => child.id === value)) return item.id;
1322
+ }
1323
+ }
1324
+ return void 0;
1325
+ }
1326
+ function SideNav({
1327
+ groups,
1328
+ value,
1329
+ onChange,
1330
+ expandedIds,
1331
+ defaultExpandedIds,
1332
+ onExpandedChange,
1333
+ collapsed,
1334
+ footer,
1335
+ className,
1336
+ ...rest
1337
+ }) {
1338
+ const activeParent = findActiveParent(groups, value);
1339
+ const isControlled = expandedIds != null;
1340
+ const [ownExpanded, setOwnExpanded] = React9.useState(
1341
+ () => new Set(defaultExpandedIds ?? (activeParent ? [activeParent] : []))
1342
+ );
1343
+ const [lastValue, setLastValue] = React9.useState(value);
1344
+ if (value !== lastValue) {
1345
+ setLastValue(value);
1346
+ if (!isControlled && activeParent && !ownExpanded.has(activeParent)) {
1347
+ setOwnExpanded(new Set(ownExpanded).add(activeParent));
1348
+ }
1349
+ }
1350
+ const expanded = isControlled ? new Set(expandedIds) : ownExpanded;
1351
+ const commitExpanded = (next) => {
1352
+ if (!isControlled) setOwnExpanded(next);
1353
+ onExpandedChange?.([...next]);
1354
+ };
1355
+ const handleExpandedChange = (keys) => commitExpanded(new Set([...keys].map(String)));
1356
+ const toggleExpanded = (id) => {
1357
+ const next = new Set(expanded);
1358
+ if (!next.delete(id)) next.add(id);
1359
+ commitExpanded(next);
1360
+ };
1361
+ const renderRow = (item, onPress, isGroup) => {
1362
+ const selected = !isGroup && item.id === value;
1363
+ const button = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1364
+ import_react_aria_components18.Button,
1365
+ {
1366
+ className: "pire-sidenav-item",
1367
+ "data-selected": selected ? "true" : void 0,
1368
+ "data-active-child": isGroup && item.id === activeParent ? "true" : void 0,
1369
+ "aria-current": selected ? "page" : void 0,
1370
+ onPress,
1371
+ children: [
1372
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: item.icon, size: 16 }) : null,
1373
+ collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: item.label }),
1374
+ item.count != null && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null
1375
+ ]
1376
+ },
1377
+ item.id
1378
+ );
1379
+ return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
1380
+ };
1381
+ const renderSection = (item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_aria_components18.Disclosure, { id: item.id, className: "pire-sidenav-section", children: [
1382
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1383
+ import_react_aria_components18.Button,
1384
+ {
1385
+ slot: "trigger",
1386
+ className: "pire-sidenav-item",
1387
+ "data-kind": "group",
1388
+ "data-active-child": item.id === activeParent ? "true" : void 0,
1389
+ children: [
1390
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: item.icon, size: 16 }) : null,
1391
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: item.label }),
1392
+ item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null,
1393
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "chevron-down", size: 16, className: "pire-sidenav-chevron" })
1394
+ ]
1395
+ }
1396
+ ),
1397
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.DisclosurePanel, { className: "pire-sidenav-subnav", children: item.items?.map((child) => {
1398
+ const selected = child.id === value;
1399
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1400
+ import_react_aria_components18.Button,
1401
+ {
1402
+ className: "pire-sidenav-item pire-sidenav-subitem",
1403
+ "data-selected": selected ? "true" : void 0,
1404
+ "aria-current": selected ? "page" : void 0,
1405
+ onPress: () => onChange?.(child.id),
1406
+ children: [
1407
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: child.label }),
1408
+ child.count != null ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-sidenav-count", children: child.count }) : null
1409
+ ]
1410
+ },
1411
+ child.id
1412
+ );
1413
+ }) })
1414
+ ] }, item.id);
1220
1415
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1221
1416
  "nav",
1222
1417
  {
@@ -1225,28 +1420,27 @@ function SideNav({ groups, value, onChange, collapsed, footer, className, ...res
1225
1420
  "aria-label": "Main navigation",
1226
1421
  ...rest,
1227
1422
  children: [
1228
- groups.map((group, gi) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "pire-sidenav-group", children: [
1229
- group.label && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pire-sidenav-label", children: group.label }) : null,
1230
- group.items.map((item) => {
1231
- const selected = item.id === value;
1232
- const button = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1233
- import_react_aria_components18.Button,
1423
+ groups.map((group, gi) => {
1424
+ const hasSections = !collapsed && group.items.some((item) => item.items?.length);
1425
+ const rows = group.items.map((item) => {
1426
+ const isGroup = Boolean(item.items?.length);
1427
+ if (isGroup && !collapsed) return renderSection(item);
1428
+ return renderRow(item, () => isGroup ? toggleExpanded(item.id) : onChange?.(item.id), isGroup);
1429
+ });
1430
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "pire-sidenav-group", children: [
1431
+ group.label && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pire-sidenav-label", children: group.label }) : null,
1432
+ hasSections ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1433
+ import_react_aria_components18.DisclosureGroup,
1234
1434
  {
1235
- className: "pire-sidenav-item",
1236
- "data-selected": selected ? "true" : void 0,
1237
- "aria-current": selected ? "page" : void 0,
1238
- onPress: () => onChange?.(item.id),
1239
- children: [
1240
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: item.icon, size: 16 }) : null,
1241
- collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: item.label }),
1242
- item.count != null && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null
1243
- ]
1244
- },
1245
- item.id
1246
- );
1247
- return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
1248
- })
1249
- ] }, group.label ?? gi)),
1435
+ className: "pire-sidenav-tree",
1436
+ allowsMultipleExpanded: true,
1437
+ expandedKeys: expanded,
1438
+ onExpandedChange: handleExpandedChange,
1439
+ children: rows
1440
+ }
1441
+ ) : rows
1442
+ ] }, group.label ?? gi);
1443
+ }),
1250
1444
  footer ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pire-sidenav-footer", children: footer }) : null
1251
1445
  ]
1252
1446
  }