Compare commits

...
Author SHA1 Message Date
github-actions[bot]andgithub-actions[bot] 46af5defd9 Version Packages (#2001)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-24 15:32:35 +02:00
Ken 30eee0dac4 🐛 Fikset htmlSize-prop for <Search /> (#2000) 2023-05-24 14:36:34 +02:00
Ken 76b3a65572 Update README.md 2023-05-23 12:39:10 +02:00
30 changed files with 137 additions and 32 deletions

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
# @navikt/aksel-icons
## 3.2.4
## 3.2.3
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel-icons",
"version": "3.2.3",
"version": "3.2.4",
"author": "Aksel | NAV",
"homepage": "https://aksel.nav.no/ikoner",
"repository": {
+7
View File
@@ -1,5 +1,12 @@
# @navikt/aksel
## 3.2.4
### Patch Changes
- Updated dependencies [[`30eee0dac`](https://github.com/navikt/aksel/commit/30eee0dac4e3e5a1379033283a6885e646e80458)]:
- @navikt/ds-css@3.2.4
## 3.2.3
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel",
"version": "3.2.3",
"version": "3.2.4",
"description": "Aksel command line interface. Handles css-imports, codemods and more",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
@@ -29,7 +29,7 @@
},
"homepage": "https://aksel.nav.no/grunnleggende/kode/kommandolinje",
"dependencies": {
"@navikt/ds-css": "3.2.3",
"@navikt/ds-css": "3.2.4",
"axios": "1.3.6",
"chalk": "4.1.0",
"clipboardy": "^2.3.0",
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-codemod
## 3.2.4
## 3.2.3
## 3.2.2
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-codemod",
"version": "3.2.3",
"version": "3.2.4",
"description": "Aksel codemods for NAVs designsystem",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
+2 -2
View File
@@ -40,8 +40,8 @@
"build-pict": "svgr --silent --index-template index-template.js --out-dir src/pictograms pictograms"
},
"dependencies": {
"@navikt/ds-icons": "^3.2.3",
"@navikt/ds-react": "^3.2.3",
"@navikt/ds-icons": "^3.2.4",
"@navikt/ds-react": "^3.2.4",
"clsx": "^1.1.1"
},
"devDependencies": {
+6
View File
@@ -1,5 +1,11 @@
# @navikt/ds-css
## 3.2.4
### Patch Changes
- [#2000](https://github.com/navikt/aksel/pull/2000) [`30eee0dac`](https://github.com/navikt/aksel/commit/30eee0dac4e3e5a1379033283a6885e646e80458) Thanks [@KenAJoh](https://github.com/KenAJoh)! - :bug: Search støtter nå htmlSize-prop
## 3.2.3
### Patch Changes
+4
View File
@@ -17,6 +17,10 @@
width: 100%;
}
.navds-search--with-size :where(.navds-search__wrapper-inner) {
width: inherit;
}
.navds-search__wrapper {
display: inline-flex;
align-items: center;
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css",
"version": "3.2.3",
"version": "3.2.4",
"description": "CSS for NAV Designsystem",
"author": "Aksel | NAV designsystem team",
"keywords": [
@@ -27,7 +27,7 @@
"css:get-version": "node config/get-version.js"
},
"devDependencies": {
"@navikt/ds-tokens": "^3.2.3",
"@navikt/ds-tokens": "^3.2.4",
"cssnano": "6.0.0",
"fast-glob": "3.2.11",
"lodash": "4.17.21",
+9
View File
@@ -1,5 +1,14 @@
# @navikt/ds-react
## 3.2.4
### Patch Changes
- [#2000](https://github.com/navikt/aksel/pull/2000) [`30eee0dac`](https://github.com/navikt/aksel/commit/30eee0dac4e3e5a1379033283a6885e646e80458) Thanks [@KenAJoh](https://github.com/KenAJoh)! - :bug: Search støtter nå htmlSize-prop
- Updated dependencies []:
- @navikt/aksel-icons@3.2.4
## 3.2.3
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react",
"version": "3.2.3",
"version": "3.2.4",
"description": "Aksel react-components for NAV designsystem",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
@@ -38,7 +38,7 @@
},
"dependencies": {
"@floating-ui/react": "0.17.0",
"@navikt/aksel-icons": "^3.2.3",
"@navikt/aksel-icons": "^3.2.4",
"@radix-ui/react-tabs": "1.0.0",
"@radix-ui/react-toggle-group": "1.0.0",
"clsx": "^1.2.1",
@@ -67,6 +67,10 @@ export interface SearchProps
* @default "primary"
*/
variant?: "primary" | "secondary" | "simple";
/**
* Exposes the HTML size attribute
*/
htmlSize?: number | string;
}
interface SearchComponent
@@ -112,6 +116,7 @@ export const Search = forwardRef<HTMLInputElement, SearchProps>(
defaultValue,
onChange,
onSearchClick,
htmlSize,
...rest
} = props;
@@ -164,9 +169,11 @@ export const Search = forwardRef<HTMLInputElement, SearchProps>(
"navds-form-field",
`navds-form-field--${size}`,
"navds-search",
{
"navds-search--error": hasError,
"navds-search--disabled": !!inputProps.disabled,
"navds-search--with-size": !!htmlSize,
}
)}
>
@@ -215,6 +222,7 @@ export const Search = forwardRef<HTMLInputElement, SearchProps>(
"navds-body-short",
`navds-body-${size}`
)}
{...(htmlSize ? { size: Number(htmlSize) } : {})}
/>
{(value ?? internalValue) && clearButton && (
<button
@@ -164,3 +164,28 @@ export const NoClearButton = () => (
/>
</div>
);
export const HtmlSize = () => (
<div className="colgap">
<Search
label="Lorem ipsum dolor sit amet"
description="Saepe laborum delectus officia perferendis quaerat excepturi possimus hic enim dicta assumenda."
hideLabel={false}
htmlSize="20"
/>
<Search
label="Lorem ipsum dolor sit amet"
description="Saepe laborum delectus officia perferendis quaerat excepturi possimus hic enim dicta assumenda."
hideLabel={false}
htmlSize="20"
variant="secondary"
/>
<Search
label="Lorem ipsum dolor sit amet"
description="Saepe laborum delectus officia perferendis quaerat excepturi possimus hic enim dicta assumenda."
hideLabel={false}
htmlSize="20"
variant="simple"
/>
</div>
);
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-tailwind
## 3.2.4
## 3.2.3
## 3.2.2
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tailwind",
"version": "3.2.3",
"version": "3.2.4",
"description": "Tailwind config based on @navikt/ds-tokens",
"author": "Aksel | NAV designsystem team",
"keywords": [
@@ -22,7 +22,7 @@
"directory": "@navikt/core/tailwind"
},
"devDependencies": {
"@navikt/ds-tokens": "^3.2.3",
"@navikt/ds-tokens": "^3.2.4",
"@types/jest": "^29.0.0",
"color": "4.2.3",
"jest": "^29.0.0",
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-tokens
## 3.2.4
## 3.2.3
## 3.2.2
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tokens",
"version": "3.2.3",
"version": "3.2.4",
"description": "Design-tokens for NAV designsystem",
"author": "Aksel | NAV designsystem team",
"keywords": [
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-icons
## 3.2.4
## 3.2.3
## 3.2.2
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-icons",
"version": "3.2.3",
"version": "3.2.4",
"description": "Aksel icons for NAV",
"author": "Aksel | NAV designsystem team",
"repository": {
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-css-internal
## 3.2.4
## 3.2.3
## 3.2.2
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css-internal",
"version": "3.2.3",
"version": "3.2.4",
"description": "CSS for NAV internal Designsystem-components",
"author": "Aksel | NAV designsystem team",
"keywords": [
+8
View File
@@ -1,5 +1,13 @@
# @navikt/ds-react-internal
## 3.2.4
### Patch Changes
- Updated dependencies [[`30eee0dac`](https://github.com/navikt/aksel/commit/30eee0dac4e3e5a1379033283a6885e646e80458)]:
- @navikt/ds-react@3.2.4
- @navikt/aksel-icons@3.2.4
## 3.2.3
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react-internal",
"version": "3.2.3",
"version": "3.2.4",
"description": "Aksel react components for internal UIs in NAV",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
@@ -36,8 +36,8 @@
"watch": "tsc --watch -p tsconfig.esm.json"
},
"dependencies": {
"@navikt/aksel-icons": "^3.2.3",
"@navikt/ds-react": "^3.2.3",
"@navikt/aksel-icons": "^3.2.4",
"@navikt/ds-react": "^3.2.4",
"clsx": "^1.1.1",
"copy-to-clipboard": "^3.3.1"
},
+1 -1
View File
@@ -15,7 +15,7 @@
<img src="https://img.shields.io/badge/PRs-welcome-green.svg?color=%23262626"" />
</a>
</div>
<div><a href="https://www.npmjs.com/package/@navikt/ds-css"><img alt="npm" src="https://img.shields.io/npm/v/@navikt/ds-css?label=%40navikt%2Fds-*"></a></div>
<div><a href="https://www.npmjs.com/package/@navikt/ds-css"><img alt="npm" src="https://img.shields.io/npm/v/@navikt/ds-css?label=version"></a></div>
<br/>
<a href="https://aksel.nav.no">Nettside</a> | <a href="https://github.com/navikt/aksel/issues">Issues</a>
<br/>
+9 -9
View File
@@ -15,15 +15,15 @@
"website"
],
"dependencies": {
"@navikt/aksel-icons": "^3.2.3",
"@navikt/ds-codemod": "^3.2.3",
"@navikt/ds-css": "^3.2.3",
"@navikt/ds-css-internal": "^3.2.3",
"@navikt/ds-icons": "^3.2.3",
"@navikt/ds-react": "^3.2.3",
"@navikt/ds-react-internal": "^3.2.3",
"@navikt/ds-tailwind": "^3.2.3",
"@navikt/ds-tokens": "^3.2.3"
"@navikt/aksel-icons": "^3.2.4",
"@navikt/ds-codemod": "^3.2.4",
"@navikt/ds-css": "^3.2.4",
"@navikt/ds-css-internal": "^3.2.4",
"@navikt/ds-icons": "^3.2.4",
"@navikt/ds-react": "^3.2.4",
"@navikt/ds-react-internal": "^3.2.4",
"@navikt/ds-tailwind": "^3.2.4",
"@navikt/ds-tokens": "^3.2.4"
},
"devDependencies": {
"prettier-plugin-tailwindcss": "^0.2.3"
@@ -12,5 +12,5 @@ const Example = () => {
export default withDsExample(Example, "inverted");
export const args = {
index: 6,
index: 7,
};
@@ -21,5 +21,5 @@ export const Demo = {
};
export const args = {
index: 5,
index: 6,
};
@@ -0,0 +1,26 @@
import { Search } from "@navikt/ds-react";
import { withDsExample } from "components/website-modules/examples/withDsExample";
const Example = () => {
return (
<form>
<Search
label="Hva er artikkelnummeret til denne varen?"
description="Art.nr. finner du på varens produktside eller i katalogen."
hideLabel={false}
htmlSize="12"
/>
</form>
);
};
export default withDsExample(Example);
/* Storybook story */
export const Demo = {
render: Example,
};
export const args = {
index: 5,
};
+2 -2
View File
@@ -10,8 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@navikt/ds-css": "3.2.3",
"@navikt/ds-react": "3.2.3",
"@navikt/ds-css": "3.2.4",
"@navikt/ds-react": "3.2.4",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},