@node-core/ui-components 1.6.2 → 1.6.3

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.
@@ -4,8 +4,8 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
4
4
  import classNames from 'classnames';
5
5
  import styles from './index.module.css';
6
6
  const LanguageDropdown = ({ onChange = () => { }, currentLanguage, availableLanguages, ariaLabel, }) => {
7
- return (_jsxs(DropdownMenu.Root, { children: [_jsx(DropdownMenu.Trigger, { asChild: true, children: _jsx("button", { className: styles.languageDropdown, "aria-label": ariaLabel, children: _jsx(LanguageIcon, { height: "20" }) }) }), _jsx(DropdownMenu.Portal, { children: _jsx(DropdownMenu.Content, { align: "start", className: styles.dropDownContent, sideOffset: 5, children: _jsx("div", { children: availableLanguages.map(({ name, code, localName }) => (_jsx(DropdownMenu.Item, { onClick: () => onChange({ name, code, localName }), className: classNames(styles.dropDownItem, {
7
+ return (_jsxs(DropdownMenu.Root, { children: [_jsx(DropdownMenu.Trigger, { asChild: true, children: _jsx("button", { className: styles.languageDropdown, "aria-label": ariaLabel, children: _jsx(LanguageIcon, { height: "20" }) }) }), _jsx(DropdownMenu.Portal, { children: _jsx(DropdownMenu.Content, { align: "start", className: styles.dropDownContent, sideOffset: 5, children: _jsx("div", { children: availableLanguages.map(({ name, code, localName, hrefLang }) => (_jsx(DropdownMenu.Item, { "aria-label": name, onClick: () => onChange({ name, code, localName, hrefLang }), className: classNames(styles.dropDownItem, {
8
8
  [styles.currentDropDown]: code === currentLanguage,
9
- }), children: localName }, code))) }) }) })] }));
9
+ }), children: _jsx("span", { lang: hrefLang, "aria-hidden": "true", children: localName }) }, code))) }) }) })] }));
10
10
  };
11
11
  export default LanguageDropdown;
@@ -1,2 +1,2 @@
1
1
  /*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
2
- .container{gap:calc(var(--spacing,.25rem)*3);flex-direction:column;display:flex}.title{font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height,1.5));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600)}.root{gap:calc(var(--spacing,.25rem)*4);border-radius:var(--radius-sm,.25rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-200,#e9edf0);padding-inline:calc(var(--spacing,.25rem)*4);padding-block:calc(var(--spacing,.25rem)*3);flex-direction:column;display:flex}.root:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-neutral-900,#2c3437)}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
2
+ .container{gap:calc(var(--spacing,.25rem)*3);flex-direction:column;display:flex}.title{font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height,1.5));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600)}.root{margin-bottom:calc(var(--spacing,.25rem)*3);gap:calc(var(--spacing,.25rem)*4);border-radius:var(--radius-sm,.25rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-200,#e9edf0);padding-inline:calc(var(--spacing,.25rem)*4);padding-block:calc(var(--spacing,.25rem)*3);flex-direction:column;display:flex}.root:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-neutral-900,#2c3437)}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
@@ -1,9 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Signature from '#ui/Common/Signature';
3
3
  const renderSignature = (param, index) => (_jsx(Signature, { name: param.name, type: param.type, optional: param.optional, description: param.description, kind: param.kind, children: param.children?.map((child, i) => renderSignature(child, i)) }, `${param.name}-${index}`));
4
4
  const FunctionSignature = ({ title, items }) => {
5
5
  if (title) {
6
- return (_jsx(Signature, { title: title, children: items.map((param, i) => renderSignature(param, i)) }));
6
+ const attributes = [];
7
+ const returnTypes = [];
8
+ for (const item of items) {
9
+ const target = item.kind === 'return' ? returnTypes : attributes;
10
+ target.push(item);
11
+ }
12
+ return (_jsxs(_Fragment, { children: [_jsx(Signature, { title: title, children: attributes.map((param, i) => renderSignature(param, i)) }), returnTypes.length > 0 &&
13
+ returnTypes.map((param, i) => renderSignature(param, attributes.length + i))] }));
7
14
  }
8
15
  return items.map((param, i) => renderSignature(param, i));
9
16
  };
package/dist/constants.js CHANGED
@@ -3,4 +3,5 @@ export const CODE_LIKE_TYPES = new Set([
3
3
  'classMethod',
4
4
  'function',
5
5
  'ctor',
6
+ 'property',
6
7
  ]);
package/dist/types.d.ts CHANGED
@@ -10,4 +10,5 @@ export type SimpleLocaleConfig = {
10
10
  code: string;
11
11
  localName: string;
12
12
  name: string;
13
+ hrefLang: string;
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-core/ui-components",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": {