@fremtind/jkl-core
Advanced tools
Comparing version 10.0.3 to 10.0.4
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
@@ -2,0 +3,0 @@ var __defProp = Object.defineProperty; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
@@ -2,0 +3,0 @@ var __defProp = Object.defineProperty; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
@@ -5,30 +6,4 @@ var __defProp = Object.defineProperty; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __spreadValues = (a, b) => { | ||
for (var prop in b || (b = {})) | ||
if (__hasOwnProp.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
if (__getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(b)) { | ||
if (__propIsEnum.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
} | ||
return a; | ||
}; | ||
var __objRest = (source, exclude) => { | ||
var target = {}; | ||
for (var prop in source) | ||
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
target[prop] = source[prop]; | ||
if (source != null && __getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(source)) { | ||
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
target[prop] = source[prop]; | ||
} | ||
return target; | ||
}; | ||
var __export = (target, all) => { | ||
@@ -55,10 +30,8 @@ for (var name in all) | ||
var import_react = __toESM(require("react")); | ||
const Link = (_a) => { | ||
var _b = _a, { external = false, className = "", children } = _b, rest = __objRest(_b, ["external", "className", "children"]); | ||
return /* @__PURE__ */ import_react.default.createElement("a", __spreadValues({ | ||
className: (0, import_classnames.default)("jkl-link", className, { | ||
"jkl-link--external": external | ||
}) | ||
}, rest), children); | ||
}; | ||
const Link = ({ external = false, className = "", children, ...rest }) => /* @__PURE__ */ import_react.default.createElement("a", { | ||
className: (0, import_classnames.default)("jkl-link", className, { | ||
"jkl-link--external": external | ||
}), | ||
...rest | ||
}, children); | ||
//# sourceMappingURL=Link.js.map |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
@@ -5,30 +6,4 @@ var __defProp = Object.defineProperty; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __spreadValues = (a, b) => { | ||
for (var prop in b || (b = {})) | ||
if (__hasOwnProp.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
if (__getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(b)) { | ||
if (__propIsEnum.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
} | ||
return a; | ||
}; | ||
var __objRest = (source, exclude) => { | ||
var target = {}; | ||
for (var prop in source) | ||
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
target[prop] = source[prop]; | ||
if (source != null && __getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(source)) { | ||
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
target[prop] = source[prop]; | ||
} | ||
return target; | ||
}; | ||
var __export = (target, all) => { | ||
@@ -55,11 +30,9 @@ for (var name in all) | ||
var import_react = __toESM(require("react")); | ||
const NavLink = (_a) => { | ||
var _b = _a, { active = false, back = false, className, children } = _b, rest = __objRest(_b, ["active", "back", "className", "children"]); | ||
return /* @__PURE__ */ import_react.default.createElement("a", __spreadValues({ | ||
className: (0, import_classnames.default)("jkl-nav-link", { | ||
"jkl-nav-link--active": active, | ||
"jkl-nav-link--back": back | ||
}, className) | ||
}, rest), children); | ||
}; | ||
const NavLink = ({ active = false, back = false, className, children, ...rest }) => /* @__PURE__ */ import_react.default.createElement("a", { | ||
className: (0, import_classnames.default)("jkl-nav-link", { | ||
"jkl-nav-link--active": active, | ||
"jkl-nav-link--back": back | ||
}, className), | ||
...rest | ||
}, children); | ||
//# sourceMappingURL=NavLink.js.map |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
@@ -2,0 +3,0 @@ var __defProp = Object.defineProperty; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
@@ -5,30 +6,4 @@ var __defProp = Object.defineProperty; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __spreadValues = (a, b) => { | ||
for (var prop in b || (b = {})) | ||
if (__hasOwnProp.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
if (__getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(b)) { | ||
if (__propIsEnum.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
} | ||
return a; | ||
}; | ||
var __objRest = (source, exclude) => { | ||
var target = {}; | ||
for (var prop in source) | ||
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
target[prop] = source[prop]; | ||
if (source != null && __getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(source)) { | ||
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
target[prop] = source[prop]; | ||
} | ||
return target; | ||
}; | ||
var __export = (target, all) => { | ||
@@ -55,18 +30,11 @@ for (var name in all) | ||
var import_react = __toESM(require("react")); | ||
const SupportLabel = (_a) => { | ||
var _b = _a, { | ||
id, | ||
helpLabel, | ||
errorLabel, | ||
forceCompact, | ||
className, | ||
srOnly | ||
} = _b, rest = __objRest(_b, [ | ||
"id", | ||
"helpLabel", | ||
"errorLabel", | ||
"forceCompact", | ||
"className", | ||
"srOnly" | ||
]); | ||
const SupportLabel = ({ | ||
id, | ||
helpLabel, | ||
errorLabel, | ||
forceCompact, | ||
className, | ||
srOnly, | ||
...rest | ||
}) => { | ||
const hasLabel = errorLabel || helpLabel; | ||
@@ -80,6 +48,7 @@ const componentClassName = hasLabel ? (0, import_classnames.default)("jkl-form-support-label", className, { | ||
const restProps = hasLabel ? rest : {}; | ||
return /* @__PURE__ */ import_react.default.createElement("span", __spreadValues({ | ||
return /* @__PURE__ */ import_react.default.createElement("span", { | ||
id, | ||
className: componentClassName | ||
}, restProps), /* @__PURE__ */ import_react.default.createElement("svg", { | ||
className: componentClassName, | ||
...restProps | ||
}, /* @__PURE__ */ import_react.default.createElement("svg", { | ||
className: "jkl-form-support-label__icon", | ||
@@ -86,0 +55,0 @@ "aria-hidden": true, |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
import { FC } from "react"; | ||
export interface SupportLabelProps { | ||
id?: string; | ||
/** | ||
* En ID er påkrevd for å kunne referere til SupportLabel med aria-describedby. | ||
* | ||
* @example | ||
* ```tsx | ||
* const uid = useId(); | ||
* const supportId = useId(); | ||
* const hasSupportText = helpLabel || errorLabel; | ||
* const describedBy = hasSupportText ? supportId : undefined; | ||
* | ||
* return ( | ||
* <div> | ||
* <Label standAlone htmlFor={uid}> | ||
* Velg en tekst | ||
* </Label> | ||
* <select | ||
* id={uid} | ||
* aria-describedby={describedBy} | ||
* > | ||
* <option value="e">Example</option> | ||
* </select> | ||
* <SupportLabel | ||
* id={supportId} | ||
* helpLabel={helpLabel} | ||
* errorLabel={errorLabel} | ||
* forceCompact={forceCompact} | ||
* /> | ||
* </div> | ||
* ); | ||
* ``` | ||
*/ | ||
id: string; | ||
helpLabel?: string; | ||
@@ -5,0 +36,0 @@ errorLabel?: string; |
@@ -1,39 +0,9 @@ | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __spreadValues = (a, b) => { | ||
for (var prop in b || (b = {})) | ||
if (__hasOwnProp.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
if (__getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(b)) { | ||
if (__propIsEnum.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
} | ||
return a; | ||
}; | ||
var __objRest = (source, exclude) => { | ||
var target = {}; | ||
for (var prop in source) | ||
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
target[prop] = source[prop]; | ||
if (source != null && __getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(source)) { | ||
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
target[prop] = source[prop]; | ||
} | ||
return target; | ||
}; | ||
import cn from "classnames"; | ||
import React from "react"; | ||
const Link = (_a) => { | ||
var _b = _a, { external = false, className = "", children } = _b, rest = __objRest(_b, ["external", "className", "children"]); | ||
return /* @__PURE__ */ React.createElement("a", __spreadValues({ | ||
className: cn("jkl-link", className, { | ||
"jkl-link--external": external | ||
}) | ||
}, rest), children); | ||
}; | ||
const Link = ({ external = false, className = "", children, ...rest }) => /* @__PURE__ */ React.createElement("a", { | ||
className: cn("jkl-link", className, { | ||
"jkl-link--external": external | ||
}), | ||
...rest | ||
}, children); | ||
export { | ||
@@ -40,0 +10,0 @@ Link |
@@ -1,40 +0,10 @@ | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __spreadValues = (a, b) => { | ||
for (var prop in b || (b = {})) | ||
if (__hasOwnProp.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
if (__getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(b)) { | ||
if (__propIsEnum.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
} | ||
return a; | ||
}; | ||
var __objRest = (source, exclude) => { | ||
var target = {}; | ||
for (var prop in source) | ||
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
target[prop] = source[prop]; | ||
if (source != null && __getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(source)) { | ||
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
target[prop] = source[prop]; | ||
} | ||
return target; | ||
}; | ||
import cn from "classnames"; | ||
import React from "react"; | ||
const NavLink = (_a) => { | ||
var _b = _a, { active = false, back = false, className, children } = _b, rest = __objRest(_b, ["active", "back", "className", "children"]); | ||
return /* @__PURE__ */ React.createElement("a", __spreadValues({ | ||
className: cn("jkl-nav-link", { | ||
"jkl-nav-link--active": active, | ||
"jkl-nav-link--back": back | ||
}, className) | ||
}, rest), children); | ||
}; | ||
const NavLink = ({ active = false, back = false, className, children, ...rest }) => /* @__PURE__ */ React.createElement("a", { | ||
className: cn("jkl-nav-link", { | ||
"jkl-nav-link--active": active, | ||
"jkl-nav-link--back": back | ||
}, className), | ||
...rest | ||
}, children); | ||
export { | ||
@@ -41,0 +11,0 @@ NavLink |
@@ -1,47 +0,12 @@ | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __spreadValues = (a, b) => { | ||
for (var prop in b || (b = {})) | ||
if (__hasOwnProp.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
if (__getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(b)) { | ||
if (__propIsEnum.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
} | ||
return a; | ||
}; | ||
var __objRest = (source, exclude) => { | ||
var target = {}; | ||
for (var prop in source) | ||
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
target[prop] = source[prop]; | ||
if (source != null && __getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(source)) { | ||
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
target[prop] = source[prop]; | ||
} | ||
return target; | ||
}; | ||
import cn from "classnames"; | ||
import React from "react"; | ||
const SupportLabel = (_a) => { | ||
var _b = _a, { | ||
id, | ||
helpLabel, | ||
errorLabel, | ||
forceCompact, | ||
className, | ||
srOnly | ||
} = _b, rest = __objRest(_b, [ | ||
"id", | ||
"helpLabel", | ||
"errorLabel", | ||
"forceCompact", | ||
"className", | ||
"srOnly" | ||
]); | ||
const SupportLabel = ({ | ||
id, | ||
helpLabel, | ||
errorLabel, | ||
forceCompact, | ||
className, | ||
srOnly, | ||
...rest | ||
}) => { | ||
const hasLabel = errorLabel || helpLabel; | ||
@@ -55,6 +20,7 @@ const componentClassName = hasLabel ? cn("jkl-form-support-label", className, { | ||
const restProps = hasLabel ? rest : {}; | ||
return /* @__PURE__ */ React.createElement("span", __spreadValues({ | ||
return /* @__PURE__ */ React.createElement("span", { | ||
id, | ||
className: componentClassName | ||
}, restProps), /* @__PURE__ */ React.createElement("svg", { | ||
className: componentClassName, | ||
...restProps | ||
}, /* @__PURE__ */ React.createElement("svg", { | ||
className: "jkl-form-support-label__icon", | ||
@@ -61,0 +27,0 @@ "aria-hidden": true, |
{ | ||
"name": "@fremtind/jkl-core", | ||
"version": "10.0.3", | ||
"version": "10.0.4", | ||
"publishConfig": { | ||
@@ -66,3 +66,3 @@ "access": "public" | ||
}, | ||
"gitHead": "41c541ee1ca9b890f50d931d7541d69e1ccd61ac" | ||
"gitHead": "c93fc3afd8a4debb77e2a8e4a0f6fd5c92a5bc7b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172114
2178