@pyreon/elements 0.12.0 → 0.12.2

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/lib/index.d.ts CHANGED
@@ -254,12 +254,7 @@ interface OverlayContext {
254
254
  setBlocked: () => void;
255
255
  setUnblocked: () => void;
256
256
  }
257
- declare const Component$3: ({
258
- children,
259
- blocked,
260
- setBlocked,
261
- setUnblocked
262
- }: OverlayContext & {
257
+ declare const Component$3: (props: OverlayContext & {
263
258
  children: VNodeChild;
264
259
  }) => _pyreon_core0.VNode;
265
260
  //#endregion
@@ -325,12 +320,7 @@ declare const useOverlay: ({
325
320
  setBlocked: () => void;
326
321
  setUnblocked: () => void;
327
322
  setupListeners: () => () => void;
328
- Provider: ({
329
- children,
330
- blocked,
331
- setBlocked,
332
- setUnblocked
333
- }: OverlayContext & {
323
+ Provider: (props: OverlayContext & {
334
324
  children: _pyreon_core0.VNodeChild;
335
325
  }) => _pyreon_core0.VNode;
336
326
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index2.d.ts","names":[],"sources":["../../src/types.ts","../../src/Element/types.ts","../../src/Element/component.tsx","../../src/helpers/Iterator/types.ts","../../src/helpers/Iterator/component.tsx","../../src/List/component.tsx","../../src/Overlay/context.tsx","../../src/Overlay/useOverlay.tsx","../../src/Overlay/component.tsx","../../src/Portal/component.tsx","../../src/Text/component.tsx","../../src/Util/component.tsx"],"mappings":";;;;;;;KAWK,mBAAA,oBACS,CAAA,IAAK,CAAA,CAAE,CAAA,qCAAsC,CAAA,GAAI,CAAA,CAAE,CAAA;AAAA,KAG5D,EAAA,MAAQ,CAAA,iCAAkC,CAAA,GAAI,CAAA,CAAE,CAAA;AAAA,KAEhD,SAAA,SAAkB,EAAA,CAAG,IAAA,CAAK,CAAA,EAAG,OAAA,OAAc,CAAA,QAAS,CAAA,KAAM,CAAA;AAAA,KAE1D,MAAA,gCAAsC,CAAA,iCACvC,SAAA,CAAU,CAAA,EAAG,MA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AAA,EAAW,eAAA,CAAgB,OAAA;;;KCZrB,OAAA,GAAQ,OAAA;EVFN;;;EUMZ,KAAA,EAAO,UAAA;EVNsD;;;EUU7D,QAAA,EAAU,UAAA;EVXa;;;EUevB,SAAA;EVdmB;;;EUkBnB,GAAA,EAAK,YAAA;EVlB2D;;AAAA;EUsBhE,GAAA,EAAK,SAAA;AAAA,KAEL,oBAAA;AAAA,cAEI,WAAA,EAAW,eAAA,CAAgB,OAAA;EAC/B,MAAA;AAAA;;;UC5Be,OAAA;EXAO;;;EWItB,QAAA,EAAU,UAAA;EXHS;;;EWOnB,SAAA;EXPgE;;;EWWhE,KAAA,GAAQ,MAAA;AAAA;AAAA,cAGJ,WAAA,EAAW,eAAA,CAAgB,OAAA"}
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Provider, alignContent, extendCss, makeItResponsive, value } from "@pyreon/unistyle";
2
- import { Fragment, Portal, createContext, onMount, provide, useContext } from "@pyreon/core";
2
+ import { Fragment, Portal, createContext, onMount, provide, splitProps, useContext } from "@pyreon/core";
3
3
  import { config, isEmpty, omit, pick, render, throttle } from "@pyreon/ui-core";
4
4
  import { Fragment as Fragment$1, jsx, jsxs } from "@pyreon/core/jsx-runtime";
5
5
  import { signal } from "@pyreon/reactivity";
@@ -93,23 +93,37 @@ const StyledComponent = styled$2(component$1)`
93
93
  *
94
94
  * Children are rendered via core `render()`.
95
95
  */
96
- const Component$9 = ({ contentType, tag, parentDirection, direction, alignX, alignY, equalCols, gap, extendCss, children, ...props }) => {
96
+ const Component$9 = (props) => {
97
+ const [own, rest] = splitProps(props, [
98
+ "contentType",
99
+ "tag",
100
+ "parentDirection",
101
+ "direction",
102
+ "alignX",
103
+ "alignY",
104
+ "equalCols",
105
+ "gap",
106
+ "extendCss",
107
+ "children"
108
+ ]);
109
+ const debugProps = IS_DEVELOPMENT ? { "data-pyr-element": own.contentType } : {};
110
+ const stylingProps = {
111
+ contentType: own.contentType,
112
+ parentDirection: own.parentDirection,
113
+ direction: own.direction,
114
+ alignX: own.alignX,
115
+ alignY: own.alignY,
116
+ equalCols: own.equalCols,
117
+ gap: own.gap,
118
+ extraStyles: own.extendCss
119
+ };
97
120
  return /* @__PURE__ */ jsx(StyledComponent, {
98
- as: tag,
99
- $contentType: contentType,
100
- $element: {
101
- contentType,
102
- parentDirection,
103
- direction,
104
- alignX,
105
- alignY,
106
- equalCols,
107
- gap,
108
- extraStyles: extendCss
109
- },
110
- ...IS_DEVELOPMENT ? { "data-pyr-element": contentType } : {},
111
- ...props,
112
- children: render(children)
121
+ as: own.tag,
122
+ $contentType: own.contentType,
123
+ $element: stylingProps,
124
+ ...debugProps,
125
+ ...rest,
126
+ children: render(own.children)
113
127
  });
114
128
  };
115
129
 
@@ -141,7 +155,8 @@ const fullHeightCSS = `
141
155
  `;
142
156
  const blockCSS = `
143
157
  align-self: stretch;
144
- width: 100%;
158
+ flex: 1;
159
+ min-width: 0;
145
160
  `;
146
161
  const childFixPosition = (isBlock) => `display: ${isBlock ? "flex" : "inline-flex"};`;
147
162
  const styles$1 = ({ theme: t, css: cssFn }) => cssFn`
@@ -359,84 +374,125 @@ const defaultDirection = "inline";
359
374
  const defaultContentDirection = "rows";
360
375
  const defaultAlignX = "left";
361
376
  const defaultAlignY = "center";
362
- const Component = ({ innerRef, tag, label, content, children, beforeContent, afterContent, equalBeforeAfter, block, equalCols, gap, direction, alignX = defaultAlignX, alignY = defaultAlignY, css, contentCss, beforeContentCss, afterContentCss, contentDirection = defaultContentDirection, contentAlignX = defaultAlignX, contentAlignY = defaultAlignY, beforeContentDirection = defaultDirection, beforeContentAlignX = defaultAlignX, beforeContentAlignY = defaultAlignY, afterContentDirection = defaultDirection, afterContentAlignX = defaultAlignX, afterContentAlignY = defaultAlignY, ref, ...props }) => {
363
- const shouldBeEmpty = !!props.dangerouslySetInnerHTML || getShouldBeEmpty(tag);
364
- const isSimpleElement = !beforeContent && !afterContent;
365
- const CHILDREN = children ?? content ?? label;
366
- const isInline = isInlineElement(tag);
377
+ const Component = (props) => {
378
+ const [own, rest] = splitProps(props, [
379
+ "innerRef",
380
+ "tag",
381
+ "label",
382
+ "content",
383
+ "children",
384
+ "beforeContent",
385
+ "afterContent",
386
+ "equalBeforeAfter",
387
+ "block",
388
+ "equalCols",
389
+ "gap",
390
+ "direction",
391
+ "alignX",
392
+ "alignY",
393
+ "css",
394
+ "contentCss",
395
+ "beforeContentCss",
396
+ "afterContentCss",
397
+ "contentDirection",
398
+ "contentAlignX",
399
+ "contentAlignY",
400
+ "beforeContentDirection",
401
+ "beforeContentAlignX",
402
+ "beforeContentAlignY",
403
+ "afterContentDirection",
404
+ "afterContentAlignX",
405
+ "afterContentAlignY",
406
+ "ref"
407
+ ]);
408
+ const alignX = own.alignX ?? defaultAlignX;
409
+ const alignY = own.alignY ?? defaultAlignY;
410
+ const contentDirection = own.contentDirection ?? defaultContentDirection;
411
+ const contentAlignX = own.contentAlignX ?? defaultAlignX;
412
+ const contentAlignY = own.contentAlignY ?? defaultAlignY;
413
+ const beforeContentDirection = own.beforeContentDirection ?? defaultDirection;
414
+ const beforeContentAlignX = own.beforeContentAlignX ?? defaultAlignX;
415
+ const beforeContentAlignY = own.beforeContentAlignY ?? defaultAlignY;
416
+ const afterContentDirection = own.afterContentDirection ?? defaultDirection;
417
+ const afterContentAlignX = own.afterContentAlignX ?? defaultAlignX;
418
+ const afterContentAlignY = own.afterContentAlignY ?? defaultAlignY;
419
+ const shouldBeEmpty = !!rest.dangerouslySetInnerHTML || getShouldBeEmpty(own.tag);
420
+ const isSimpleElement = !own.beforeContent && !own.afterContent;
421
+ const CHILDREN = own.children ?? own.content ?? own.label;
422
+ const isInline = isInlineElement(own.tag);
367
423
  const SUB_TAG = isInline ? "span" : void 0;
368
- let wrapperDirection = direction;
424
+ let wrapperDirection = own.direction;
369
425
  let wrapperAlignX = alignX;
370
426
  let wrapperAlignY = alignY;
371
427
  if (isSimpleElement) {
372
428
  if (contentDirection) wrapperDirection = contentDirection;
373
429
  if (contentAlignX) wrapperAlignX = contentAlignX;
374
430
  if (contentAlignY) wrapperAlignY = contentAlignY;
375
- } else if (direction) wrapperDirection = direction;
431
+ } else if (own.direction) wrapperDirection = own.direction;
376
432
  else wrapperDirection = defaultDirection;
377
433
  let equalizeRef = null;
378
- const externalRef = ref ?? innerRef;
434
+ const externalRef = own.ref ?? own.innerRef;
379
435
  const mergedRef = (node) => {
380
436
  equalizeRef = node;
381
437
  if (typeof externalRef === "function") externalRef(node);
382
438
  else if (externalRef != null) externalRef.current = node;
383
439
  };
384
- if (equalBeforeAfter && beforeContent && afterContent) onMount(() => {
385
- if (equalizeRef) equalize(equalizeRef, direction);
440
+ if (own.equalBeforeAfter && own.beforeContent && own.afterContent) onMount(() => {
441
+ if (equalizeRef) equalize(equalizeRef, own.direction);
386
442
  });
387
443
  const WRAPPER_PROPS = {
388
444
  ref: mergedRef,
389
- extendCss: css,
390
- tag,
391
- block,
445
+ extendCss: own.css,
446
+ tag: own.tag,
447
+ block: own.block,
392
448
  direction: wrapperDirection,
393
449
  alignX: wrapperAlignX,
394
450
  alignY: wrapperAlignY,
395
451
  as: void 0
396
452
  };
397
453
  if (shouldBeEmpty) return /* @__PURE__ */ jsx(Wrapper_default, {
398
- ...props,
454
+ ...rest,
399
455
  ...WRAPPER_PROPS
400
456
  });
401
457
  return /* @__PURE__ */ jsxs(Wrapper_default, {
402
- ...props,
458
+ ...rest,
403
459
  ...WRAPPER_PROPS,
404
460
  isInline,
405
461
  children: [
406
- beforeContent && /* @__PURE__ */ jsx(Content_default, {
462
+ own.beforeContent && /* @__PURE__ */ jsx(Content_default, {
407
463
  tag: SUB_TAG,
408
464
  contentType: "before",
409
465
  parentDirection: wrapperDirection,
410
- extendCss: beforeContentCss,
466
+ extendCss: own.beforeContentCss,
411
467
  direction: beforeContentDirection,
412
468
  alignX: beforeContentAlignX,
413
469
  alignY: beforeContentAlignY,
414
- equalCols,
415
- gap,
416
- children: beforeContent
470
+ equalCols: own.equalCols,
471
+ gap: own.gap,
472
+ children: own.beforeContent
417
473
  }),
418
474
  isSimpleElement ? render(CHILDREN) : /* @__PURE__ */ jsx(Content_default, {
419
475
  tag: SUB_TAG,
420
476
  contentType: "content",
421
477
  parentDirection: wrapperDirection,
422
- extendCss: contentCss,
478
+ extendCss: own.contentCss,
423
479
  direction: contentDirection,
424
480
  alignX: contentAlignX,
425
481
  alignY: contentAlignY,
426
- equalCols,
482
+ equalCols: own.equalCols,
427
483
  children: CHILDREN
428
484
  }),
429
- afterContent && /* @__PURE__ */ jsx(Content_default, {
485
+ own.afterContent && /* @__PURE__ */ jsx(Content_default, {
430
486
  tag: SUB_TAG,
431
487
  contentType: "after",
432
488
  parentDirection: wrapperDirection,
433
- extendCss: afterContentCss,
489
+ extendCss: own.afterContentCss,
434
490
  direction: afterContentDirection,
435
491
  alignX: afterContentAlignX,
436
492
  alignY: afterContentAlignY,
437
- equalCols,
438
- gap,
439
- children: afterContent
493
+ equalCols: own.equalCols,
494
+ gap: own.gap,
495
+ children: own.afterContent
440
496
  })
441
497
  ]
442
498
  });
@@ -627,13 +683,13 @@ Component$1.PYREON__COMPONENT = name$4;
627
683
  //#region src/Overlay/context.tsx
628
684
  const context = createContext({});
629
685
  const useOverlayContext = () => useContext(context);
630
- const Component$3 = ({ children, blocked, setBlocked, setUnblocked }) => {
686
+ const Component$3 = (props) => {
631
687
  provide(context, {
632
- blocked,
633
- setBlocked,
634
- setUnblocked
688
+ blocked: props.blocked,
689
+ setBlocked: props.setBlocked,
690
+ setUnblocked: props.setUnblocked
635
691
  });
636
- return /* @__PURE__ */ jsx(Fragment$1, { children });
692
+ return /* @__PURE__ */ jsx(Fragment$1, { children: props.children });
637
693
  };
638
694
 
639
695
  //#endregion
@@ -1016,9 +1072,18 @@ const useOverlay = ({ isOpen = false, openOn = "click", closeOn = "click", type
1016
1072
  //#endregion
1017
1073
  //#region src/Overlay/component.tsx
1018
1074
  const IS_BROWSER = typeof window !== "undefined";
1019
- const Component$2 = ({ children, trigger, DOMLocation, triggerRefName = "ref", contentRefName = "ref", ...props }) => {
1020
- const { active, triggerRef, contentRef, showContent, hideContent, align, alignX, alignY, setupListeners, Provider, ...ctx } = useOverlay(props);
1021
- const { openOn, closeOn, type } = props;
1075
+ const Component$2 = (props) => {
1076
+ const [own, overlayProps] = splitProps(props, [
1077
+ "children",
1078
+ "trigger",
1079
+ "DOMLocation",
1080
+ "triggerRefName",
1081
+ "contentRefName"
1082
+ ]);
1083
+ const triggerRefName = own.triggerRefName ?? "ref";
1084
+ const contentRefName = own.contentRefName ?? "ref";
1085
+ const { active, triggerRef, contentRef, showContent, hideContent, align, alignX, alignY, setupListeners, Provider, ...ctx } = useOverlay(overlayProps);
1086
+ const { openOn, closeOn, type } = overlayProps;
1022
1087
  const passHandlers = openOn === "manual" || closeOn === "manual" || closeOn === "clickOutsideContent";
1023
1088
  const ariaHasPopup = (() => {
1024
1089
  switch (type) {
@@ -1030,7 +1095,7 @@ const Component$2 = ({ children, trigger, DOMLocation, triggerRefName = "ref", c
1030
1095
  onMount(() => {
1031
1096
  return setupListeners();
1032
1097
  });
1033
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [render(trigger, {
1098
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [render(own.trigger, {
1034
1099
  [triggerRefName]: triggerRef,
1035
1100
  active: active(),
1036
1101
  "aria-expanded": active(),
@@ -1040,10 +1105,10 @@ const Component$2 = ({ children, trigger, DOMLocation, triggerRefName = "ref", c
1040
1105
  hideContent
1041
1106
  } : {}
1042
1107
  }), () => IS_BROWSER && active() ? /* @__PURE__ */ jsx(Portal, {
1043
- target: DOMLocation ?? document.body,
1108
+ target: own.DOMLocation ?? document.body,
1044
1109
  children: /* @__PURE__ */ jsx(Provider, {
1045
1110
  ...ctx,
1046
- children: render(children, {
1111
+ children: render(own.children, {
1047
1112
  [contentRefName]: contentRef,
1048
1113
  role: type === "modal" ? "dialog" : void 0,
1049
1114
  "aria-modal": type === "modal" ? true : void 0,
@@ -1066,12 +1131,12 @@ Component$2.PYREON__COMPONENT = name$3;
1066
1131
 
1067
1132
  //#endregion
1068
1133
  //#region src/Portal/component.tsx
1069
- const Component$4 = ({ DOMLocation, tag: _tag = "div", children }) => {
1070
- const target = DOMLocation ?? (typeof document !== "undefined" ? document.body : void 0);
1134
+ const Component$4 = (props) => {
1135
+ const target = props.DOMLocation ?? (typeof document !== "undefined" ? document.body : void 0);
1071
1136
  if (!target) return null;
1072
1137
  return /* @__PURE__ */ jsx(Portal, {
1073
1138
  target,
1074
- children
1139
+ children: props.children
1075
1140
  });
1076
1141
  };
1077
1142
  const name$2 = `${PKG_NAME}/Portal`;
@@ -1108,16 +1173,30 @@ var styled_default = styled(textComponent)`
1108
1173
 
1109
1174
  //#endregion
1110
1175
  //#region src/Text/component.tsx
1111
- const Component$5 = ({ paragraph, label, children, tag, css, ref, ...props }) => {
1176
+ /**
1177
+ * Text component for rendering inline or block-level text. Supports a
1178
+ * `paragraph` shorthand that automatically renders as a `<p>` tag, or
1179
+ * a custom `tag` for semantic HTML (h1-h6, span, etc.). Marked with
1180
+ * a static `isText` flag so other components can detect text children.
1181
+ */
1182
+ const Component$5 = (props) => {
1183
+ const [own, rest] = splitProps(props, [
1184
+ "paragraph",
1185
+ "label",
1186
+ "children",
1187
+ "tag",
1188
+ "css",
1189
+ "ref"
1190
+ ]);
1112
1191
  let finalTag;
1113
- if (paragraph) finalTag = "p";
1114
- else finalTag = tag;
1192
+ if (own.paragraph) finalTag = "p";
1193
+ else finalTag = own.tag;
1115
1194
  return /* @__PURE__ */ jsx(styled_default, {
1116
- ref,
1195
+ ref: own.ref,
1117
1196
  as: finalTag,
1118
- $text: { extraStyles: css },
1119
- ...props,
1120
- children: children ?? label
1197
+ $text: { extraStyles: own.css },
1198
+ ...rest,
1199
+ children: own.children ?? own.label
1121
1200
  });
1122
1201
  };
1123
1202
  const name$1 = `${PKG_NAME}/Text`;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["styles","component","Component","Styled","component","styles","Component","Styled","component","Wrapper","Content","name","Component","component","Component","Iterator","Element","name","Component","Component","name","Component","CorePortal","name","Component","Styled","name","Component"],"sources":["../src/constants.ts","../src/utils.ts","../src/helpers/Content/styled.ts","../src/helpers/Content/component.tsx","../src/helpers/Content/index.ts","../src/helpers/Wrapper/styled.ts","../src/helpers/Wrapper/constants.ts","../src/helpers/Wrapper/utils.ts","../src/helpers/Wrapper/component.tsx","../src/helpers/Wrapper/index.ts","../src/Element/constants.ts","../src/Element/utils.ts","../src/Element/component.tsx","../src/helpers/Iterator/component.tsx","../src/helpers/Iterator/index.ts","../src/List/component.tsx","../src/Overlay/context.tsx","../src/Overlay/useOverlay.tsx","../src/Overlay/component.tsx","../src/Portal/component.tsx","../src/Text/styled.ts","../src/Text/component.tsx","../src/Util/component.tsx"],"sourcesContent":["export const PKG_NAME = '@pyreon/elements' as const\n","export const IS_DEVELOPMENT = process.env.NODE_ENV !== 'production'\n","/**\n * Styled component for content areas (before/content/after). Applies\n * responsive flex alignment, gap spacing between slots based on parent\n * direction (margin-right for inline, margin-bottom for rows), and\n * equalCols flex distribution. The \"content\" slot gets `flex: 1` to\n * fill remaining space between before and after.\n */\nimport { config } from '@pyreon/ui-core'\nimport { alignContent, extendCss, makeItResponsive, value } from '@pyreon/unistyle'\nimport type { ResponsiveStylesCallback } from '../../types'\nimport type { StyledProps, ThemeProps } from './types'\n\nconst { styled, css, component } = config\n\nconst equalColsCSS = `\n flex: 1;\n`\n\nconst typeContentCSS = `\n flex: 1;\n`\n\n// --------------------------------------------------------\n// calculate spacing between before / content / after\n// --------------------------------------------------------\nconst gapDimensions = {\n inline: {\n before: 'margin-right',\n after: 'margin-left',\n },\n reverseInline: {\n before: 'margin-right',\n after: 'margin-left',\n },\n rows: {\n before: 'margin-bottom',\n after: 'margin-top',\n },\n reverseRows: {\n before: 'margin-bottom',\n after: 'margin-top',\n },\n} as const\n\nconst calculateGap = ({\n direction,\n type,\n value: gapValue,\n}: {\n direction: keyof typeof gapDimensions\n type: ThemeProps['contentType']\n value: string | number | null | undefined\n}) => {\n if (!direction || !type || type === 'content') return undefined\n\n const finalStyles = `${gapDimensions[direction][type]}: ${gapValue};`\n\n return finalStyles\n}\n\n// --------------------------------------------------------\n// calculations of styles to be rendered\n// --------------------------------------------------------\nconst styles: ResponsiveStylesCallback = ({ css: cssFn, theme: t, rootSize }) => cssFn`\n ${alignContent({\n direction: t.direction,\n alignX: t.alignX,\n alignY: t.alignY,\n })};\n\n ${t.equalCols && equalColsCSS};\n\n ${\n t.gap &&\n t.contentType &&\n calculateGap({\n direction: t.parentDirection,\n type: t.contentType,\n value: value(t.gap, rootSize),\n })\n };\n\n ${t.extraStyles && extendCss(t.extraStyles as Parameters<typeof extendCss>[0])};\n`\n\nconst platformCSS = `box-sizing: border-box;`\n\nconst StyledComponent = styled(component)`\n ${platformCSS};\n\n display: flex;\n align-self: stretch;\n flex-wrap: wrap;\n\n ${(({ $contentType }: StyledProps) => $contentType === 'content' && typeContentCSS) as any};\n\n ${makeItResponsive({\n key: '$element',\n styles,\n css,\n normalize: true,\n })};\n`\n\nexport default StyledComponent\n","/**\n * Content area used inside Element to render one of the three\n * layout slots (before, content, after). Passes alignment, direction,\n * gap, and equalCols styling props to the underlying styled component.\n * Adds a `data-pyr-element` attribute in development for debugging.\n *\n * Children are rendered via core `render()`.\n */\nimport { splitProps } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { IS_DEVELOPMENT } from '../../utils'\nimport Styled from './styled'\nimport type { Props } from './types'\n\nconst Component = (props: Partial<Props>) => {\n const [own, rest] = splitProps(props, [\n 'contentType',\n 'tag',\n 'parentDirection',\n 'direction',\n 'alignX',\n 'alignY',\n 'equalCols',\n 'gap',\n 'extendCss',\n 'children',\n ])\n\n const debugProps = IS_DEVELOPMENT\n ? {\n 'data-pyr-element': own.contentType,\n }\n : {}\n\n const stylingProps = {\n contentType: own.contentType,\n parentDirection: own.parentDirection,\n direction: own.direction,\n alignX: own.alignX,\n alignY: own.alignY,\n equalCols: own.equalCols,\n gap: own.gap,\n extraStyles: own.extendCss,\n }\n\n return (\n <Styled as={own.tag} $contentType={own.contentType} $element={stylingProps} {...debugProps} {...rest}>\n {render(own.children)}\n </Styled>\n )\n}\n\nexport default Component\n","import component from './component'\n\nexport default component\n","/**\n * Styled component for the Element wrapper layer. Handles responsive\n * block/inline-flex display, direction, alignment, and custom CSS injection.\n * Includes special handling for the `parentFix` / `childFix` flags that\n * split flex behavior across two DOM nodes for button/fieldset/legend\n * elements where a single flex container is insufficient.\n */\nimport { config } from '@pyreon/ui-core'\nimport { alignContent, extendCss, makeItResponsive } from '@pyreon/unistyle'\nimport type { ResponsiveStylesCallback } from '../../types'\nimport type { StyledProps } from './types'\n\nconst { styled, css, component } = config\n\nconst childFixCSS = `\n display: flex;\n flex: 1;\n width: 100%;\n height: 100%;\n`\n\nconst parentFixCSS = `\n flex-direction: column;\n`\n\nconst fullHeightCSS = `\n height: 100%;\n`\n\nconst blockCSS = `\n align-self: stretch;\n flex: 1;\n min-width: 0;\n`\n\nconst childFixPosition = (isBlock?: boolean) => `display: ${isBlock ? 'flex' : 'inline-flex'};`\n\nconst styles: ResponsiveStylesCallback = ({ theme: t, css: cssFn }) => cssFn`\n ${t.alignY === 'block' && fullHeightCSS};\n\n ${alignContent({\n direction: t.direction,\n alignX: t.alignX,\n alignY: t.alignY,\n })};\n\n ${t.block && blockCSS};\n ${t.alignY === 'block' && t.block && fullHeightCSS};\n\n ${!t.childFix && childFixPosition(t.block)};\n ${t.parentFix && parentFixCSS};\n\n ${t.extraStyles && extendCss(t.extraStyles as Parameters<typeof extendCss>[0])};\n`\n\nconst platformCSS = `box-sizing: border-box;`\n\nexport default styled(component)`\n position: relative;\n ${platformCSS};\n\n ${(({ $childFix }: StyledProps) => $childFix && childFixCSS) as any};\n\n ${makeItResponsive({\n key: '$element',\n styles,\n css,\n normalize: true,\n })};\n`\n","/**\n * HTML elements that need a two-layer DOM workaround because browsers do not\n * fully support flexbox layout on button, fieldset, and legend elements.\n * @see https://stackoverflow.com/questions/35464067/flexbox-not-working-on-button-or-fieldset-elements\n */\nexport const INLINE_ELEMENTS_FLEX_FIX = {\n button: true,\n fieldset: true,\n legend: true,\n}\n","import { INLINE_ELEMENTS_FLEX_FIX } from './constants'\n\ntype IsWebFixNeeded = (tag?: string) => boolean\nexport const isWebFixNeeded: IsWebFixNeeded = (tag) => {\n if (tag && tag in INLINE_ELEMENTS_FLEX_FIX) return true\n return false\n}\n","/**\n * Wrapper component that serves as the outermost styled container for Element.\n * On web, it detects button/fieldset/legend tags and applies a two-layer flex\n * fix (parent + child Styled) because these HTML elements do not natively\n * support `display: flex` consistently across browsers.\n */\nimport { IS_DEVELOPMENT } from '../../utils'\nimport Styled from './styled'\nimport type { Props } from './types'\nimport { isWebFixNeeded } from './utils'\n\nconst DEV_PROPS: Record<string, string> = IS_DEVELOPMENT ? { 'data-pyr-element': 'Element' } : {}\n\nconst Component = ({\n children,\n tag,\n block,\n extendCss,\n direction,\n alignX,\n alignY,\n equalCols,\n isInline,\n ref,\n ...props\n}: Partial<Props> & { ref?: any }) => {\n const COMMON_PROPS = {\n ...props,\n ...DEV_PROPS,\n ref,\n as: tag,\n }\n\n const needsFix = !props.dangerouslySetInnerHTML && isWebFixNeeded(tag)\n\n const normalElement = {\n block,\n direction,\n alignX,\n alignY,\n equalCols,\n extraStyles: extendCss,\n }\n\n const parentFixElement = {\n parentFix: true as const,\n block,\n extraStyles: extendCss,\n }\n\n const childFixElement = {\n childFix: true as const,\n direction,\n alignX,\n alignY,\n equalCols,\n }\n\n if (!needsFix) {\n return (\n <Styled {...COMMON_PROPS} $element={normalElement}>\n {children}\n </Styled>\n )\n }\n\n const asTag = isInline ? 'span' : 'div'\n\n return (\n <Styled {...COMMON_PROPS} $element={parentFixElement}>\n <Styled as={asTag} $childFix $element={childFixElement}>\n {children}\n </Styled>\n </Styled>\n )\n}\n\nexport default Component\n","import component from './component'\n\nexport default component\n","/** Props consumed by Element that should not be forwarded to the underlying DOM node. */\nexport const RESERVED_PROPS = [\n 'innerRef',\n 'tag',\n 'block',\n 'label',\n 'children',\n 'beforeContent',\n 'afterContent',\n\n 'equalCols',\n 'vertical',\n 'direction',\n 'alignX',\n 'alignY',\n\n 'css',\n 'contentCss',\n 'beforeContentCss',\n 'afterContentCss',\n\n 'contentDirection',\n 'contentAlignX',\n 'contentAlignY',\n\n 'beforeContentDirection',\n 'beforeContentAlignX',\n 'beforeContentAlignY',\n\n 'afterContentDirection',\n 'afterContentAlignX',\n 'afterContentAlignY',\n] as const\n\n/**\n * HTML tags that are inline-level by default. When Element renders one of\n * these tags, child Content wrappers use `span` instead of `div` to\n * preserve valid HTML nesting.\n */\nexport const INLINE_ELEMENTS = {\n span: true,\n a: true,\n button: true,\n input: true,\n label: true,\n select: true,\n textarea: true,\n br: true,\n img: true,\n strong: true,\n small: true,\n code: true,\n b: true,\n big: true,\n i: true,\n tt: true,\n abbr: true,\n acronym: true,\n cite: true,\n dfn: true,\n em: true,\n kbd: true,\n samp: true,\n var: true,\n bdo: true,\n map: true,\n object: true,\n q: true,\n script: true,\n sub: true,\n sup: true,\n}\n\n/**\n * HTML void/self-closing elements that cannot have children. When Element\n * detects one of these tags, it skips rendering beforeContent/content/afterContent\n * and returns the Wrapper alone.\n */\nexport const EMPTY_ELEMENTS = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n textarea: true,\n // 'meta': true,\n // 'param': true,\n source: true,\n track: true,\n wbr: true,\n}\n","import { EMPTY_ELEMENTS, INLINE_ELEMENTS } from './constants'\n\ntype GetValue = (tag?: string) => boolean\n\n/** Checks whether the given HTML tag is an inline-level element, used to determine sub-tag nesting. */\nexport const isInlineElement: GetValue = (tag) => {\n if (tag && tag in INLINE_ELEMENTS) return true\n return false\n}\n\n/** Checks whether the given HTML tag is a void element that cannot have children. */\nexport const getShouldBeEmpty: GetValue = (tag) => {\n if (tag && tag in EMPTY_ELEMENTS) return true\n return false\n}\n","/**\n * Core building block of the elements package. Renders a three-section layout\n * (beforeContent / content / afterContent) inside a flex Wrapper. When only\n * content is present, the Wrapper inherits content-level alignment directly\n * to avoid an unnecessary nesting layer. Handles HTML-specific edge cases\n * like void elements (input, img) and inline elements (span, a) by\n * skipping children or switching sub-tags accordingly.\n */\n\nimport { onMount, splitProps } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport { Content, Wrapper } from '../helpers'\nimport type { PyreonElement } from './types'\nimport { getShouldBeEmpty, isInlineElement } from './utils'\n\nconst equalize = (el: HTMLElement, direction: unknown) => {\n const beforeEl = el.firstElementChild as HTMLElement | null\n const afterEl = el.lastElementChild as HTMLElement | null\n\n if (beforeEl && afterEl && beforeEl !== afterEl) {\n const type: 'height' | 'width' = direction === 'rows' ? 'height' : 'width'\n const prop = type === 'height' ? 'offsetHeight' : 'offsetWidth'\n const beforeSize = beforeEl[prop]\n const afterSize = afterEl[prop]\n\n if (Number.isInteger(beforeSize) && Number.isInteger(afterSize)) {\n const maxSize = `${Math.max(beforeSize, afterSize)}px`\n beforeEl.style[type] = maxSize\n afterEl.style[type] = maxSize\n }\n }\n}\n\nconst defaultDirection = 'inline'\nconst defaultContentDirection = 'rows'\nconst defaultAlignX = 'left'\nconst defaultAlignY = 'center'\n\nconst Component: PyreonElement = (props) => {\n const [own, rest] = splitProps(props, [\n 'innerRef',\n 'tag',\n 'label',\n 'content',\n 'children',\n 'beforeContent',\n 'afterContent',\n 'equalBeforeAfter',\n 'block',\n 'equalCols',\n 'gap',\n 'direction',\n 'alignX',\n 'alignY',\n 'css',\n 'contentCss',\n 'beforeContentCss',\n 'afterContentCss',\n 'contentDirection',\n 'contentAlignX',\n 'contentAlignY',\n 'beforeContentDirection',\n 'beforeContentAlignX',\n 'beforeContentAlignY',\n 'afterContentDirection',\n 'afterContentAlignX',\n 'afterContentAlignY',\n 'ref',\n ])\n\n const alignX = own.alignX ?? defaultAlignX\n const alignY = own.alignY ?? defaultAlignY\n const contentDirection = own.contentDirection ?? defaultContentDirection\n const contentAlignX = own.contentAlignX ?? defaultAlignX\n const contentAlignY = own.contentAlignY ?? defaultAlignY\n const beforeContentDirection = own.beforeContentDirection ?? defaultDirection\n const beforeContentAlignX = own.beforeContentAlignX ?? defaultAlignX\n const beforeContentAlignY = own.beforeContentAlignY ?? defaultAlignY\n const afterContentDirection = own.afterContentDirection ?? defaultDirection\n const afterContentAlignX = own.afterContentAlignX ?? defaultAlignX\n const afterContentAlignY = own.afterContentAlignY ?? defaultAlignY\n\n // --------------------------------------------------------\n // check if should render only single element\n // --------------------------------------------------------\n const shouldBeEmpty = !!rest.dangerouslySetInnerHTML || getShouldBeEmpty(own.tag)\n\n // --------------------------------------------------------\n // if not single element, calculate values\n // --------------------------------------------------------\n const isSimpleElement = !own.beforeContent && !own.afterContent\n const CHILDREN = own.children ?? own.content ?? own.label\n\n const isInline = isInlineElement(own.tag)\n const SUB_TAG = isInline ? 'span' : undefined\n\n // --------------------------------------------------------\n // direction & alignX & alignY calculations\n // --------------------------------------------------------\n let wrapperDirection: typeof own.direction = own.direction\n let wrapperAlignX: typeof alignX = alignX\n let wrapperAlignY: typeof alignY = alignY\n\n if (isSimpleElement) {\n if (contentDirection) wrapperDirection = contentDirection\n if (contentAlignX) wrapperAlignX = contentAlignX\n if (contentAlignY) wrapperAlignY = contentAlignY\n } else if (own.direction) {\n wrapperDirection = own.direction\n } else {\n wrapperDirection = defaultDirection\n }\n\n // --------------------------------------------------------\n // equalBeforeAfter: measure & equalize slot dimensions\n // --------------------------------------------------------\n let equalizeRef: HTMLElement | null = null\n const externalRef = own.ref ?? own.innerRef\n\n const mergedRef = (node: HTMLElement | null) => {\n equalizeRef = node\n if (typeof externalRef === 'function') externalRef(node)\n else if (externalRef != null) {\n ;(externalRef as unknown as { current: HTMLElement | null }).current = node\n }\n }\n\n if (own.equalBeforeAfter && own.beforeContent && own.afterContent) {\n onMount(() => {\n if (equalizeRef) equalize(equalizeRef, own.direction)\n return undefined\n })\n }\n\n // --------------------------------------------------------\n // common wrapper props\n // --------------------------------------------------------\n const WRAPPER_PROPS = {\n ref: mergedRef,\n extendCss: own.css,\n tag: own.tag,\n block: own.block,\n direction: wrapperDirection,\n alignX: wrapperAlignX,\n alignY: wrapperAlignY,\n as: undefined, // reset styled-components `as` prop\n }\n\n // --------------------------------------------------------\n // return simple/empty element like input or image etc.\n // --------------------------------------------------------\n if (shouldBeEmpty) {\n return <Wrapper {...rest} {...WRAPPER_PROPS} />\n }\n\n return (\n <Wrapper {...rest} {...WRAPPER_PROPS} isInline={isInline}>\n {own.beforeContent && (\n <Content\n tag={SUB_TAG}\n contentType=\"before\"\n parentDirection={wrapperDirection}\n extendCss={own.beforeContentCss}\n direction={beforeContentDirection}\n alignX={beforeContentAlignX}\n alignY={beforeContentAlignY}\n equalCols={own.equalCols}\n gap={own.gap}\n >\n {own.beforeContent}\n </Content>\n )}\n\n {isSimpleElement ? (\n render(CHILDREN)\n ) : (\n <Content\n tag={SUB_TAG}\n contentType=\"content\"\n parentDirection={wrapperDirection}\n extendCss={own.contentCss}\n direction={contentDirection}\n alignX={contentAlignX}\n alignY={contentAlignY}\n equalCols={own.equalCols}\n >\n {CHILDREN}\n </Content>\n )}\n\n {own.afterContent && (\n <Content\n tag={SUB_TAG}\n contentType=\"after\"\n parentDirection={wrapperDirection}\n extendCss={own.afterContentCss}\n direction={afterContentDirection}\n alignX={afterContentAlignX}\n alignY={afterContentAlignY}\n equalCols={own.equalCols}\n gap={own.gap}\n >\n {own.afterContent}\n </Content>\n )}\n </Wrapper>\n )\n}\n\nconst name = `${PKG_NAME}/Element` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","/**\n * Data-driven list renderer that supports three input modes: children,\n * an array of primitives, or an array of objects.\n * Each item receives positional metadata (first, last, odd, even, position)\n * and optional injected props via `itemProps`. Items can be individually\n * wrapped with `wrapComponent`. Children always take priority over the\n * component+data prop pattern.\n */\n\nimport type { VNode, VNodeChild } from '@pyreon/core'\nimport { Fragment } from '@pyreon/core'\nimport { isEmpty, render } from '@pyreon/ui-core'\nimport type { ExtendedProps, ObjectValue, Props, SimpleValue } from './types'\n\ntype ClassifiedData =\n | { type: 'simple'; data: SimpleValue[] }\n | { type: 'complex'; data: ObjectValue[] }\n | null\n\nconst classifyData = (data: unknown[]): ClassifiedData => {\n const items = data.filter(\n (item) =>\n item != null && !(typeof item === 'object' && isEmpty(item as Record<string, unknown>)),\n )\n\n if (items.length === 0) return null\n\n let isSimple = true\n let isComplex = true\n\n for (const item of items) {\n if (typeof item === 'string' || typeof item === 'number') {\n isComplex = false\n } else if (typeof item === 'object') {\n isSimple = false\n } else {\n isSimple = false\n isComplex = false\n }\n }\n\n if (isSimple) return { type: 'simple', data: items as SimpleValue[] }\n if (isComplex) return { type: 'complex', data: items as ObjectValue[] }\n return null\n}\n\nconst RESERVED_PROPS = [\n 'children',\n 'component',\n 'wrapComponent',\n 'data',\n 'itemKey',\n 'valueName',\n 'itemProps',\n 'wrapProps',\n] as const\n\ntype AttachItemProps = ({ i, length }: { i: number; length: number }) => ExtendedProps\n\nconst attachItemProps: AttachItemProps = ({ i, length }: { i: number; length: number }) => {\n const position = i + 1\n\n return {\n index: i,\n first: position === 1,\n last: position === length,\n odd: position % 2 === 1,\n even: position % 2 === 0,\n position,\n }\n}\n\nconst Component = (props: Props) => {\n const {\n itemKey,\n valueName,\n children,\n component,\n data,\n wrapComponent: Wrapper,\n wrapProps,\n itemProps,\n } = props\n\n const injectItemProps = typeof itemProps === 'function' ? itemProps : () => itemProps\n\n const injectWrapItemProps = typeof wrapProps === 'function' ? wrapProps : () => wrapProps\n\n const getKey = (item: string | number, index: number) => {\n if (typeof itemKey === 'function') return itemKey(item, index)\n return index\n }\n\n const renderChild = (child: VNodeChild, total = 1, i = 0) => {\n if (!itemProps && !Wrapper) return child\n\n const extendedProps = attachItemProps({\n i,\n length: total,\n })\n\n const finalItemProps = itemProps ? injectItemProps({}, extendedProps) : {}\n\n if (Wrapper) {\n const finalWrapProps = wrapProps ? injectWrapItemProps({}, extendedProps) : {}\n\n return (\n <Wrapper key={i} {...finalWrapProps}>\n {render(child, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(child, {\n key: i,\n ...finalItemProps,\n })\n }\n\n // --------------------------------------------------------\n // render children\n // --------------------------------------------------------\n const renderChildren = () => {\n if (!children) return null\n\n // if children is Array\n if (Array.isArray(children)) {\n return children.map((item, i) => renderChild(item, children.length, i))\n }\n\n // if children is Fragment — check VNode type\n if (\n typeof children === 'object' &&\n 'type' in (children as VNode) &&\n (children as VNode).type === Fragment\n ) {\n const fragmentChildren = (children as VNode).children as VNodeChild[]\n const childrenLength = fragmentChildren.length\n\n return fragmentChildren.map((item, i) => renderChild(item, childrenLength, i))\n }\n\n // if single child\n return renderChild(children)\n }\n\n // --------------------------------------------------------\n // render array of strings or numbers\n // --------------------------------------------------------\n const renderSimpleArray = (simpleData: SimpleValue[]) => {\n const { length } = simpleData\n\n if (length === 0) return null\n\n return simpleData.map((item, i) => {\n const key = getKey(item, i)\n const keyName = valueName ?? 'children'\n const extendedProps = attachItemProps({\n i,\n length,\n })\n\n const finalItemProps = {\n ...(itemProps ? injectItemProps({ [keyName]: item }, extendedProps) : {}),\n [keyName]: item,\n }\n\n if (Wrapper) {\n const finalWrapProps = wrapProps\n ? injectWrapItemProps({ [keyName]: item }, extendedProps)\n : {}\n\n return (\n <Wrapper key={key} {...finalWrapProps}>\n {render(component, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(component, { key, ...finalItemProps })\n })\n }\n\n // --------------------------------------------------------\n // render array of objects\n // --------------------------------------------------------\n const getObjectKey = (item: ObjectValue, index: number) => {\n if (!itemKey) return item.key ?? item.id ?? item.itemId ?? index\n if (typeof itemKey === 'function') return itemKey(item, index)\n if (typeof itemKey === 'string') return item[itemKey]\n\n return index\n }\n\n const renderComplexArray = (complexData: ObjectValue[]) => {\n const { length } = complexData\n\n if (length === 0) return null\n\n return complexData.map((item, i) => {\n const { component: itemComponent, ...restItem } = item\n const renderItem = itemComponent ?? component\n const key = getObjectKey(restItem, i)\n const extendedProps = attachItemProps({\n i,\n length,\n })\n\n const finalItemProps = {\n ...(itemProps ? injectItemProps(item, extendedProps) : {}),\n ...restItem,\n }\n\n if (Wrapper && !itemComponent) {\n const finalWrapProps = wrapProps ? injectWrapItemProps(item, extendedProps) : {}\n\n return (\n <Wrapper key={key} {...finalWrapProps}>\n {render(renderItem, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(renderItem, { key, ...finalItemProps })\n })\n }\n\n // --------------------------------------------------------\n // render list items\n // --------------------------------------------------------\n const renderItems = (): VNodeChild => {\n // children have priority over props component + data\n if (children) return renderChildren() as VNodeChild\n\n // render props component + data\n if (component && Array.isArray(data)) {\n const classified = classifyData(data)\n if (!classified) return null\n if (classified.type === 'simple') return renderSimpleArray(classified.data) as VNodeChild\n return renderComplexArray(classified.data) as VNodeChild\n }\n\n return null\n }\n\n return renderItems()\n}\n\nexport default Object.assign(Component, {\n isIterator: true as const,\n RESERVED_PROPS,\n})\n","import component from './component'\nimport type {\n ElementType,\n ExtendedProps,\n ObjectValue,\n Props,\n PropsCallback,\n SimpleValue,\n} from './types'\n\nexport type { ElementType, ExtendedProps, ObjectValue, Props, PropsCallback, SimpleValue }\n\nexport default component\n","/**\n * List component that combines Iterator (data-driven rendering) with an\n * optional Element root wrapper. When `rootElement` is false (default),\n * it renders a bare Iterator as a fragment. When true, the Iterator output\n * is wrapped in an Element that receives all non-iterator props (e.g.,\n * layout, alignment, css), allowing the list to be styled as a single block.\n */\nimport { omit, pick } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { ElementProps, PyreonElement } from '../Element'\nimport { Element } from '../Element'\nimport type { Props as IteratorProps } from '../helpers/Iterator'\nimport Iterator from '../helpers/Iterator'\nimport type { MergeTypes } from '../types'\n\ntype ListProps = {\n /**\n * A boolean value. When set to `false`, component returns fragment.\n * When set to `true`, component returns as the **root** element `Element`\n * component.\n */\n rootElement?: boolean\n /**\n * Label prop from `Element` component is being ignored.\n */\n label: never\n /**\n * Content prop from `Element` component is being ignored.\n */\n content: never\n}\n\nexport type Props = MergeTypes<[IteratorProps, ListProps]>\n\nconst Component: PyreonElement<Props> = (({\n rootElement = false,\n ref,\n ...props\n}: Partial<Props & ElementProps>) => {\n const renderedList = <Iterator {...pick(props, Iterator.RESERVED_PROPS)} />\n\n if (!rootElement) return renderedList\n\n return (\n <Element {...(ref ? { ref } : {})} {...omit(props, Iterator.RESERVED_PROPS)}>\n {renderedList}\n </Element>\n )\n}) as PyreonElement<Props>\n\nconst name = `${PKG_NAME}/List` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","/**\n * Context for nested overlay coordination. When a child overlay opens, it\n * sets the parent's blocked state to true, preventing the parent from\n * closing in response to click/hover events that belong to the child.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { createContext, provide, useContext } from '@pyreon/core'\n\nexport interface OverlayContext {\n blocked: boolean | (() => boolean)\n setBlocked: () => void\n setUnblocked: () => void\n}\n\nconst context = createContext<OverlayContext>({} as OverlayContext)\n\nexport const useOverlayContext = () => useContext(context)\n\nconst Component = (props: OverlayContext & { children: VNodeChild }) => {\n const ctx = {\n blocked: props.blocked,\n setBlocked: props.setBlocked,\n setUnblocked: props.setUnblocked,\n }\n\n provide(context, ctx)\n\n return <>{props.children}</>\n}\n\nexport default Component\n","/**\n * Core hook powering the Overlay component. Manages open/close state, DOM\n * event listeners (click, hover, scroll, resize, ESC key), and dynamic\n * positioning of overlay content relative to its trigger. Supports dropdown,\n * tooltip, popover, and modal types with automatic edge-of-viewport flipping.\n * Event handlers are throttled for performance, and nested overlay blocking\n * is coordinated through the overlay context.\n */\n\nimport { signal } from '@pyreon/reactivity'\nimport { throttle } from '@pyreon/ui-core'\nimport { value } from '@pyreon/unistyle'\nimport { IS_DEVELOPMENT } from '../utils'\nimport Provider, { useOverlayContext } from './context'\n\ntype OverlayPosition = Partial<{\n top: number | string\n bottom: number | string\n left: number | string\n right: number | string\n}>\n\ntype Align = 'bottom' | 'top' | 'left' | 'right'\ntype AlignX = 'left' | 'center' | 'right'\ntype AlignY = 'bottom' | 'top' | 'center'\n\nexport type UseOverlayProps = Partial<{\n isOpen: boolean\n openOn: 'click' | 'hover' | 'manual'\n closeOn: 'click' | 'clickOnTrigger' | 'clickOutsideContent' | 'hover' | 'manual'\n type: 'dropdown' | 'tooltip' | 'popover' | 'modal' | 'custom'\n position: 'absolute' | 'fixed' | 'relative' | 'static'\n align: Align\n alignX: AlignX\n alignY: AlignY\n offsetX: number\n offsetY: number\n throttleDelay: number\n parentContainer: HTMLElement | null\n closeOnEsc: boolean\n hoverDelay: number\n disabled: boolean\n onOpen: () => void\n onClose: () => void\n}>\n\ntype PositionResult = {\n pos: OverlayPosition\n resolvedAlignX: AlignX\n resolvedAlignY: AlignY\n}\n\n// Reference counter for nested modals sharing document.body overflow lock.\nlet modalOverflowCount = 0\n\nconst sel = <T,>(cond: boolean, a: T, b: T): T => (cond ? a : b)\n\nconst devWarn = (msg: string) => {\n if (!IS_DEVELOPMENT) return\n // oxlint-disable-next-line no-console\n console.warn(msg)\n}\n\nconst calcDropdownVertical = (\n c: DOMRect,\n t: DOMRect,\n align: 'top' | 'bottom',\n alignX: AlignX,\n offsetX: number,\n offsetY: number,\n): PositionResult => {\n const pos: OverlayPosition = {}\n\n const topPos = t.top - offsetY - c.height\n const bottomPos = t.bottom + offsetY\n const leftPos = t.left + offsetX\n const rightPos = t.right - offsetX - c.width\n\n const fitsTop = topPos >= 0\n const fitsBottom = bottomPos + c.height <= window.innerHeight\n const fitsLeft = leftPos + c.width <= window.innerWidth\n const fitsRight = rightPos >= 0\n\n const useTop = sel(align === 'top', fitsTop, !fitsBottom)\n pos.top = sel(useTop, topPos, bottomPos)\n const resolvedAlignY: AlignY = sel(useTop, 'top', 'bottom')\n\n let resolvedAlignX: AlignX = alignX\n if (alignX === 'left') {\n pos.left = sel(fitsLeft, leftPos, rightPos)\n resolvedAlignX = sel(fitsLeft, 'left', 'right')\n } else if (alignX === 'right') {\n pos.left = sel(fitsRight, rightPos, leftPos)\n resolvedAlignX = sel(fitsRight, 'right', 'left')\n } else {\n const center = t.left + (t.right - t.left) / 2 - c.width / 2\n const fitsCL = center >= 0\n const fitsCR = center + c.width <= window.innerWidth\n\n if (fitsCL && fitsCR) {\n resolvedAlignX = 'center'\n pos.left = center\n } else if (fitsCL) {\n resolvedAlignX = 'left'\n pos.left = leftPos\n } else if (fitsCR) {\n resolvedAlignX = 'right'\n pos.left = rightPos\n }\n }\n\n return { pos, resolvedAlignX, resolvedAlignY }\n}\n\nconst calcDropdownHorizontal = (\n c: DOMRect,\n t: DOMRect,\n align: 'left' | 'right',\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n): PositionResult => {\n const pos: OverlayPosition = {}\n\n const leftPos = t.left - offsetX - c.width\n const rightPos = t.right + offsetX\n const topPos = t.top + offsetY\n const bottomPos = t.bottom - offsetY - c.height\n\n const fitsLeft = leftPos >= 0\n const fitsRight = rightPos + c.width <= window.innerWidth\n const fitsTop = topPos + c.height <= window.innerHeight\n const fitsBottom = bottomPos >= 0\n\n const useLeft = sel(align === 'left', fitsLeft, !fitsRight)\n pos.left = sel(useLeft, leftPos, rightPos)\n const resolvedAlignX: AlignX = sel(useLeft, 'left', 'right')\n\n let resolvedAlignY: AlignY = alignY\n if (alignY === 'top') {\n pos.top = sel(fitsTop, topPos, bottomPos)\n resolvedAlignY = sel(fitsTop, 'top', 'bottom')\n } else if (alignY === 'bottom') {\n pos.top = sel(fitsBottom, bottomPos, topPos)\n resolvedAlignY = sel(fitsBottom, 'bottom', 'top')\n } else {\n const center = t.top + (t.bottom - t.top) / 2 - c.height / 2\n const fitsCT = center >= 0\n const fitsCB = center + c.height <= window.innerHeight\n\n if (fitsCT && fitsCB) {\n resolvedAlignY = 'center'\n pos.top = center\n } else if (fitsCT) {\n resolvedAlignY = 'top'\n pos.top = topPos\n } else if (fitsCB) {\n resolvedAlignY = 'bottom'\n pos.top = bottomPos\n }\n }\n\n return { pos, resolvedAlignX, resolvedAlignY }\n}\n\nconst calcModalPos = (\n c: DOMRect,\n alignX: AlignX,\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n): OverlayPosition => {\n const pos: OverlayPosition = {}\n\n switch (alignX) {\n case 'right':\n pos.right = offsetX\n break\n case 'left':\n pos.left = offsetX\n break\n case 'center':\n pos.left = window.innerWidth / 2 - c.width / 2\n break\n default:\n pos.right = offsetX\n }\n\n switch (alignY) {\n case 'top':\n pos.top = offsetY\n break\n case 'center':\n pos.top = window.innerHeight / 2 - c.height / 2\n break\n case 'bottom':\n pos.bottom = offsetY\n break\n default:\n pos.top = offsetY\n }\n\n return pos\n}\n\nconst adjustForAncestor = (\n pos: OverlayPosition,\n ancestor: { top: number; left: number },\n): OverlayPosition => {\n if (ancestor.top === 0 && ancestor.left === 0) return pos\n\n const result = { ...pos }\n if (typeof result.top === 'number') result.top -= ancestor.top\n if (typeof result.bottom === 'number') result.bottom += ancestor.top\n if (typeof result.left === 'number') result.left -= ancestor.left\n if (typeof result.right === 'number') result.right += ancestor.left\n\n return result\n}\n\ntype ComputeResult = {\n pos: OverlayPosition\n resolvedAlignX?: AlignX\n resolvedAlignY?: AlignY\n}\n\nconst computePosition = (\n type: string,\n align: Align,\n alignX: AlignX,\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n triggerEl: HTMLElement | null,\n contentEl: HTMLElement | null,\n ancestorOffset: { top: number; left: number },\n): ComputeResult => {\n const isDropdown = ['dropdown', 'tooltip', 'popover'].includes(type)\n\n if (isDropdown && (!triggerEl || !contentEl)) {\n devWarn(\n `[@pyreon/elements] Overlay (${type}): ` +\n `${triggerEl ? 'contentRef' : 'triggerRef'} is not attached. ` +\n 'Position cannot be calculated without both refs.',\n )\n return { pos: {} }\n }\n\n if (isDropdown && triggerEl && contentEl) {\n const c = contentEl.getBoundingClientRect()\n const t = triggerEl.getBoundingClientRect()\n const result =\n align === 'top' || align === 'bottom'\n ? calcDropdownVertical(c, t, align, alignX, offsetX, offsetY)\n : calcDropdownHorizontal(c, t, align as 'left' | 'right', alignY, offsetX, offsetY)\n\n return {\n pos: adjustForAncestor(result.pos, ancestorOffset),\n resolvedAlignX: result.resolvedAlignX,\n resolvedAlignY: result.resolvedAlignY,\n }\n }\n\n if (type === 'modal') {\n if (!contentEl) {\n devWarn(\n '[@pyreon/elements] Overlay (modal): contentRef is not attached. ' +\n 'Modal position cannot be calculated without a content element.',\n )\n return { pos: {} }\n }\n const c = contentEl.getBoundingClientRect()\n return {\n pos: adjustForAncestor(calcModalPos(c, alignX, alignY, offsetX, offsetY), ancestorOffset),\n }\n }\n\n return { pos: {} }\n}\n\nconst processVisibilityEvent = (\n e: Event,\n active: boolean,\n openOn: string,\n closeOn: string,\n isTrigger: (evt: Event) => boolean,\n isContent: (evt: Event) => boolean,\n showContent: () => void,\n hideContent: () => void,\n) => {\n if (!active && openOn === 'click' && e.type === 'click' && isTrigger(e)) {\n showContent()\n return\n }\n\n if (!active) return\n\n if (closeOn === 'hover' && e.type === 'scroll') {\n hideContent()\n return\n }\n\n if (e.type !== 'click') return\n\n if (closeOn === 'click') {\n hideContent()\n } else if (closeOn === 'clickOnTrigger' && isTrigger(e)) {\n hideContent()\n } else if (closeOn === 'clickOutsideContent' && !isContent(e)) {\n hideContent()\n }\n}\n\nconst useOverlay = ({\n isOpen = false,\n openOn = 'click',\n closeOn = 'click',\n type = 'dropdown',\n position = 'fixed',\n align = 'bottom',\n alignX: propAlignX = 'left',\n alignY: propAlignY = 'bottom',\n offsetX = 0,\n offsetY = 0,\n throttleDelay = 200,\n parentContainer,\n closeOnEsc = true,\n hoverDelay = 100,\n disabled,\n onOpen,\n onClose,\n}: Partial<UseOverlayProps> = {}) => {\n const ctx = useOverlayContext()\n\n // Signal-based state\n const active = signal(isOpen)\n const isContentLoaded = signal(false)\n const innerAlignX = signal(propAlignX)\n const innerAlignY = signal(propAlignY)\n const blockedCount = signal(0)\n\n const blocked = () => blockedCount() > 0\n\n // DOM refs (plain variables, component runs once)\n let triggerEl: HTMLElement | null = null\n let contentEl: HTMLElement | null = null\n const _prevFocusEl: HTMLElement | null = null\n let hoverTimeout: ReturnType<typeof setTimeout> | null = null\n\n const triggerRef = (node: HTMLElement | null) => {\n triggerEl = node\n }\n\n const contentRefCallback = (node: HTMLElement | null) => {\n contentEl = node\n isContentLoaded.set(!!node)\n }\n\n const setBlocked = () => blockedCount.update((c) => c + 1)\n const setUnblocked = () => blockedCount.update((c) => Math.max(0, c - 1))\n\n const showContent = () => {\n active.set(true)\n onOpen?.()\n ctx.setBlocked?.()\n }\n\n const hideContent = () => {\n active.set(false)\n isContentLoaded.set(false)\n onClose?.()\n ctx.setUnblocked?.()\n }\n\n // Position calculation helpers\n const getAncestorOffset = () => {\n if (position !== 'absolute' || !contentEl) {\n return { top: 0, left: 0 }\n }\n\n const offsetParent = contentEl.offsetParent as HTMLElement | null\n if (!offsetParent || offsetParent === document.body) {\n return { top: 0, left: 0 }\n }\n\n const rect = offsetParent.getBoundingClientRect()\n return { top: rect.top, left: rect.left }\n }\n\n const calculateContentPosition = () => {\n if (!active() || !isContentLoaded()) return {}\n\n const result = computePosition(\n type,\n align,\n propAlignX,\n propAlignY,\n offsetX,\n offsetY,\n triggerEl,\n contentEl,\n getAncestorOffset(),\n )\n\n if (result.resolvedAlignX) innerAlignX.set(result.resolvedAlignX)\n if (result.resolvedAlignY) innerAlignY.set(result.resolvedAlignY)\n\n return result.pos\n }\n\n const assignContentPosition = (values: OverlayPosition = {}) => {\n if (!contentEl) return\n\n const el = contentEl\n const setValue = (param?: string | number) => value(param, 16) as string\n\n el.style.position = position\n\n el.style.top = values.top != null ? setValue(values.top) : ''\n el.style.bottom = values.bottom != null ? setValue(values.bottom) : ''\n el.style.left = values.left != null ? setValue(values.left) : ''\n el.style.right = values.right != null ? setValue(values.right) : ''\n }\n\n const setContentPosition = () => {\n const currentPosition = calculateContentPosition()\n assignContentPosition(currentPosition)\n }\n\n const isNodeOrChild = (getRef: () => HTMLElement | null) => (e: Event) => {\n const ref = getRef()\n if (e?.target && ref) {\n return ref.contains(e.target as Element) || e.target === ref\n }\n return false\n }\n\n const handleVisibilityByEventType = (e: Event) => {\n if (blocked() || disabled) return\n\n processVisibilityEvent(\n e,\n active(),\n openOn,\n closeOn,\n isNodeOrChild(() => triggerEl),\n isNodeOrChild(() => contentEl),\n showContent,\n hideContent,\n )\n }\n\n const handleContentPosition = throttle(() => setContentPosition(), throttleDelay)\n\n const handleClick = (e: Event) => handleVisibilityByEventType(e)\n\n const handleVisibility = throttle((e: Event) => handleVisibilityByEventType(e), throttleDelay)\n\n // --------------------------------------------------------------------------\n // Set up all event listeners on mount, clean up on unmount\n // --------------------------------------------------------------------------\n const setupListeners = () => {\n const cleanups: (() => void)[] = []\n\n // Click-based open/close\n const enabledClick =\n openOn === 'click' || ['click', 'clickOnTrigger', 'clickOutsideContent'].includes(closeOn)\n\n if (enabledClick) {\n window.addEventListener('click', handleClick)\n cleanups.push(() => window.removeEventListener('click', handleClick))\n }\n\n // ESC key\n if (closeOnEsc) {\n const handleEscKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && active() && !blocked()) {\n hideContent()\n }\n }\n window.addEventListener('keydown', handleEscKey)\n cleanups.push(() => window.removeEventListener('keydown', handleEscKey))\n }\n\n // Hover-based open/close\n const enabledHover = openOn === 'hover' || closeOn === 'hover'\n if (enabledHover) {\n const clearHoverTimeout = () => {\n if (hoverTimeout != null) {\n clearTimeout(hoverTimeout)\n hoverTimeout = null\n }\n }\n\n const scheduleHide = () => {\n clearHoverTimeout()\n hoverTimeout = setTimeout(hideContent, hoverDelay)\n }\n\n const onTriggerEnter = () => {\n clearHoverTimeout()\n if (openOn === 'hover' && !active()) showContent()\n }\n\n const onTriggerLeave = () => {\n if (closeOn === 'hover' && active()) scheduleHide()\n }\n\n const onContentEnter = () => {\n clearHoverTimeout()\n }\n\n const onContentLeave = () => {\n if (closeOn === 'hover' && active()) scheduleHide()\n }\n\n // We need to defer listener attachment until refs are available\n const attachHoverListeners = () => {\n if (triggerEl) {\n triggerEl.addEventListener('mouseenter', onTriggerEnter)\n triggerEl.addEventListener('mouseleave', onTriggerLeave)\n }\n if (contentEl) {\n contentEl.addEventListener('mouseenter', onContentEnter)\n contentEl.addEventListener('mouseleave', onContentLeave)\n }\n }\n\n attachHoverListeners()\n\n cleanups.push(() => {\n clearHoverTimeout()\n if (triggerEl) {\n triggerEl.removeEventListener('mouseenter', onTriggerEnter)\n triggerEl.removeEventListener('mouseleave', onTriggerLeave)\n }\n if (contentEl) {\n contentEl.removeEventListener('mouseenter', onContentEnter)\n contentEl.removeEventListener('mouseleave', onContentLeave)\n }\n })\n }\n\n // Resize/scroll repositioning\n const shouldSetOverflow = type === 'modal'\n\n const onScroll = (e: Event) => {\n handleContentPosition()\n handleVisibility(e)\n }\n\n if (shouldSetOverflow) {\n modalOverflowCount++\n if (modalOverflowCount === 1) document.body.style.overflow = 'hidden'\n }\n\n window.addEventListener('resize', handleContentPosition)\n window.addEventListener('scroll', onScroll, { passive: true })\n cleanups.push(() => {\n handleContentPosition.cancel()\n handleVisibility.cancel()\n if (shouldSetOverflow) {\n modalOverflowCount--\n if (modalOverflowCount === 0) document.body.style.overflow = ''\n }\n window.removeEventListener('resize', handleContentPosition)\n window.removeEventListener('scroll', onScroll)\n })\n\n // Parent container scroll\n if (parentContainer) {\n if (closeOn !== 'hover') parentContainer.style.overflow = 'hidden'\n\n const onParentScroll = (e: Event) => {\n handleContentPosition()\n handleVisibility(e)\n }\n\n parentContainer.addEventListener('scroll', onParentScroll, {\n passive: true,\n })\n cleanups.push(() => {\n parentContainer.style.overflow = ''\n parentContainer.removeEventListener('scroll', onParentScroll)\n })\n }\n\n // Cleanup function\n return () => {\n for (const cleanup of cleanups) cleanup()\n }\n }\n\n // Handle disabled state\n if (disabled) {\n active.set(false)\n }\n\n return {\n triggerRef,\n contentRef: contentRefCallback,\n active,\n align,\n alignX: innerAlignX,\n alignY: innerAlignY,\n showContent,\n hideContent,\n blocked,\n setBlocked,\n setUnblocked,\n setupListeners,\n Provider,\n }\n}\n\nexport default useOverlay\n","/**\n * Overlay component that renders a trigger element and conditionally shows\n * content via a Portal. The trigger receives a ref and optional show/hide\n * callbacks; the content is positioned and managed by the useOverlay hook.\n * A context Provider wraps the content to support nested overlays (e.g.,\n * a dropdown inside another dropdown) via blocked-state propagation.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { onMount, Portal, splitProps } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { Content, PyreonComponent } from '../types'\nimport useOverlay, { type UseOverlayProps } from './useOverlay'\n\nconst IS_BROWSER = typeof window !== 'undefined'\n\ntype Align = 'bottom' | 'top' | 'left' | 'right'\ntype AlignX = 'left' | 'center' | 'right'\ntype AlignY = 'bottom' | 'top' | 'center'\n\ntype TriggerRenderer = (\n props: Partial<{\n active: boolean\n showContent: () => void\n hideContent: () => void\n }>,\n) => VNodeChild\n\ntype ContentRenderer = (\n props: Partial<{\n active: boolean\n showContent: () => void\n hideContent: () => void\n align: Align\n alignX: AlignX\n alignY: AlignY\n }>,\n) => VNodeChild\n\nexport type Props = {\n children: ContentRenderer | Content\n trigger: TriggerRenderer | Content\n DOMLocation?: HTMLElement\n triggerRefName?: string\n contentRefName?: string\n} & UseOverlayProps\n\nconst Component: PyreonComponent<Props> = (props) => {\n const [own, overlayProps] = splitProps(props, [\n 'children',\n 'trigger',\n 'DOMLocation',\n 'triggerRefName',\n 'contentRefName',\n ])\n\n const triggerRefName = own.triggerRefName ?? 'ref'\n const contentRefName = own.contentRefName ?? 'ref'\n\n const {\n active,\n triggerRef,\n contentRef,\n showContent,\n hideContent,\n align,\n alignX,\n alignY,\n setupListeners,\n Provider,\n ...ctx\n } = useOverlay(overlayProps)\n\n const { openOn, closeOn, type } = overlayProps\n\n const passHandlers =\n openOn === 'manual' || closeOn === 'manual' || closeOn === 'clickOutsideContent'\n\n const ariaHasPopup = (() => {\n switch (type) {\n case 'modal':\n return 'dialog' as const\n case 'tooltip':\n return 'true' as const\n default:\n return 'menu' as const\n }\n })()\n\n // Set up event listeners on mount\n onMount(() => {\n const cleanup = setupListeners()\n return cleanup\n })\n\n return (\n <>\n {render(own.trigger, {\n [triggerRefName]: triggerRef,\n active: active(),\n 'aria-expanded': active(),\n 'aria-haspopup': ariaHasPopup,\n ...(passHandlers ? { showContent, hideContent } : {}),\n })}\n\n {() =>\n IS_BROWSER && active() ? (\n <Portal target={own.DOMLocation ?? document.body}>\n <Provider {...ctx}>\n {render(own.children, {\n [contentRefName]: contentRef,\n role: type === 'modal' ? 'dialog' : undefined,\n 'aria-modal': type === 'modal' ? true : undefined,\n active: active(),\n align,\n alignX: alignX(),\n alignY: alignY(),\n ...(passHandlers ? { showContent, hideContent } : {}),\n })}\n </Provider>\n </Portal>\n ) : null\n }\n </>\n )\n}\n\nconst name = `${PKG_NAME}/Overlay` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","/**\n * Portal component stub. In Pyreon, the actual Portal is provided by\n * @pyreon/core's runtime-dom. This component re-exports it for API\n * compatibility with the elements package structure.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { Portal as CorePortal } from '@pyreon/core'\nimport { PKG_NAME } from '../constants'\nimport type { PyreonComponent } from '../types'\n\nexport interface Props {\n /**\n * Defines a HTML DOM where children to be appended.\n */\n DOMLocation?: HTMLElement\n /**\n * Children to be rendered within **Portal** component.\n */\n children: VNodeChild\n /**\n * Valid HTML Tag\n */\n tag?: string\n}\n\nconst Component: PyreonComponent<Props> = (props) => {\n const target = props.DOMLocation ?? (typeof document !== 'undefined' ? document.body : undefined)\n\n if (!target) return null\n\n return <CorePortal target={target}>{props.children}</CorePortal>\n}\n\nconst name = `${PKG_NAME}/Portal` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","/**\n * Styled text primitive that inherits color, font-weight, and line-height\n * from its parent so it blends seamlessly into any context. Additional\n * styles can be injected via the responsive `extraStyles` prop processed\n * through makeItResponsive.\n */\nimport { config } from '@pyreon/ui-core'\nimport { extendCss, makeItResponsive } from '@pyreon/unistyle'\nimport type { ResponsiveStylesCallback } from '../types'\n\nconst { styled, css, textComponent } = config\n\nconst styles: ResponsiveStylesCallback = ({ css: cssFn, theme: t }) => cssFn`\n ${t.extraStyles && extendCss(t.extraStyles)};\n`\n\nexport default styled(textComponent)`\n ${css`\n color: inherit;\n font-weight: inherit;\n line-height: 1;\n `};\n\n ${makeItResponsive({\n key: '$text',\n styles,\n css,\n normalize: false,\n })};\n`\n","/**\n * Text component for rendering inline or block-level text. Supports a\n * `paragraph` shorthand that automatically renders as a `<p>` tag, or\n * a custom `tag` for semantic HTML (h1-h6, span, etc.). Marked with\n * a static `isText` flag so other components can detect text children.\n */\n\nimport { splitProps } from '@pyreon/core'\nimport type { PyreonHTMLAttributes, VNodeChild } from '@pyreon/core'\nimport type { HTMLTextTags } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { ExtendCss, PyreonComponent } from '../types'\nimport Styled from './styled'\n\nexport type Props = Partial<{\n /**\n * Label can be used instead of children for inline syntax. But **children** prop takes a precedence\n */\n label: VNodeChild\n /**\n * Children to be rendered within **Text** component.\n */\n children: VNodeChild\n /**\n * Defines whether should behave as a block text element. Automatically adds **p** HTML tag\n */\n paragraph: boolean\n /**\n * Defines what kind of HTML tag should be rendered\n */\n tag: HTMLTextTags\n /**\n * If an additional styling needs to be added, it can be do so via injecting styles using this property.\n */\n css: ExtendCss\n}> &\n PyreonHTMLAttributes\n\nconst Component: PyreonComponent<Props> & {\n isText?: true\n} = (props) => {\n const [own, rest] = splitProps(props, ['paragraph', 'label', 'children', 'tag', 'css', 'ref'])\n\n let finalTag: string | undefined\n\n if (own.paragraph) finalTag = 'p'\n else {\n finalTag = own.tag\n }\n\n return (\n <Styled ref={own.ref} as={finalTag} $text={{ extraStyles: own.css }} {...rest}>\n {own.children ?? own.label}\n </Styled>\n )\n}\n\n// ----------------------------------------------\n// DEFINE STATICS\n// ----------------------------------------------\nconst name = `${PKG_NAME}/Text` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\nComponent.isText = true\n\nexport default Component\n","/**\n * Utility wrapper that injects className and/or style props into its\n * children without adding any DOM nodes of its own. Uses the core `render`\n * helper to clone children with the merged props.\n */\n\nimport type { VNode, VNodeChild } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { PyreonComponent } from '../types'\n\nexport interface Props {\n /**\n * Children to be rendered within **Util** component.\n */\n children: VNodeChild\n /**\n * Class name(s) to be added to children component.\n */\n className?: string | string[] | undefined\n /**\n * Style property to extend children component inline styles\n */\n style?: Record<string, unknown> | undefined\n}\n\nconst Component: PyreonComponent<Props> = (({ children, className, style }: Props) => {\n const mergedClasses = Array.isArray(className) ? className.join(' ') : className\n\n const finalProps: Record<string, any> = {}\n if (style) finalProps.style = style\n if (mergedClasses) finalProps.className = mergedClasses\n\n return render(children, finalProps) as VNode | null\n}) as PyreonComponent<Props>\n\nconst name = `${PKG_NAME}/Util` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n"],"mappings":";;;;;;;AAAA,MAAa,WAAW;;;;ACAxB,MAAa,iBAAiB,QAAQ,IAAI,aAAa;;;;;;;;;;;ACYvD,MAAM,EAAE,kBAAQ,YAAK,2BAAc;AAEnC,MAAM,eAAe;;;AAIrB,MAAM,iBAAiB;;;AAOvB,MAAM,gBAAgB;CACpB,QAAQ;EACN,QAAQ;EACR,OAAO;EACR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MAAM,UAAoC,EAAE,KAAK,OAAO,OAAO,QAAQ,KAAK;IACxE,EAAE,eAAe,UAAU,EAAE,YAAY,CAAC;;AAG9C,qBAAe,OAAO,cAAc;IAChC,GAAG;;;;IAIH;;IAEA,iBAAiB;CACjB,KAAK;CACL;CACA;CACA,WAAW;CACZ,CAAC,CAAC;;;;;;;;;;;ACUL,MAAMC,eAED,UAAU;CACb,MAAM,CAAC,KAAK,QAAQ,WAAW,OAAO;EAAC;EAAa;EAAS;EAAY;EAAO;EAAO;EAAM,CAAC;CAE9F,IAAI;AAEJ,KAAI,IAAI,UAAW,YAAW;KAE5B,YAAW,IAAI;AAGjB,QACE,oBAACC,gBAAD;EAAQ,KAAK,IAAI;EAAK,IAAI;EAAU,OAAO,EAAE,aAAa,IAAI,KAAK;EAAE,GAAI;YACtE,IAAI,YAAY,IAAI;EACd;;AAOb,MAAMC,SAAO,GAAG,SAAS;AAEzB,YAAU,cAAcA;AACxB,YAAU,UAAU;AACpB,YAAU,oBAAoBA;AAC9B,YAAU,SAAS;;;;ACvCnB,MAAMC,gBAAsC,EAAE,UAAU,WAAW,YAAmB;CACpF,MAAM,gBAAgB,MAAM,QAAQ,UAAU,GAAG,UAAU,KAAK,IAAI,GAAG;CAEvE,MAAM,aAAkC,EAAE;AAC1C,KAAI,MAAO,YAAW,QAAQ;AAC9B,KAAI,cAAe,YAAW,YAAY;AAE1C,QAAO,OAAO,UAAU,WAAW;;AAGrC,MAAM,OAAO,GAAG,SAAS;AAEzB,YAAU,cAAc;AACxB,YAAU,UAAU;AACpB,YAAU,oBAAoB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/elements",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "Foundational UI components for Pyreon",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -10,7 +10,6 @@
10
10
  },
11
11
  "files": [
12
12
  "lib",
13
- "!lib/**/*.map",
14
13
  "!lib/analysis",
15
14
  "README.md",
16
15
  "LICENSE",
@@ -41,14 +40,14 @@
41
40
  "typecheck": "tsc --noEmit"
42
41
  },
43
42
  "devDependencies": {
44
- "@pyreon/typescript": "^0.12.0",
43
+ "@pyreon/typescript": "^0.12.2",
45
44
  "@vitus-labs/tools-rolldown": "^1.15.3"
46
45
  },
47
46
  "peerDependencies": {
48
- "@pyreon/core": "^0.12.0",
49
- "@pyreon/reactivity": "^0.12.0",
50
- "@pyreon/ui-core": "^0.12.0",
51
- "@pyreon/unistyle": "^0.12.0"
47
+ "@pyreon/core": "^0.12.2",
48
+ "@pyreon/reactivity": "^0.12.2",
49
+ "@pyreon/ui-core": "^0.12.2",
50
+ "@pyreon/unistyle": "^0.12.2"
52
51
  },
53
52
  "engines": {
54
53
  "node": ">= 22"
@@ -7,7 +7,7 @@
7
7
  * skipping children or switching sub-tags accordingly.
8
8
  */
9
9
 
10
- import { onMount } from '@pyreon/core'
10
+ import { onMount, splitProps } from '@pyreon/core'
11
11
  import { render } from '@pyreon/ui-core'
12
12
  import { PKG_NAME } from '../constants'
13
13
  import { Content, Wrapper } from '../helpers'
@@ -37,62 +37,68 @@ const defaultContentDirection = 'rows'
37
37
  const defaultAlignX = 'left'
38
38
  const defaultAlignY = 'center'
39
39
 
40
- const Component: PyreonElement = ({
41
- innerRef,
42
- tag,
43
- label,
44
- content,
45
- children,
46
- beforeContent,
47
- afterContent,
48
- equalBeforeAfter,
49
-
50
- block,
51
- equalCols,
52
- gap,
53
-
54
- direction,
55
- alignX = defaultAlignX,
56
- alignY = defaultAlignY,
57
-
58
- css,
59
- contentCss,
60
- beforeContentCss,
61
- afterContentCss,
62
-
63
- contentDirection = defaultContentDirection,
64
- contentAlignX = defaultAlignX,
65
- contentAlignY = defaultAlignY,
66
-
67
- beforeContentDirection = defaultDirection,
68
- beforeContentAlignX = defaultAlignX,
69
- beforeContentAlignY = defaultAlignY,
70
-
71
- afterContentDirection = defaultDirection,
72
- afterContentAlignX = defaultAlignX,
73
- afterContentAlignY = defaultAlignY,
74
-
75
- ref,
76
- ...props
77
- }) => {
40
+ const Component: PyreonElement = (props) => {
41
+ const [own, rest] = splitProps(props, [
42
+ 'innerRef',
43
+ 'tag',
44
+ 'label',
45
+ 'content',
46
+ 'children',
47
+ 'beforeContent',
48
+ 'afterContent',
49
+ 'equalBeforeAfter',
50
+ 'block',
51
+ 'equalCols',
52
+ 'gap',
53
+ 'direction',
54
+ 'alignX',
55
+ 'alignY',
56
+ 'css',
57
+ 'contentCss',
58
+ 'beforeContentCss',
59
+ 'afterContentCss',
60
+ 'contentDirection',
61
+ 'contentAlignX',
62
+ 'contentAlignY',
63
+ 'beforeContentDirection',
64
+ 'beforeContentAlignX',
65
+ 'beforeContentAlignY',
66
+ 'afterContentDirection',
67
+ 'afterContentAlignX',
68
+ 'afterContentAlignY',
69
+ 'ref',
70
+ ])
71
+
72
+ const alignX = own.alignX ?? defaultAlignX
73
+ const alignY = own.alignY ?? defaultAlignY
74
+ const contentDirection = own.contentDirection ?? defaultContentDirection
75
+ const contentAlignX = own.contentAlignX ?? defaultAlignX
76
+ const contentAlignY = own.contentAlignY ?? defaultAlignY
77
+ const beforeContentDirection = own.beforeContentDirection ?? defaultDirection
78
+ const beforeContentAlignX = own.beforeContentAlignX ?? defaultAlignX
79
+ const beforeContentAlignY = own.beforeContentAlignY ?? defaultAlignY
80
+ const afterContentDirection = own.afterContentDirection ?? defaultDirection
81
+ const afterContentAlignX = own.afterContentAlignX ?? defaultAlignX
82
+ const afterContentAlignY = own.afterContentAlignY ?? defaultAlignY
83
+
78
84
  // --------------------------------------------------------
79
85
  // check if should render only single element
80
86
  // --------------------------------------------------------
81
- const shouldBeEmpty = !!props.dangerouslySetInnerHTML || getShouldBeEmpty(tag)
87
+ const shouldBeEmpty = !!rest.dangerouslySetInnerHTML || getShouldBeEmpty(own.tag)
82
88
 
83
89
  // --------------------------------------------------------
84
90
  // if not single element, calculate values
85
91
  // --------------------------------------------------------
86
- const isSimpleElement = !beforeContent && !afterContent
87
- const CHILDREN = children ?? content ?? label
92
+ const isSimpleElement = !own.beforeContent && !own.afterContent
93
+ const CHILDREN = own.children ?? own.content ?? own.label
88
94
 
89
- const isInline = isInlineElement(tag)
95
+ const isInline = isInlineElement(own.tag)
90
96
  const SUB_TAG = isInline ? 'span' : undefined
91
97
 
92
98
  // --------------------------------------------------------
93
99
  // direction & alignX & alignY calculations
94
100
  // --------------------------------------------------------
95
- let wrapperDirection: typeof direction = direction
101
+ let wrapperDirection: typeof own.direction = own.direction
96
102
  let wrapperAlignX: typeof alignX = alignX
97
103
  let wrapperAlignY: typeof alignY = alignY
98
104
 
@@ -100,8 +106,8 @@ const Component: PyreonElement = ({
100
106
  if (contentDirection) wrapperDirection = contentDirection
101
107
  if (contentAlignX) wrapperAlignX = contentAlignX
102
108
  if (contentAlignY) wrapperAlignY = contentAlignY
103
- } else if (direction) {
104
- wrapperDirection = direction
109
+ } else if (own.direction) {
110
+ wrapperDirection = own.direction
105
111
  } else {
106
112
  wrapperDirection = defaultDirection
107
113
  }
@@ -110,7 +116,7 @@ const Component: PyreonElement = ({
110
116
  // equalBeforeAfter: measure & equalize slot dimensions
111
117
  // --------------------------------------------------------
112
118
  let equalizeRef: HTMLElement | null = null
113
- const externalRef = ref ?? innerRef
119
+ const externalRef = own.ref ?? own.innerRef
114
120
 
115
121
  const mergedRef = (node: HTMLElement | null) => {
116
122
  equalizeRef = node
@@ -120,9 +126,9 @@ const Component: PyreonElement = ({
120
126
  }
121
127
  }
122
128
 
123
- if (equalBeforeAfter && beforeContent && afterContent) {
129
+ if (own.equalBeforeAfter && own.beforeContent && own.afterContent) {
124
130
  onMount(() => {
125
- if (equalizeRef) equalize(equalizeRef, direction)
131
+ if (equalizeRef) equalize(equalizeRef, own.direction)
126
132
  return undefined
127
133
  })
128
134
  }
@@ -132,9 +138,9 @@ const Component: PyreonElement = ({
132
138
  // --------------------------------------------------------
133
139
  const WRAPPER_PROPS = {
134
140
  ref: mergedRef,
135
- extendCss: css,
136
- tag,
137
- block,
141
+ extendCss: own.css,
142
+ tag: own.tag,
143
+ block: own.block,
138
144
  direction: wrapperDirection,
139
145
  alignX: wrapperAlignX,
140
146
  alignY: wrapperAlignY,
@@ -145,24 +151,24 @@ const Component: PyreonElement = ({
145
151
  // return simple/empty element like input or image etc.
146
152
  // --------------------------------------------------------
147
153
  if (shouldBeEmpty) {
148
- return <Wrapper {...props} {...WRAPPER_PROPS} />
154
+ return <Wrapper {...rest} {...WRAPPER_PROPS} />
149
155
  }
150
156
 
151
157
  return (
152
- <Wrapper {...props} {...WRAPPER_PROPS} isInline={isInline}>
153
- {beforeContent && (
158
+ <Wrapper {...rest} {...WRAPPER_PROPS} isInline={isInline}>
159
+ {own.beforeContent && (
154
160
  <Content
155
161
  tag={SUB_TAG}
156
162
  contentType="before"
157
163
  parentDirection={wrapperDirection}
158
- extendCss={beforeContentCss}
164
+ extendCss={own.beforeContentCss}
159
165
  direction={beforeContentDirection}
160
166
  alignX={beforeContentAlignX}
161
167
  alignY={beforeContentAlignY}
162
- equalCols={equalCols}
163
- gap={gap}
168
+ equalCols={own.equalCols}
169
+ gap={own.gap}
164
170
  >
165
- {beforeContent}
171
+ {own.beforeContent}
166
172
  </Content>
167
173
  )}
168
174
 
@@ -173,29 +179,29 @@ const Component: PyreonElement = ({
173
179
  tag={SUB_TAG}
174
180
  contentType="content"
175
181
  parentDirection={wrapperDirection}
176
- extendCss={contentCss}
182
+ extendCss={own.contentCss}
177
183
  direction={contentDirection}
178
184
  alignX={contentAlignX}
179
185
  alignY={contentAlignY}
180
- equalCols={equalCols}
186
+ equalCols={own.equalCols}
181
187
  >
182
188
  {CHILDREN}
183
189
  </Content>
184
190
  )}
185
191
 
186
- {afterContent && (
192
+ {own.afterContent && (
187
193
  <Content
188
194
  tag={SUB_TAG}
189
195
  contentType="after"
190
196
  parentDirection={wrapperDirection}
191
- extendCss={afterContentCss}
197
+ extendCss={own.afterContentCss}
192
198
  direction={afterContentDirection}
193
199
  alignX={afterContentAlignX}
194
200
  alignY={afterContentAlignY}
195
- equalCols={equalCols}
196
- gap={gap}
201
+ equalCols={own.equalCols}
202
+ gap={own.gap}
197
203
  >
198
- {afterContent}
204
+ {own.afterContent}
199
205
  </Content>
200
206
  )}
201
207
  </Wrapper>
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import type { VNodeChild } from '@pyreon/core'
10
- import { onMount, Portal } from '@pyreon/core'
10
+ import { onMount, Portal, splitProps } from '@pyreon/core'
11
11
  import { render } from '@pyreon/ui-core'
12
12
  import { PKG_NAME } from '../constants'
13
13
  import type { Content, PyreonComponent } from '../types'
@@ -46,14 +46,18 @@ export type Props = {
46
46
  contentRefName?: string
47
47
  } & UseOverlayProps
48
48
 
49
- const Component: PyreonComponent<Props> = ({
50
- children,
51
- trigger,
52
- DOMLocation,
53
- triggerRefName = 'ref',
54
- contentRefName = 'ref',
55
- ...props
56
- }) => {
49
+ const Component: PyreonComponent<Props> = (props) => {
50
+ const [own, overlayProps] = splitProps(props, [
51
+ 'children',
52
+ 'trigger',
53
+ 'DOMLocation',
54
+ 'triggerRefName',
55
+ 'contentRefName',
56
+ ])
57
+
58
+ const triggerRefName = own.triggerRefName ?? 'ref'
59
+ const contentRefName = own.contentRefName ?? 'ref'
60
+
57
61
  const {
58
62
  active,
59
63
  triggerRef,
@@ -66,9 +70,9 @@ const Component: PyreonComponent<Props> = ({
66
70
  setupListeners,
67
71
  Provider,
68
72
  ...ctx
69
- } = useOverlay(props)
73
+ } = useOverlay(overlayProps)
70
74
 
71
- const { openOn, closeOn, type } = props
75
+ const { openOn, closeOn, type } = overlayProps
72
76
 
73
77
  const passHandlers =
74
78
  openOn === 'manual' || closeOn === 'manual' || closeOn === 'clickOutsideContent'
@@ -92,7 +96,7 @@ const Component: PyreonComponent<Props> = ({
92
96
 
93
97
  return (
94
98
  <>
95
- {render(trigger, {
99
+ {render(own.trigger, {
96
100
  [triggerRefName]: triggerRef,
97
101
  active: active(),
98
102
  'aria-expanded': active(),
@@ -102,9 +106,9 @@ const Component: PyreonComponent<Props> = ({
102
106
 
103
107
  {() =>
104
108
  IS_BROWSER && active() ? (
105
- <Portal target={DOMLocation ?? document.body}>
109
+ <Portal target={own.DOMLocation ?? document.body}>
106
110
  <Provider {...ctx}>
107
- {render(children, {
111
+ {render(own.children, {
108
112
  [contentRefName]: contentRef,
109
113
  role: type === 'modal' ? 'dialog' : undefined,
110
114
  'aria-modal': type === 'modal' ? true : undefined,
@@ -17,21 +17,16 @@ const context = createContext<OverlayContext>({} as OverlayContext)
17
17
 
18
18
  export const useOverlayContext = () => useContext(context)
19
19
 
20
- const Component = ({
21
- children,
22
- blocked,
23
- setBlocked,
24
- setUnblocked,
25
- }: OverlayContext & { children: VNodeChild }) => {
20
+ const Component = (props: OverlayContext & { children: VNodeChild }) => {
26
21
  const ctx = {
27
- blocked,
28
- setBlocked,
29
- setUnblocked,
22
+ blocked: props.blocked,
23
+ setBlocked: props.setBlocked,
24
+ setUnblocked: props.setUnblocked,
30
25
  }
31
26
 
32
27
  provide(context, ctx)
33
28
 
34
- return <>{children}</>
29
+ return <>{props.children}</>
35
30
  }
36
31
 
37
32
  export default Component
@@ -24,12 +24,12 @@ export interface Props {
24
24
  tag?: string
25
25
  }
26
26
 
27
- const Component: PyreonComponent<Props> = ({ DOMLocation, tag: _tag = 'div', children }) => {
28
- const target = DOMLocation ?? (typeof document !== 'undefined' ? document.body : undefined)
27
+ const Component: PyreonComponent<Props> = (props) => {
28
+ const target = props.DOMLocation ?? (typeof document !== 'undefined' ? document.body : undefined)
29
29
 
30
30
  if (!target) return null
31
31
 
32
- return <CorePortal target={target}>{children}</CorePortal>
32
+ return <CorePortal target={target}>{props.children}</CorePortal>
33
33
  }
34
34
 
35
35
  const name = `${PKG_NAME}/Portal` as const
@@ -5,6 +5,7 @@
5
5
  * a static `isText` flag so other components can detect text children.
6
6
  */
7
7
 
8
+ import { splitProps } from '@pyreon/core'
8
9
  import type { PyreonHTMLAttributes, VNodeChild } from '@pyreon/core'
9
10
  import type { HTMLTextTags } from '@pyreon/ui-core'
10
11
  import { PKG_NAME } from '../constants'
@@ -37,17 +38,19 @@ export type Props = Partial<{
37
38
 
38
39
  const Component: PyreonComponent<Props> & {
39
40
  isText?: true
40
- } = ({ paragraph, label, children, tag, css, ref, ...props }) => {
41
+ } = (props) => {
42
+ const [own, rest] = splitProps(props, ['paragraph', 'label', 'children', 'tag', 'css', 'ref'])
43
+
41
44
  let finalTag: string | undefined
42
45
 
43
- if (paragraph) finalTag = 'p'
46
+ if (own.paragraph) finalTag = 'p'
44
47
  else {
45
- finalTag = tag
48
+ finalTag = own.tag
46
49
  }
47
50
 
48
51
  return (
49
- <Styled ref={ref} as={finalTag} $text={{ extraStyles: css }} {...props}>
50
- {children ?? label}
52
+ <Styled ref={own.ref} as={finalTag} $text={{ extraStyles: own.css }} {...rest}>
53
+ {own.children ?? own.label}
51
54
  </Styled>
52
55
  )
53
56
  }
@@ -6,44 +6,46 @@
6
6
  *
7
7
  * Children are rendered via core `render()`.
8
8
  */
9
+ import { splitProps } from '@pyreon/core'
9
10
  import { render } from '@pyreon/ui-core'
10
11
  import { IS_DEVELOPMENT } from '../../utils'
11
12
  import Styled from './styled'
12
13
  import type { Props } from './types'
13
14
 
14
- const Component = ({
15
- contentType,
16
- tag,
17
- parentDirection,
18
- direction,
19
- alignX,
20
- alignY,
21
- equalCols,
22
- gap,
23
- extendCss,
24
- children,
25
- ...props
26
- }: Partial<Props>) => {
15
+ const Component = (props: Partial<Props>) => {
16
+ const [own, rest] = splitProps(props, [
17
+ 'contentType',
18
+ 'tag',
19
+ 'parentDirection',
20
+ 'direction',
21
+ 'alignX',
22
+ 'alignY',
23
+ 'equalCols',
24
+ 'gap',
25
+ 'extendCss',
26
+ 'children',
27
+ ])
28
+
27
29
  const debugProps = IS_DEVELOPMENT
28
30
  ? {
29
- 'data-pyr-element': contentType,
31
+ 'data-pyr-element': own.contentType,
30
32
  }
31
33
  : {}
32
34
 
33
35
  const stylingProps = {
34
- contentType,
35
- parentDirection,
36
- direction,
37
- alignX,
38
- alignY,
39
- equalCols,
40
- gap,
41
- extraStyles: extendCss,
36
+ contentType: own.contentType,
37
+ parentDirection: own.parentDirection,
38
+ direction: own.direction,
39
+ alignX: own.alignX,
40
+ alignY: own.alignY,
41
+ equalCols: own.equalCols,
42
+ gap: own.gap,
43
+ extraStyles: own.extendCss,
42
44
  }
43
45
 
44
46
  return (
45
- <Styled as={tag} $contentType={contentType} $element={stylingProps} {...debugProps} {...props}>
46
- {render(children)}
47
+ <Styled as={own.tag} $contentType={own.contentType} $element={stylingProps} {...debugProps} {...rest}>
48
+ {render(own.children)}
47
49
  </Styled>
48
50
  )
49
51
  }
@@ -29,7 +29,8 @@ const fullHeightCSS = `
29
29
 
30
30
  const blockCSS = `
31
31
  align-self: stretch;
32
- width: 100%;
32
+ flex: 1;
33
+ min-width: 0;
33
34
  `
34
35
 
35
36
  const childFixPosition = (isBlock?: boolean) => `display: ${isBlock ? 'flex' : 'inline-flex'};`