Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions AI_DESIGN_SYSTEM_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ import { Avatar } from 'rk-designsystem';
asChild={false} // valgfri, default false: boolean
// children — valgfri: ReactNode
// data-color — valgfri: (string & {}) | keyof ColorDefinitions | keyof SeverityColorDefinitions
data-initials="…" // valgfri: string
data-size="sm" // valgfri: 'sm' | 'md' | 'lg' | 'xs'
data-tooltip="…" // valgfri: string
initials="…" // valgfri: string
Expand Down Expand Up @@ -1254,15 +1255,9 @@ import { SearchButton } from 'rk-designsystem';
import { SearchClear } from 'rk-designsystem';

<SearchClear
asChild={false} // valgfri, default false: boolean
command="…" // valgfri: string
commandfor="…" // valgfri: string
commandFor="…" // valgfri: string
aria-label="…" // valgfri: string
// data-color — valgfri: (string & {}) | keyof ColorDefinitions | keyof SeverityColorDefinitions
// data-size — valgfri: Size | (string & {})
icon={false} // valgfri, default false: boolean
// loading — valgfri, default false: ReactNode
type="button" // valgfri, default 'button': 'button' | 'submit' | 'reset'
/>
```

Expand Down
65 changes: 15 additions & 50 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -986,53 +986,11 @@
"required": false
},
{
"name": "asChild",
"type": "boolean",
"description": "Change the default rendered element for the one passed as a child, merging their props and behavior.",
"defaultValue": "false",
"required": false
},
{
"name": "type",
"type": "'button' | 'submit' | 'reset'",
"description": "Specify the type of button. Unset when `asChild` is true",
"defaultValue": "'button'",
"required": false
},
{
"name": "icon",
"type": "boolean",
"description": "Toggle icon only styling, pass icon as children\nWhen combined with loading, the loading-icon will be shown instead of the icon.",
"defaultValue": "false",
"required": false
},
{
"name": "command",
"type": "string",
"description": "Native invoker commands. Specifies actions to perform on an element specified by commandfor. Polyfilled by designsystemet-web and includes a custom --show-non-modal command.\n\"show-modal\", \"close\", \"request-close\", \"show-popover\", \"hide-popover\", \"toggle-popover\", \"--show-non-modal\"",
"defaultValue": null,
"required": false
},
{
"name": "commandfor",
"name": "aria-label",
"type": "string",
"description": "Specifies the target element for \"command\".\nvalue is ID of target",
"description": "Aria label for the clear button\n@deprecated Please use `--dsc-suggestion-sr-clear` or `data-sr-clear` on Suggestion to set label.",
"defaultValue": null,
"required": false
},
{
"name": "commandFor",
"type": "string",
"description": "",
"defaultValue": null,
"required": false
},
{
"name": "loading",
"type": "ReactNode",
"description": "Toggle loading state.\nPass an element if you want to display a custom loader.",
"defaultValue": "false",
"required": false
}
]
},
Expand Down Expand Up @@ -2542,16 +2500,16 @@
"required": false
},
{
"name": "onOpen",
"name": "onClose",
"type": "(() => void)",
"description": "Callback when the popover wants to open.",
"description": "Callback when the popover wants to close.",
"defaultValue": null,
"required": false
},
{
"name": "onClose",
"name": "onOpen",
"type": "(() => void)",
"description": "Callback when the popover wants to close.",
"description": "Callback when the popover wants to open.",
"defaultValue": null,
"required": false
},
Expand Down Expand Up @@ -3956,7 +3914,14 @@
{
"name": "initials",
"type": "string",
"description": "Initials to display inside the avatar.",
"description": "Initials to display inside the avatar.\n@deprecated Please use text content as children instead",
"defaultValue": null,
"required": false
},
{
"name": "data-initials",
"type": "string",
"description": "Initials to display inside the avatar.\n@deprecated Please use text content as children instead",
"defaultValue": null,
"required": false
},
Expand All @@ -3970,7 +3935,7 @@
{
"name": "children",
"type": "ReactNode",
"description": "Image, icon or initials to display inside the avatar.\n\nGets `aria-hidden=\"true\"`",
"description": "Image, icon or initials to display inside the avatar.",
"defaultValue": null,
"required": false
}
Expand Down
Loading
Loading