@mich8060/unified-design-system 0.2.39 → 0.2.41
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/ai/manifest.json +9 -0
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/SearchInput/SearchInput.cjs +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/Tabs/TabItem.cjs +1 -1
- package/dist/components/Tabs/TabItem.js +1 -1
- package/dist/components/Tag/Tag.cjs +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TextInput/TextInput.cjs +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/design-system/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/design-system/components/Dropdown/Dropdown.types.d.ts +2 -0
- package/dist/design-system/components/SearchInput/SearchInput.d.ts +2 -1
- package/dist/design-system/components/SearchInput/SearchInput.types.d.ts +19 -0
- package/dist/design-system/components/Tag/Tag.d.ts +2 -1
- package/dist/design-system/components/Tag/Tag.types.d.ts +7 -3
- package/dist/design-system/components/Tag/index.d.ts +1 -1
- package/dist/design-system/components/TextInput/TextInput.d.ts +1 -1
- package/dist/design-system/components/TextInput/TextInput.types.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/ai/manifest.json
CHANGED
|
@@ -2760,6 +2760,14 @@
|
|
|
2760
2760
|
"slots": null,
|
|
2761
2761
|
"states": [],
|
|
2762
2762
|
"props": {
|
|
2763
|
+
"outlined": {
|
|
2764
|
+
"type": "enum",
|
|
2765
|
+
"values": [
|
|
2766
|
+
true,
|
|
2767
|
+
false
|
|
2768
|
+
],
|
|
2769
|
+
"default": false
|
|
2770
|
+
},
|
|
2763
2771
|
"appearance": {
|
|
2764
2772
|
"type": "enum",
|
|
2765
2773
|
"values": [
|
|
@@ -2803,6 +2811,7 @@
|
|
|
2803
2811
|
}
|
|
2804
2812
|
},
|
|
2805
2813
|
"defaults": {
|
|
2814
|
+
"outlined": false,
|
|
2806
2815
|
"appearance": "label-only",
|
|
2807
2816
|
"size": "compact",
|
|
2808
2817
|
"color": "transparent",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),l=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),l=require("react"),L=require("../Icon/Icon.cjs"),k=require("../ActionMenu/ActionMenu.cjs");;/* empty css */const t="uds-dropdown",b={compact:"compact",default:null},g={default:null,focused:"focused",error:"error",disabled:"disabled"};function A({options:m=[],value:n,onChange:r,placeholder:o,size:f="default",state:p="default",placement:v="bottom-start",searchable:S=!0,menuFullWidth:h=!0,id:j,className:w="",disabled:a=!1,...x}){const[c,C]=l.useState(!1),M=l.useId(),N=j||`dropdown-${M}`,u=l.useMemo(()=>m.map(e=>typeof e=="string"?{value:e,label:e}:e),[m]),$=a?"disabled":p==="default"&&c?"focused":p,i=u.find(e=>e.value===n),d=typeof o=="string"&&o.trim().length>0?o.trim():"Select an option",I=i?i.label:d,O=l.useMemo(()=>u.map(e=>({id:e.value,label:e.label,active:e.value===n,onClick:()=>{r&&!a&&r(e.value)}})),[u,n,r,a]),q=[t,b[f]&&`${t}--${b[f]}`,g[$]&&`${t}--${g[$]}`,c&&`${t}--open`,w].filter(Boolean).join(" "),_={...x};delete _.label;const y=s.jsxs("button",{type:"button",id:N,className:`${t}__trigger`,disabled:a,"aria-label":d,..._,children:[s.jsx("span",{className:`${t}__value ${i?"":`${t}__value--placeholder`}`,children:I}),s.jsx(L.default,{name:"CaretDown",size:16,appearance:"regular",className:`${t}__icon ${c?`${t}__icon--open`:""}`})]});return s.jsx("div",{className:`${t}-outer`,children:s.jsx(k.default,{trigger:y,items:O,variant:S?"search":"default",searchPlaceholder:`Search ${d.toLowerCase()}`,placement:v,fullWidth:h,disabled:a,onOpenChange:C,className:q,menuClassName:`${t}__menu`})})}const B=l.memo(A);exports.default=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s,jsxs as
|
|
1
|
+
import{jsx as s,jsxs as k}from"react/jsx-runtime";import A,{useState as B,useId as D,useMemo as _}from"react";import z from"../Icon/Icon.js";import P from"../ActionMenu/ActionMenu.js";/* empty css */const t="uds-dropdown",b={compact:"compact",default:null},g={default:null,focused:"focused",error:"error",disabled:"disabled"};function E({options:d=[],value:o,onChange:l,placeholder:r,size:m="default",state:p="default",placement:h="bottom-start",searchable:v=!0,menuFullWidth:w=!0,id:C,className:N="",disabled:a=!1,...S}){const[n,I]=B(!1),O=D(),x=C||`dropdown-${O}`,c=_(()=>d.map(e=>typeof e=="string"?{value:e,label:e}:e),[d]),f=a?"disabled":p==="default"&&n?"focused":p,u=c.find(e=>e.value===o),i=typeof r=="string"&&r.trim().length>0?r.trim():"Select an option",y=u?u.label:i,L=_(()=>c.map(e=>({id:e.value,label:e.label,active:e.value===o,onClick:()=>{l&&!a&&l(e.value)}})),[c,o,l,a]),M=[t,b[m]&&`${t}--${b[m]}`,g[f]&&`${t}--${g[f]}`,n&&`${t}--open`,N].filter(Boolean).join(" "),$={...S};delete $.label;const j=k("button",{type:"button",id:x,className:`${t}__trigger`,disabled:a,"aria-label":i,...$,children:[s("span",{className:`${t}__value ${u?"":`${t}__value--placeholder`}`,children:y}),s(z,{name:"CaretDown",size:16,appearance:"regular",className:`${t}__icon ${n?`${t}__icon--open`:""}`})]});return s("div",{className:`${t}-outer`,children:s(P,{trigger:j,items:L,variant:v?"search":"default",searchPlaceholder:`Search ${i.toLowerCase()}`,placement:h,fullWidth:w,disabled:a,onOpenChange:I,className:M,menuClassName:`${t}__menu`})})}const G=A.memo(E);export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h=require("../Dropdown/Dropdown.cjs");;/* empty css */const S=require("../TextInput/TextInput.cjs"),m="uds-search-input";function p({dropdownOptions:e,dropdownValue:c,onDropdownChange:t,dropdownPlaceholder:o="All",dropdownDisabled:u=!1,dropdownPlacement:i="bottom-end",className:f="",disabled:l=!1,size:n="default",...r}){const d=!!(e&&e.length>0)?s.jsx(h.default,{options:e,value:c,onChange:a=>{typeof a=="string"&&(t==null||t(a))},placeholder:o,size:n,placement:i,disabled:l||u,searchable:!1,menuFullWidth:!1,className:`${m}__dropdown-control`}):null;return s.jsx(S.default,{type:"search",icon:"MagnifyingGlass",iconPosition:"left",placeholder:r.placeholder??"Search",className:f,disabled:l,size:n,endAdornment:d,...r})}exports.SearchInput=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import u from"../Dropdown/Dropdown.js";/* empty css */import h from"../TextInput/TextInput.js";const d="uds-search-input";function x({dropdownOptions:e,dropdownValue:c,onDropdownChange:l,dropdownPlaceholder:s="All",dropdownDisabled:f=!1,dropdownPlacement:i="bottom-end",className:m="",disabled:t=!1,size:o="default",...r}){const p=!!(e&&e.length>0)?n(u,{options:e,value:c,onChange:a=>{typeof a=="string"&&(l==null||l(a))},placeholder:s,size:o,placement:i,disabled:t||f,searchable:!1,menuFullWidth:!1,className:`${d}__dropdown-control`}):null;return n(h,{type:"search",icon:"MagnifyingGlass",iconPosition:"left",placeholder:r.placeholder??"Search",className:m,disabled:t,size:o,endAdornment:p,...r})}export{x as SearchInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("react"),v=require("../Icon/Icon.cjs"),x=require("../Tag/Tag.cjs"),t="uds-tabs-item";function T({label:s,appearance:m="underline",active:c=!1,icon:l,tag:e,tagVariant:b="neutral",className:p="",onClick:n,...i}){const y=[t,`${t}--${m}`,c&&"active",p].filter(Boolean).join(" "),j=n?"button":"div",_=!!l&&typeof l=="string",S=e===!0||e!==!1&&(typeof e=="number"||typeof e=="string");let a="";s!=null&&(typeof s=="string"?a=s:a=String(s));const u={};return Object.keys(i).forEach(f=>{const o=i[f];(o==null||typeof o!="object"||d.isValidElement(o))&&(u[f]=o)}),r.jsxs(j,{className:y,onClick:n,role:n?"tab":void 0,"aria-selected":n?c:void 0,...u,children:[_&&r.jsx(v.default,{name:l,size:16,appearance:"bold",className:`${t}__icon`}),a&&r.jsx("span",{className:`${t}__label`,children:a}),S&&r.jsx(x.default,{label:typeof e=="number"||typeof e=="string"?String(e):"Label",size:"compact",appearance:"label-only",rounded:!0,solid:!0,color:b==="sky"?"sky":"neutral",className:`${t}__tag`})]})}const $=d.memo(T);exports.default=$;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as j,jsx as l}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as j,jsx as l}from"react/jsx-runtime";import p from"react";import N from"../Icon/Icon.js";import S from"../Tag/Tag.js";const t="uds-tabs-item";function T({label:s,appearance:u="underline",active:i=!1,icon:r,tag:e,tagVariant:d="neutral",className:b="",onClick:o,...c}){const y=[t,`${t}--${u}`,i&&"active",b].filter(Boolean).join(" "),_=o?"button":"div",$=!!r&&typeof r=="string",h=e===!0||e!==!1&&(typeof e=="number"||typeof e=="string");let a="";s!=null&&(typeof s=="string"?a=s:a=String(s));const m={};return Object.keys(c).forEach(f=>{const n=c[f];(n==null||typeof n!="object"||p.isValidElement(n))&&(m[f]=n)}),j(_,{className:y,onClick:o,role:o?"tab":void 0,"aria-selected":o?i:void 0,...m,children:[$&&l(N,{name:r,size:16,appearance:"bold",className:`${t}__icon`}),a&&l("span",{className:`${t}__label`,children:a}),h&&l(S,{label:typeof e=="number"||typeof e=="string"?String(e):"Label",size:"compact",appearance:"label-only",rounded:!0,solid:!0,color:d==="sky"?"sky":"neutral",className:`${t}__tag`})]})}const g=p.memo(T);export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),b=require("../Icon/Icon.cjs");;/* empty css */const e="uds-tag",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),b=require("../Icon/Icon.cjs");;/* empty css */const e="uds-tag",_={"label-only":"label-only","icon-left":"icon-left"},u={compact:"compact",default:"default"},j={transparent:"transparent",neutral:"neutral",red:"red",orange:"orange",yellow:"yellow",emerald:"emerald",green:"green",sky:"sky",cyan:"cyan",blue:"blue",indigo:"indigo",purple:"purple",fuchsia:"fuchsia",magenta:"magenta",inverse:"inverse"};function h({label:l="Label",appearance:t="label-only",size:s="compact",color:i="transparent",rounded:p=!0,solid:r=!1,outlined:d=!1,icon:a,className:m="",onClick:o,...f}){const g=d&&!r,y=[e,`${e}--${_[t]}`,u[s]&&`${e}--${u[s]}`,`${e}--${j[i]}`,p&&`${e}--rounded`,r&&`${e}--solid`,g&&`${e}--outlined`,m].filter(Boolean).join(" "),$=o?"button":"span",c=t==="icon-left"&&a;return n.jsxs($,{className:y,onClick:o,...f,children:[c&&typeof a=="string"&&n.jsx(b.default,{name:a,size:s==="compact"?10:12,appearance:"regular",className:`${e}__icon`}),c&&typeof a!="string"&&n.jsx("span",{className:`${e}__icon`,children:a}),l&&n.jsx("span",{className:`${e}__label`,children:l})]})}exports.default=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as b,jsx as
|
|
1
|
+
import{jsxs as b,jsx as s}from"react/jsx-runtime";import _ from"../Icon/Icon.js";/* empty css */const e="uds-tag",h={"label-only":"label-only","icon-left":"icon-left"},p={compact:"compact",default:"default"},N={transparent:"transparent",neutral:"neutral",red:"red",orange:"orange",yellow:"yellow",emerald:"emerald",green:"green",sky:"sky",cyan:"cyan",blue:"blue",indigo:"indigo",purple:"purple",fuchsia:"fuchsia",magenta:"magenta",inverse:"inverse"};function M({label:l="Label",appearance:t="label-only",size:n="compact",color:i="transparent",rounded:m=!0,solid:o=!1,outlined:u=!1,icon:a,className:d="",onClick:r,...f}){const g=u&&!o,$=[e,`${e}--${h[t]}`,p[n]&&`${e}--${p[n]}`,`${e}--${N[i]}`,m&&`${e}--rounded`,o&&`${e}--solid`,g&&`${e}--outlined`,d].filter(Boolean).join(" "),y=r?"button":"span",c=t==="icon-left"&&a;return b(y,{className:$,onClick:r,...f,children:[c&&typeof a=="string"&&s(_,{name:a,size:n==="compact"?10:12,appearance:"regular",className:`${e}__icon`}),c&&typeof a!="string"&&s("span",{className:`${e}__icon`,children:a}),l&&s("span",{className:`${e}__label`,children:l})]})}export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),R=require("react"),k=require("../Icon/Icon.cjs");;/* empty css */const e="uds-input",x={compact:"compact",default:"default"},I={default:"default",focused:"focused",error:"error",disabled:"disabled"};function z({value:h,onChange:N,placeholder:v,type:g="text",size:o="default",state:B="default",disabled:u=!1,icon:t,iconPosition:i="right",onIconClick:p,id:S,label:d,helperText:r,errorText:l,endAdornment:n,className:y="","aria-describedby":C,...q}){const a=u?"disabled":B,w=R.useId().replace(/:/g,""),c=S??(!!d||!!r||!!l?`${e}-${w}`:void 0),$=r?`${c}-helper-text`:void 0,_=l?`${c}-error-text`:void 0,M=[C,a==="error"?_:$].filter(Boolean).join(" ")||void 0,E=[e,x[o]&&`${e}--${x[o]}`,I[a]&&`${e}--${I[a]}`,t&&`${e}--has-icon-${i}`,n&&`${e}--has-end-adornment`].filter(Boolean).join(" "),f=[`${e}-wrapper`,t&&`${e}-wrapper--icon-${i}`,n&&`${e}-wrapper--has-end-adornment`,y].filter(Boolean).join(" "),m=s.jsx("input",{id:c,type:g,className:E,value:h,onChange:N,placeholder:v,disabled:u||a==="disabled","aria-invalid":a==="error"?!0:void 0,"aria-describedby":M,...q}),j=()=>{if(!t)return s.jsxs("div",{className:f,children:[m,n?s.jsx("span",{className:`${e}__end-adornment`,children:n}):null]});const G=o==="compact"?16:20,b=typeof t=="string"?s.jsx(k.default,{name:t,size:G}):t,O=p?s.jsx("button",{type:"button",className:`${e}__icon ${e}__icon--${i} ${e}__icon--clickable`,onClick:p,disabled:u||a==="disabled",tabIndex:-1,"aria-label":"Input action",children:b}):s.jsx("span",{className:`${e}__icon ${e}__icon--${i}`,children:b});return s.jsxs("div",{className:f,children:[m,O,n?s.jsx("span",{className:`${e}__end-adornment`,children:n}):null]})};return!d&&!r&&!l?j():s.jsxs("div",{className:`${e}-field`,children:[d?s.jsx("label",{className:`${e}__label`,htmlFor:c,children:d}):null,j(),a==="error"&&l?s.jsx("p",{id:_,className:`${e}__supporting-text ${e}__supporting-text--error`,children:l}):null,a!=="error"&&r?s.jsx("p",{id:$,className:`${e}__supporting-text`,children:r}):null]})}exports.default=z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as u,jsx as a}from"react/jsx-runtime";import F from"react";import L from"../Icon/Icon.js";/* empty css */const e="uds-input",N={compact:"compact",default:"default"},v={default:"default",focused:"focused",error:"error",disabled:"disabled"};function J({value:g,onChange:B,placeholder:x,type:S="text",size:c="default",state:j="default",disabled:p=!1,icon:s,iconPosition:l="right",onIconClick:$,id:y,label:o,helperText:r,errorText:i,endAdornment:n,className:C="","aria-describedby":w,...E}){const t=p?"disabled":j,z=F.useId().replace(/:/g,""),d=y??(!!o||!!r||!!i?`${e}-${z}`:void 0),m=r?`${d}-helper-text`:void 0,f=i?`${d}-error-text`:void 0,G=[w,t==="error"?f:m].filter(Boolean).join(" ")||void 0,M=[e,N[c]&&`${e}--${N[c]}`,v[t]&&`${e}--${v[t]}`,s&&`${e}--has-icon-${l}`,n&&`${e}--has-end-adornment`].filter(Boolean).join(" "),_=[`${e}-wrapper`,s&&`${e}-wrapper--icon-${l}`,n&&`${e}-wrapper--has-end-adornment`,C].filter(Boolean).join(" "),I=a("input",{id:d,type:S,className:M,value:g,onChange:B,placeholder:x,disabled:p||t==="disabled","aria-invalid":t==="error"?!0:void 0,"aria-describedby":G,...E}),b=()=>{if(!s)return u("div",{className:_,children:[I,n?a("span",{className:`${e}__end-adornment`,children:n}):null]});const h=typeof s=="string"?a(L,{name:s,size:c==="compact"?16:20}):s,k=$?a("button",{type:"button",className:`${e}__icon ${e}__icon--${l} ${e}__icon--clickable`,onClick:$,disabled:p||t==="disabled",tabIndex:-1,"aria-label":"Input action",children:h}):a("span",{className:`${e}__icon ${e}__icon--${l}`,children:h});return u("div",{className:_,children:[I,k,n?a("span",{className:`${e}__end-adornment`,children:n}):null]})};return!o&&!r&&!i?b():u("div",{className:`${e}-field`,children:[o?a("label",{className:`${e}__label`,htmlFor:d,children:o}):null,b(),t==="error"&&i?a("p",{id:f,className:`${e}__supporting-text ${e}__supporting-text--error`,children:i}):null,t!=="error"&&r?a("p",{id:m,className:`${e}__supporting-text`,children:r}):null]})}export{J as default};
|
|
@@ -18,6 +18,6 @@ import type { DropdownProps } from "./Dropdown.types";
|
|
|
18
18
|
* @param {boolean} disabled - Whether the dropdown is disabled
|
|
19
19
|
* @param {object} props - Additional props to pass to the trigger button
|
|
20
20
|
*/
|
|
21
|
-
declare function Dropdown({ options, value, onChange, placeholder, size, state, placement, id, className, disabled, ...props }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function Dropdown({ options, value, onChange, placeholder, size, state, placement, searchable, menuFullWidth, id, className, disabled, ...props }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
declare const _default: React.MemoExoticComponent<typeof Dropdown>;
|
|
23
23
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import "./_search-input.scss";
|
|
1
2
|
import type { SearchInputProps } from "./SearchInput.types";
|
|
2
|
-
export declare function SearchInput(props: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function SearchInput({ dropdownOptions, dropdownValue, onDropdownChange, dropdownPlaceholder, dropdownDisabled, dropdownPlacement, className, disabled, size, ...props }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
import type { TextInputProps } from "../TextInput";
|
|
2
|
+
export interface SearchInputDropdownOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
2
6
|
export interface SearchInputProps extends Omit<TextInputProps, "type" | "icon" | "iconPosition"> {
|
|
7
|
+
/**
|
|
8
|
+
* Optional scope/filter dropdown rendered inside the right side of the input.
|
|
9
|
+
* Pass options to enable it.
|
|
10
|
+
*/
|
|
11
|
+
dropdownOptions?: SearchInputDropdownOption[];
|
|
12
|
+
/** Current selected dropdown value. */
|
|
13
|
+
dropdownValue?: string;
|
|
14
|
+
/** Called when dropdown selection changes. */
|
|
15
|
+
onDropdownChange?: (value: string) => void;
|
|
16
|
+
/** Placeholder shown in the dropdown when no value is selected. */
|
|
17
|
+
dropdownPlaceholder?: string;
|
|
18
|
+
/** Optional disabled override for the embedded dropdown. */
|
|
19
|
+
dropdownDisabled?: boolean;
|
|
20
|
+
/** Menu placement for the embedded dropdown popover. */
|
|
21
|
+
dropdownPlacement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
3
22
|
}
|
|
@@ -9,9 +9,10 @@ import type { TagProps } from "./Tag.types";
|
|
|
9
9
|
* @param {string} color - Color variant: 'transparent', 'neutral', 'red', 'orange', 'yellow', 'emerald', 'green', 'sky', 'cyan', 'blue', 'indigo', 'purple', 'fuchsia', 'magenta', 'inverse'
|
|
10
10
|
* @param {boolean} rounded - Whether to use rounded corners (default: true)
|
|
11
11
|
* @param {boolean} solid - Whether to use solid background (default: false)
|
|
12
|
+
* @param {boolean} outlined - Whether to use outlined treatment (default: false)
|
|
12
13
|
* @param {string|boolean} icon - Icon name to display (when appearance is 'icon-left')
|
|
13
14
|
* @param {string} className - Additional CSS classes
|
|
14
15
|
* @param {function} onClick - Click handler function
|
|
15
16
|
* @param {object} props - Additional props to pass to the tag element
|
|
16
17
|
*/
|
|
17
|
-
export default function Tag({ label, appearance, size, color, rounded, solid, icon, className, onClick, ...props }: TagProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default function Tag({ label, appearance, size, color, rounded, solid, outlined, icon, className, onClick, ...props }: TagProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type TagAppearance = "label-only" | "icon-left";
|
|
3
|
+
export type TagSize = "compact" | "default";
|
|
4
|
+
export type TagColor = "transparent" | "neutral" | "red" | "orange" | "yellow" | "emerald" | "green" | "sky" | "cyan" | "blue" | "indigo" | "purple" | "fuchsia" | "magenta" | "inverse";
|
|
2
5
|
export interface TagProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
6
|
label?: string;
|
|
4
|
-
appearance?:
|
|
5
|
-
size?:
|
|
6
|
-
color?:
|
|
7
|
+
appearance?: TagAppearance;
|
|
8
|
+
size?: TagSize;
|
|
9
|
+
color?: TagColor;
|
|
7
10
|
rounded?: boolean;
|
|
8
11
|
solid?: boolean;
|
|
12
|
+
outlined?: boolean;
|
|
9
13
|
icon?: string | ReactNode;
|
|
10
14
|
className?: string;
|
|
11
15
|
onClick?: (...args: unknown[]) => void;
|
|
@@ -17,4 +17,4 @@ import type { TextInputProps } from "./TextInput.types";
|
|
|
17
17
|
* @param {string} className - Additional CSS classes
|
|
18
18
|
* @param {object} props - Additional props to pass to the input element
|
|
19
19
|
*/
|
|
20
|
-
export default function Input({ value, onChange, placeholder, type, size, state, disabled, icon, iconPosition, onIconClick, id, label, helperText, errorText, className, "aria-describedby": ariaDescribedBy, ...props }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default function Input({ value, onChange, placeholder, type, size, state, disabled, icon, iconPosition, onIconClick, id, label, helperText, errorText, endAdornment, className, "aria-describedby": ariaDescribedBy, ...props }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -42,4 +42,6 @@ export interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
42
42
|
helperText?: ReactNode;
|
|
43
43
|
/** Error text rendered below the input when in error state. */
|
|
44
44
|
errorText?: ReactNode;
|
|
45
|
+
/** Optional custom element rendered inside the input on the right side. */
|
|
46
|
+
endAdornment?: ReactNode;
|
|
45
47
|
}
|