@fremtind/jokul 0.7.0 → 0.8.0
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/build/build-stats.html +1 -1
- package/build/cjs/components/card/Card.js +1 -1
- package/build/cjs/components/card/Card.js.map +1 -1
- package/build/cjs/components/card/CardImage.js +1 -1
- package/build/cjs/components/card/CardImage.js.map +1 -1
- package/build/cjs/components/card/index.js +1 -1
- package/build/cjs/components/icon/Icon.js.map +1 -1
- package/build/cjs/components/index.js +1 -1
- package/build/cjs/components/link/Link.js.map +1 -1
- package/build/cjs/components/link/NavLink.js.map +1 -1
- package/build/cjs/components/link-list/LinkList.js.map +1 -1
- package/build/cjs/core/index.js +1 -1
- package/build/cjs/core/tokens.js +1 -1
- package/build/cjs/core/tokens.js.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeight.js +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeight.js.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeightBetween.js +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeightBetween.js.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAutoAnimateHeight.js +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAutoAnimateHeight.js.map +1 -1
- package/build/cjs/hooks/useScreen/useScreen.js +1 -1
- package/build/cjs/hooks/useScreen/useScreen.js.map +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/utilities/constants/index.js +2 -0
- package/build/cjs/utilities/constants/unicode.js +2 -0
- package/build/cjs/utilities/constants/unicode.js.map +1 -0
- package/build/cjs/utilities/formatters/avstand/formatAvstand.js +2 -0
- package/build/cjs/utilities/formatters/avstand/formatAvstand.js.map +1 -0
- package/build/cjs/utilities/formatters/bytes/formatBytes.js +2 -0
- package/build/cjs/utilities/formatters/bytes/formatBytes.js.map +1 -0
- package/build/cjs/utilities/formatters/date/formatDate.js +2 -0
- package/build/cjs/utilities/formatters/date/formatDate.js.map +1 -0
- package/build/cjs/utilities/formatters/fodselsnummer/formatFodselsnummer.js +2 -0
- package/build/cjs/utilities/formatters/fodselsnummer/formatFodselsnummer.js.map +1 -0
- package/build/cjs/utilities/formatters/index.js +2 -0
- package/build/cjs/utilities/formatters/kontonummer/formatKontonummer.js +2 -0
- package/build/cjs/utilities/formatters/kontonummer/formatKontonummer.js.map +1 -0
- package/build/cjs/utilities/formatters/kortnummer/formatKortnummer.js +2 -0
- package/build/cjs/utilities/formatters/kortnummer/formatKortnummer.js.map +1 -0
- package/build/cjs/utilities/formatters/organisasjonsnummer/formatOrganisasjonsnummer.js +2 -0
- package/build/cjs/utilities/formatters/organisasjonsnummer/formatOrganisasjonsnummer.js.map +1 -0
- package/build/cjs/utilities/formatters/telefonnummer/formatTelefonnummer.js +2 -0
- package/build/cjs/utilities/formatters/telefonnummer/formatTelefonnummer.js.map +1 -0
- package/build/cjs/utilities/formatters/util/formatNumber.js +2 -0
- package/build/cjs/utilities/formatters/util/formatNumber.js.map +1 -0
- package/build/cjs/utilities/formatters/util/parseNumber.js +2 -0
- package/build/cjs/utilities/formatters/util/parseNumber.js.map +1 -0
- package/build/cjs/utilities/formatters/util/registerWithMask.js +2 -0
- package/build/cjs/utilities/formatters/util/registerWithMask.js.map +1 -0
- package/build/cjs/utilities/formatters/valuta/formatValuta.js +2 -0
- package/build/cjs/utilities/formatters/valuta/formatValuta.js.map +1 -0
- package/build/cjs/utilities/index.js +2 -0
- package/build/cjs/utilities/index.js.map +1 -0
- package/build/cjs/utilities/polymorphism/SlotComponent.js +2 -0
- package/build/cjs/utilities/polymorphism/SlotComponent.js.map +1 -0
- package/build/cjs/utilities/polymorphism/index.js +2 -0
- package/build/cjs/utilities/polymorphism/index.js.map +1 -0
- package/build/cjs/utilities/polymorphism/mergeProps.js.map +1 -0
- package/build/cjs/utilities/polymorphism/mergeRefs.js.map +1 -0
- package/build/cjs/utilities/tabListener.js.map +1 -0
- package/build/cjs/{core/utils/getValuePair.js → utilities/valuePair.js} +1 -1
- package/build/cjs/utilities/valuePair.js.map +1 -0
- package/build/components/card/Card.d.ts +1 -1
- package/build/components/card/CardImage.d.ts +1 -1
- package/build/components/icon/Icon.d.ts +1 -1
- package/build/components/index.d.ts +0 -1
- package/build/components/link/Link.d.ts +1 -1
- package/build/components/link/NavLink.d.ts +1 -1
- package/build/components/link-list/LinkList.d.ts +1 -1
- package/build/core/index.d.ts +1 -6
- package/build/core/tokens.d.ts +22 -1
- package/build/core/types.d.ts +4 -5
- package/build/es/components/card/Card.js +1 -1
- package/build/es/components/card/Card.js.map +1 -1
- package/build/es/components/card/CardImage.js +1 -1
- package/build/es/components/card/CardImage.js.map +1 -1
- package/build/es/components/card/index.js +1 -1
- package/build/es/components/icon/Icon.js.map +1 -1
- package/build/es/components/index.js +1 -1
- package/build/es/components/link/Link.js.map +1 -1
- package/build/es/components/link/NavLink.js.map +1 -1
- package/build/es/components/link-list/LinkList.js.map +1 -1
- package/build/es/core/index.js +1 -1
- package/build/es/core/tokens.js +1 -1
- package/build/es/core/tokens.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeight.js +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeight.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeightBetween.js +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeightBetween.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/useAutoAnimateHeight.js +1 -1
- package/build/es/hooks/useAnimatedHeight/useAutoAnimateHeight.js.map +1 -1
- package/build/es/hooks/useScreen/useScreen.js +1 -1
- package/build/es/hooks/useScreen/useScreen.js.map +1 -1
- package/build/es/index.js +1 -1
- package/build/es/utilities/constants/index.js +2 -0
- package/build/es/utilities/constants/index.js.map +1 -0
- package/build/es/utilities/constants/unicode.js +2 -0
- package/build/es/utilities/constants/unicode.js.map +1 -0
- package/build/es/utilities/formatters/avstand/formatAvstand.js +2 -0
- package/build/es/utilities/formatters/avstand/formatAvstand.js.map +1 -0
- package/build/es/utilities/formatters/bytes/formatBytes.js +2 -0
- package/build/es/utilities/formatters/bytes/formatBytes.js.map +1 -0
- package/build/es/utilities/formatters/date/formatDate.js +2 -0
- package/build/es/utilities/formatters/date/formatDate.js.map +1 -0
- package/build/es/utilities/formatters/fodselsnummer/formatFodselsnummer.js +2 -0
- package/build/es/utilities/formatters/fodselsnummer/formatFodselsnummer.js.map +1 -0
- package/build/es/utilities/formatters/index.js +2 -0
- package/build/es/utilities/formatters/index.js.map +1 -0
- package/build/es/utilities/formatters/kontonummer/formatKontonummer.js +2 -0
- package/build/es/utilities/formatters/kontonummer/formatKontonummer.js.map +1 -0
- package/build/es/utilities/formatters/kortnummer/formatKortnummer.js +2 -0
- package/build/es/utilities/formatters/kortnummer/formatKortnummer.js.map +1 -0
- package/build/es/utilities/formatters/organisasjonsnummer/formatOrganisasjonsnummer.js +2 -0
- package/build/es/utilities/formatters/organisasjonsnummer/formatOrganisasjonsnummer.js.map +1 -0
- package/build/es/utilities/formatters/telefonnummer/formatTelefonnummer.js +2 -0
- package/build/es/utilities/formatters/telefonnummer/formatTelefonnummer.js.map +1 -0
- package/build/es/utilities/formatters/util/formatNumber.js +2 -0
- package/build/es/utilities/formatters/util/formatNumber.js.map +1 -0
- package/build/es/utilities/formatters/util/parseNumber.js +2 -0
- package/build/es/utilities/formatters/util/parseNumber.js.map +1 -0
- package/build/es/utilities/formatters/util/registerWithMask.js +2 -0
- package/build/es/utilities/formatters/util/registerWithMask.js.map +1 -0
- package/build/es/utilities/formatters/valuta/formatValuta.js +2 -0
- package/build/es/utilities/formatters/valuta/formatValuta.js.map +1 -0
- package/build/es/utilities/index.js +2 -0
- package/build/es/utilities/index.js.map +1 -0
- package/build/es/utilities/polymorphism/SlotComponent.js +2 -0
- package/build/es/utilities/polymorphism/SlotComponent.js.map +1 -0
- package/build/es/utilities/polymorphism/index.js +2 -0
- package/build/es/utilities/polymorphism/index.js.map +1 -0
- package/build/es/utilities/polymorphism/mergeProps.js.map +1 -0
- package/build/es/utilities/polymorphism/mergeRefs.js.map +1 -0
- package/build/es/utilities/tabListener.js.map +1 -0
- package/build/es/{core/utils/getValuePair.js → utilities/valuePair.js} +1 -1
- package/build/es/utilities/valuePair.js.map +1 -0
- package/build/index-DfvUcA5T.js +2 -0
- package/build/index-DfvUcA5T.js.map +1 -0
- package/build/index-hKyqa1PH.cjs +2 -0
- package/build/index-hKyqa1PH.cjs.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/utilities/constants/index.d.ts +2 -0
- package/build/utilities/constants/unicode.d.ts +13 -0
- package/build/utilities/formatters/avstand/formatAvstand.d.ts +23 -0
- package/build/utilities/formatters/bytes/formatBytes.d.ts +8 -0
- package/build/utilities/formatters/date/formatDate.d.ts +15 -0
- package/build/utilities/formatters/fodselsnummer/formatFodselsnummer.d.ts +15 -0
- package/build/utilities/formatters/index.d.ts +14 -0
- package/build/utilities/formatters/kontonummer/formatKontonummer.d.ts +16 -0
- package/build/utilities/formatters/kortnummer/formatKortnummer.d.ts +15 -0
- package/build/utilities/formatters/organisasjonsnummer/formatOrganisasjonsnummer.d.ts +15 -0
- package/build/utilities/formatters/telefonnummer/formatTelefonnummer.d.ts +18 -0
- package/build/utilities/formatters/util/formatNumber.d.ts +14 -0
- package/build/utilities/formatters/util/parseNumber.d.ts +6 -0
- package/build/utilities/formatters/util/registerWithMask.d.ts +42 -0
- package/build/utilities/formatters/valuta/formatValuta.d.ts +18 -0
- package/build/utilities/index.d.ts +5 -0
- package/build/utilities/polymorphism/index.d.ts +5 -0
- package/build/utilities/valuePair.d.ts +6 -0
- package/package.json +12 -7
- package/src/components/card/styles/_index.scss +1 -0
- package/src/components/card/styles/_info-card.scss +40 -0
- package/src/components/card/styles/_nav-card.scss +113 -0
- package/src/components/card/styles/_task-card.scss +55 -0
- package/src/components/card/styles/card.css +332 -0
- package/src/components/card/styles/card.min.css +1 -0
- package/src/components/card/styles/card.scss +99 -0
- package/src/components/icon/styles/icon.css +1 -1
- package/src/components/icon-button/styles/_index.scss +1 -0
- package/src/components/icon-button/styles/icon-button.css +98 -0
- package/src/components/icon-button/styles/icon-button.min.css +1 -0
- package/src/components/icon-button/styles/icon-button.scss +59 -0
- package/src/components/image/styles/_index.scss +1 -0
- package/src/components/image/styles/image.css +30 -0
- package/src/components/image/styles/image.min.css +1 -0
- package/src/components/image/styles/image.scss +35 -0
- package/src/components/link/styles/link.css +1 -1
- package/src/components/link-list/styles/link-list.css +1 -1
- package/src/components/loader/styles/loader.css +7 -7
- package/src/components/loader/styles/loader.min.css +1 -1
- package/src/components/loader/styles/skeleton-loader.css +6 -6
- package/src/components/loader/styles/skeleton-loader.min.css +1 -1
- package/src/components/tag/styles/_index.scss +1 -0
- package/src/components/tag/styles/tag.css +71 -0
- package/src/components/tag/styles/tag.min.css +1 -0
- package/src/components/tag/styles/tag.scss +73 -0
- package/src/core/jkl/_legacy-tokens.scss +1 -1
- package/src/core/jkl/_tokens.scss +14 -1
- package/src/core/styles/_color-tokens.scss +1 -1
- package/src/core/styles/_legacy-tokens.scss +1 -1
- package/src/core/styles/_tokens.scss +1 -1
- package/src/core/styles/core.css +4 -4
- package/src/core/styles/vind.css +1 -1
- package/src/core/tokens.less +14 -1
- package/build/CardImage-DJa-zPsv.js +0 -2
- package/build/CardImage-DJa-zPsv.js.map +0 -1
- package/build/CardImage-DsKh2g4S.cjs +0 -2
- package/build/CardImage-DsKh2g4S.cjs.map +0 -1
- package/build/cjs/components/SlotComponent.js +0 -2
- package/build/cjs/components/SlotComponent.js.map +0 -1
- package/build/cjs/core/utils/breakpoints.js +0 -2
- package/build/cjs/core/utils/breakpoints.js.map +0 -1
- package/build/cjs/core/utils/density.js +0 -2
- package/build/cjs/core/utils/density.js.map +0 -1
- package/build/cjs/core/utils/getValuePair.js.map +0 -1
- package/build/cjs/core/utils/index.js +0 -2
- package/build/cjs/core/utils/mergeProps.js.map +0 -1
- package/build/cjs/core/utils/mergeRefs.js.map +0 -1
- package/build/cjs/core/utils/motion.js +0 -2
- package/build/cjs/core/utils/motion.js.map +0 -1
- package/build/cjs/core/utils/tabListener.js.map +0 -1
- package/build/core/utils/breakpoints.d.ts +0 -6
- package/build/core/utils/density.d.ts +0 -1
- package/build/core/utils/getValuePair.d.ts +0 -2
- package/build/core/utils/index.d.ts +0 -8
- package/build/core/utils/motion.d.ts +0 -16
- package/build/es/components/SlotComponent.js +0 -2
- package/build/es/components/SlotComponent.js.map +0 -1
- package/build/es/core/utils/breakpoints.js +0 -2
- package/build/es/core/utils/breakpoints.js.map +0 -1
- package/build/es/core/utils/density.js +0 -2
- package/build/es/core/utils/density.js.map +0 -1
- package/build/es/core/utils/getValuePair.js.map +0 -1
- package/build/es/core/utils/index.js +0 -2
- package/build/es/core/utils/mergeProps.js.map +0 -1
- package/build/es/core/utils/mergeRefs.js.map +0 -1
- package/build/es/core/utils/motion.js +0 -2
- package/build/es/core/utils/motion.js.map +0 -1
- package/build/es/core/utils/tabListener.js.map +0 -1
- /package/build/cjs/{core/utils → utilities/constants}/index.js.map +0 -0
- /package/build/{es/core/utils → cjs/utilities/formatters}/index.js.map +0 -0
- /package/build/cjs/{core → utilities/polymorphism}/as-child.js +0 -0
- /package/build/cjs/{core → utilities/polymorphism}/as-child.js.map +0 -0
- /package/build/cjs/{core/utils → utilities/polymorphism}/mergeProps.js +0 -0
- /package/build/cjs/{core/utils → utilities/polymorphism}/mergeRefs.js +0 -0
- /package/build/cjs/{core → utilities/polymorphism}/polymorphism.js +0 -0
- /package/build/cjs/{core → utilities/polymorphism}/polymorphism.js.map +0 -0
- /package/build/cjs/{core/utils → utilities}/tabListener.js +0 -0
- /package/build/es/{core → utilities/polymorphism}/as-child.js +0 -0
- /package/build/es/{core → utilities/polymorphism}/as-child.js.map +0 -0
- /package/build/es/{core/utils → utilities/polymorphism}/mergeProps.js +0 -0
- /package/build/es/{core/utils → utilities/polymorphism}/mergeRefs.js +0 -0
- /package/build/es/{core → utilities/polymorphism}/polymorphism.js +0 -0
- /package/build/es/{core → utilities/polymorphism}/polymorphism.js.map +0 -0
- /package/build/es/{core/utils → utilities}/tabListener.js +0 -0
- /package/build/{components → utilities/polymorphism}/SlotComponent.d.ts +0 -0
- /package/build/{core → utilities/polymorphism}/as-child.d.ts +0 -0
- /package/build/{core/utils → utilities/polymorphism}/mergeProps.d.ts +0 -0
- /package/build/{core/utils → utilities/polymorphism}/mergeRefs.d.ts +0 -0
- /package/build/{core → utilities/polymorphism}/polymorphism.d.ts +0 -0
- /package/build/{core/utils → utilities}/tabListener.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabListener.js","sources":["../../../../src/core/utils/tabListener.ts"],"sourcesContent":["let mousenavigation = false;\nlet touchnavigation = false;\nlet touchEventFired = false;\n\nconst listeners = {\n mousedown: handleMouseDown as EventListener,\n keydown: handleKeydown as EventListener,\n touchstart: handleTouchStart as EventListener,\n};\n\nfunction removeAllListeners() {\n (Object.keys(listeners) as Array<keyof typeof listeners>).forEach((listenerType) => {\n document.removeEventListener(listenerType, listeners[listenerType]);\n });\n}\n\nfunction addListener(listenerType: keyof typeof listeners) {\n document.addEventListener(listenerType, listeners[listenerType]);\n}\n\nfunction handleMouseDown() {\n if (!mousenavigation && !touchEventFired) {\n mousenavigation = true;\n touchnavigation = false;\n const htmlElement = document.querySelector(\"html\");\n htmlElement?.setAttribute(\"data-mousenavigation\", \"true\");\n htmlElement?.removeAttribute(\"data-touchnavigation\");\n\n // Reset listeners\n removeAllListeners();\n addListener(\"touchstart\");\n addListener(\"keydown\");\n }\n}\n\nfunction handleKeydown(event: KeyboardEvent) {\n if (event.key === \"Tab\") {\n const htmlElement = document.querySelector(\"html\");\n removeAllListeners();\n htmlElement?.removeAttribute(\"data-mousenavigation\");\n htmlElement?.removeAttribute(\"data-touchnavigation\");\n mousenavigation = false;\n touchnavigation = false;\n\n // Reset listeners\n addListener(\"touchstart\");\n addListener(\"mousedown\");\n }\n}\n\nfunction handleTouchStart() {\n if (!touchnavigation) {\n mousenavigation = false;\n touchnavigation = true;\n const htmlElement = document.querySelector(\"html\");\n htmlElement?.setAttribute(\"data-touchnavigation\", \"true\");\n htmlElement?.removeAttribute(\"data-mousenavigation\");\n\n // Reset listeners\n removeAllListeners();\n addListener(\"touchstart\");\n addListener(\"keydown\");\n addListener(\"mousedown\");\n }\n\n // Most touch devices fire both touch and mouse events on touch (in that order)\n // see https://w3c.github.io/touch-events/#mouse-events\n // Set a check variable to avoid resetting the data-attribute:\n touchEventFired = true;\n setTimeout(() => {\n touchEventFired = false;\n }, 150); // Yes, it can take this long between the events\n}\n\nexport function initTabListener(): void {\n if (typeof document !== \"undefined\") {\n addListener(\"touchstart\");\n addListener(\"mousedown\");\n }\n}\n"],"names":["mousenavigation","touchnavigation","touchEventFired","listeners","mousedown","htmlElement","document","querySelector","setAttribute","removeAttribute","removeAllListeners","addListener","keydown","event","key","touchstart","setTimeout","Object","keys","forEach","listenerType","removeEventListener","addEventListener"],"mappings":"gFAAA,IAAIA,GAAkB,EAClBC,GAAkB,EAClBC,GAAkB,EAEtB,MAAMC,EAAY,CACdC,UAeJ,WACQ,IAACJ,IAAoBE,EAAiB,CACpBF,GAAA,EACAC,GAAA,EACZ,MAAAI,EAAcC,SAASC,cAAc,QAC9B,MAAAF,GAAAA,EAAAG,aAAa,uBAAwB,QAClD,MAAAH,GAAAA,EAAaI,gBAAgB,wBAGVC,IACnBC,EAAY,cACZA,EAAY,UAChB,CACJ,EA3BIC,QA6BJ,SAAuBC,GACf,GAAc,QAAdA,EAAMC,IAAe,CACf,MAAAT,EAAcC,SAASC,cAAc,QACxBG,IACnB,MAAAL,GAAAA,EAAaI,gBAAgB,wBAC7B,MAAAJ,GAAAA,EAAaI,gBAAgB,wBACXT,GAAA,EACAC,GAAA,EAGlBU,EAAY,cACZA,EAAY,YAChB,CACJ,EAzCII,WA2CJ,WACI,IAAKd,EAAiB,CACAD,GAAA,EACAC,GAAA,EACZ,MAAAI,EAAcC,SAASC,cAAc,QAC9B,MAAAF,GAAAA,EAAAG,aAAa,uBAAwB,QAClD,MAAAH,GAAAA,EAAaI,gBAAgB,wBAGVC,IACnBC,EAAY,cACZA,EAAY,WACZA,EAAY,YAChB,CAKkBT,GAAA,EAClBc,YAAW,KACWd,GAAA,CAAA,GACnB,IACP,GA9DA,SAASQ,IACJO,OAAOC,KAAKf,GAA6CgB,SAASC,IAC/Dd,SAASe,oBAAoBD,EAAcjB,EAAUiB,GAAa,GAE1E,CAEA,SAAST,EAAYS,GACjBd,SAASgB,iBAAiBF,EAAcjB,EAAUiB,GACtD,yBAwDO,kBACQd,SAAa,MACpBK,EAAY,cACZA,EAAY,aAEpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Density = "comfortable" | "compact";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { initTabListener } from './tabListener';
|
|
2
|
-
export { getValuePair } from './getValuePair';
|
|
3
|
-
export { breakpoints } from './breakpoints';
|
|
4
|
-
export type { Density } from './density';
|
|
5
|
-
export type { Timing, Easing } from './motion';
|
|
6
|
-
export { timings, easings } from './motion';
|
|
7
|
-
export { type PossibleRef, mergeRefs } from './mergeRefs';
|
|
8
|
-
export { mergeProps } from './mergeProps';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type Easing = keyof typeof easings;
|
|
2
|
-
export declare const easings: Readonly<{
|
|
3
|
-
standard: "ease";
|
|
4
|
-
entrance: "ease-out";
|
|
5
|
-
exit: "ease-in";
|
|
6
|
-
easeInBounceOut: "cubic-bezier(0, 0, 0.375, 1.17)";
|
|
7
|
-
focus: "cubic-bezier(0.6, 0.2, 0.35, 1)";
|
|
8
|
-
}>;
|
|
9
|
-
export type Timing = keyof typeof timings;
|
|
10
|
-
export declare const timings: Readonly<{
|
|
11
|
-
energetic: "75ms";
|
|
12
|
-
snappy: "100ms";
|
|
13
|
-
productive: "150ms";
|
|
14
|
-
expressive: "250ms";
|
|
15
|
-
lazy: "400ms";
|
|
16
|
-
}>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import{mergeRefs as r}from"../core/utils/mergeRefs.js";import{mergeProps as o}from"../core/utils/mergeProps.js";const n=e.forwardRef((function({children:n,...t},m){if(e.isValidElement(n))return e.cloneElement(n,{...o(t,n.props),ref:r(m,n.ref)});if(e.Children.count(n)>1)throw new Error("Du kan kun bruke ett enkelt React-element som children i en komponent med asChild");return null}));export{n as SlotComponent};
|
|
2
|
-
//# sourceMappingURL=SlotComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SlotComponent.js","sources":["../../../src/components/SlotComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { mergeRefs, mergeProps } from \"../core/utils\";\n\nexport type SlotComponentProps = React.HTMLAttributes<HTMLElement> & {\n children: React.ReactElement | false | null;\n};\n\nexport const SlotComponent = React.forwardRef<HTMLElement, SlotComponentProps>(function SlotComponent(\n { children, ...slotProps },\n forwardedRef,\n) {\n if (React.isValidElement(children)) {\n return React.cloneElement(children as React.ReactElement, {\n ...mergeProps(slotProps, children.props),\n ref: mergeRefs(forwardedRef, (children as any).ref),\n });\n }\n\n if (React.Children.count(children) > 1) {\n throw new Error(\"Du kan kun bruke ett enkelt React-element som children i en komponent med asChild\");\n }\n\n return null;\n});\n"],"names":["SlotComponent","React","forwardRef","children","slotProps","forwardedRef","isValidElement","cloneElement","mergeProps","props","ref","mergeRefs","Children","count","Error"],"mappings":"qIAOa,MAAAA,EAAgBC,EAAMC,YAA4C,UACzEC,SAAAA,KAAaC,GACfC,GAEIJ,GAAAA,EAAMK,eAAeH,GACdF,OAAAA,EAAMM,aAAaJ,EAAgC,IACnDK,EAAWJ,EAAWD,EAASM,OAClCC,IAAKC,EAAUN,EAAeF,EAAiBO,OAIvD,GAAIT,EAAMW,SAASC,MAAMV,GAAY,EAC3B,MAAA,IAAIW,MAAM,qFAGb,OAAA,IACX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoints.js","sources":["../../../../src/core/utils/breakpoints.ts"],"sourcesContent":["export type Breakpoint = keyof typeof breakpoints;\n\nexport const breakpoints = {\n medium: 680,\n large: 1200,\n xl: 1600,\n};\n"],"names":["breakpoints","medium","large","xl"],"mappings":"AAEO,MAAMA,EAAc,CACvBC,OAAQ,IACRC,MAAO,KACPC,GAAI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"density.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getValuePair.js","sources":["../../../../src/core/utils/getValuePair.ts"],"sourcesContent":["import { ValuePair } from \"../index\";\n\nexport function getValuePair(item: string | ValuePair): ValuePair {\n return typeof item === \"string\" ? { value: item, label: item } : item;\n}\n"],"names":["getValuePair","item","value","label"],"mappings":"AAEO,SAASA,EAAaC,GAClB,MAAgB,iBAATA,EAAoB,CAAEC,MAAOD,EAAME,MAAOF,GAASA,CACrE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{initTabListener as s}from"./tabListener.js";import{getValuePair as e}from"./getValuePair.js";import{breakpoints as r}from"./breakpoints.js";import{easings as a,timings as i}from"./motion.js";import{mergeRefs as t}from"./mergeRefs.js";import{mergeProps as m}from"./mergeProps.js";export{r as breakpoints,a as easings,e as getValuePair,s as initTabListener,m as mergeProps,t as mergeRefs,i as timings};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mergeProps.js","sources":["../../../../src/core/utils/mergeProps.ts"],"sourcesContent":["export function mergeProps(baseProps: Record<string, any>, addedProps: Record<string, any>) {\n const overrides = { ...addedProps };\n\n for (const prop in addedProps) {\n const basePropValue = baseProps[prop];\n const addedPropValue = addedProps[prop];\n\n if (/^on[A-Z]/.test(prop)) {\n // Propen er en event handler. Slå sammen hvis\n // den finnes på både base og added\n if (basePropValue && addedPropValue) {\n overrides[prop] = (...args: unknown[]) => {\n addedPropValue(...args);\n basePropValue(...args);\n };\n } else if (basePropValue) {\n overrides[prop] = basePropValue;\n }\n }\n\n if (prop === \"style\") {\n overrides[prop] = { ...basePropValue, ...addedPropValue };\n }\n\n if (prop === \"className\") {\n overrides[prop] = [basePropValue, addedPropValue].filter(Boolean).join(\" \");\n }\n }\n\n return { ...baseProps, ...overrides };\n}\n"],"names":["mergeProps","baseProps","addedProps","overrides","prop","basePropValue","addedPropValue","test","args","filter","Boolean","join"],"mappings":"AAAgB,SAAAA,EAAWC,EAAgCC,GACjDC,MAAAA,EAAY,IAAKD,GAEvB,IAAA,MAAWE,KAAQF,EAAY,CACrB,MAAAG,EAAgBJ,EAAUG,GAC1BE,EAAiBJ,EAAWE,GAE9B,WAAWG,KAAKH,KAGZC,GAAiBC,EACPH,EAAAC,GAAQ,IAAII,KAClBF,KAAkBE,GAClBH,KAAiBG,EAAI,EAElBH,IACPF,EAAUC,GAAQC,IAIb,UAATD,IACAD,EAAUC,GAAQ,IAAKC,KAAkBC,IAGhC,cAATF,IACUD,EAAAC,GAAQ,CAACC,EAAeC,GAAgBG,OAAOC,SAASC,KAAK,KAE/E,CAEA,MAAO,IAAKV,KAAcE,EAC9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mergeRefs.js","sources":["../../../../src/core/utils/mergeRefs.ts"],"sourcesContent":["import React from \"react\";\n\nexport type PossibleRef<T> = React.LegacyRef<T> | undefined;\n\nexport function mergeRefs<T>(...possibleRefs: PossibleRef<T>[]): React.RefCallback<T> {\n return (instance) =>\n possibleRefs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(instance);\n } else if (ref !== null && ref !== undefined) {\n (ref as React.MutableRefObject<T | null>).current = instance;\n }\n });\n}\n"],"names":["mergeRefs","possibleRefs","instance","forEach","ref","current"],"mappings":"AAIO,SAASA,KAAgBC,GAC5B,OAAQC,GACJD,EAAaE,SAASC,IACC,mBAARA,EACPA,EAAIF,GACW,MAARE,IACNA,EAAyCC,QAAUH,EAAAA,GAGpE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=Object.freeze({standard:"ease",entrance:"ease-out",exit:"ease-in",easeInBounceOut:"cubic-bezier(0, 0, 0.375, 1.17)",focus:"cubic-bezier(0.6, 0.2, 0.35, 1)"}),s=Object.freeze({energetic:"75ms",snappy:"100ms",productive:"150ms",expressive:"250ms",lazy:"400ms"});export{e as easings,s as timings};
|
|
2
|
-
//# sourceMappingURL=motion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"motion.js","sources":["../../../../src/core/utils/motion.ts"],"sourcesContent":["export type Easing = keyof typeof easings;\n\nexport const easings = Object.freeze({\n standard: \"ease\",\n entrance: \"ease-out\",\n exit: \"ease-in\",\n easeInBounceOut: \"cubic-bezier(0, 0, 0.375, 1.17)\",\n focus: \"cubic-bezier(0.6, 0.2, 0.35, 1)\",\n});\n\nexport type Timing = keyof typeof timings;\n\nexport const timings = Object.freeze({\n energetic: \"75ms\",\n snappy: \"100ms\",\n productive: \"150ms\",\n expressive: \"250ms\",\n lazy: \"400ms\",\n});\n"],"names":["easings","Object","freeze","standard","entrance","exit","easeInBounceOut","focus","timings","energetic","snappy","productive","expressive","lazy"],"mappings":"AAEa,MAAAA,EAAUC,OAAOC,OAAO,CACjCC,SAAU,OACVC,SAAU,WACVC,KAAM,UACNC,gBAAiB,kCACjBC,MAAO,oCAKEC,EAAUP,OAAOC,OAAO,CACjCO,UAAW,OACXC,OAAQ,QACRC,WAAY,QACZC,WAAY,QACZC,KAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabListener.js","sources":["../../../../src/core/utils/tabListener.ts"],"sourcesContent":["let mousenavigation = false;\nlet touchnavigation = false;\nlet touchEventFired = false;\n\nconst listeners = {\n mousedown: handleMouseDown as EventListener,\n keydown: handleKeydown as EventListener,\n touchstart: handleTouchStart as EventListener,\n};\n\nfunction removeAllListeners() {\n (Object.keys(listeners) as Array<keyof typeof listeners>).forEach((listenerType) => {\n document.removeEventListener(listenerType, listeners[listenerType]);\n });\n}\n\nfunction addListener(listenerType: keyof typeof listeners) {\n document.addEventListener(listenerType, listeners[listenerType]);\n}\n\nfunction handleMouseDown() {\n if (!mousenavigation && !touchEventFired) {\n mousenavigation = true;\n touchnavigation = false;\n const htmlElement = document.querySelector(\"html\");\n htmlElement?.setAttribute(\"data-mousenavigation\", \"true\");\n htmlElement?.removeAttribute(\"data-touchnavigation\");\n\n // Reset listeners\n removeAllListeners();\n addListener(\"touchstart\");\n addListener(\"keydown\");\n }\n}\n\nfunction handleKeydown(event: KeyboardEvent) {\n if (event.key === \"Tab\") {\n const htmlElement = document.querySelector(\"html\");\n removeAllListeners();\n htmlElement?.removeAttribute(\"data-mousenavigation\");\n htmlElement?.removeAttribute(\"data-touchnavigation\");\n mousenavigation = false;\n touchnavigation = false;\n\n // Reset listeners\n addListener(\"touchstart\");\n addListener(\"mousedown\");\n }\n}\n\nfunction handleTouchStart() {\n if (!touchnavigation) {\n mousenavigation = false;\n touchnavigation = true;\n const htmlElement = document.querySelector(\"html\");\n htmlElement?.setAttribute(\"data-touchnavigation\", \"true\");\n htmlElement?.removeAttribute(\"data-mousenavigation\");\n\n // Reset listeners\n removeAllListeners();\n addListener(\"touchstart\");\n addListener(\"keydown\");\n addListener(\"mousedown\");\n }\n\n // Most touch devices fire both touch and mouse events on touch (in that order)\n // see https://w3c.github.io/touch-events/#mouse-events\n // Set a check variable to avoid resetting the data-attribute:\n touchEventFired = true;\n setTimeout(() => {\n touchEventFired = false;\n }, 150); // Yes, it can take this long between the events\n}\n\nexport function initTabListener(): void {\n if (typeof document !== \"undefined\") {\n addListener(\"touchstart\");\n addListener(\"mousedown\");\n }\n}\n"],"names":["mousenavigation","touchnavigation","touchEventFired","listeners","mousedown","htmlElement","document","querySelector","setAttribute","removeAttribute","removeAllListeners","addListener","keydown","event","key","touchstart","setTimeout","Object","keys","forEach","listenerType","removeEventListener","addEventListener","initTabListener"],"mappings":"AAAA,IAAIA,GAAkB,EAClBC,GAAkB,EAClBC,GAAkB,EAEtB,MAAMC,EAAY,CACdC,UAeJ,WACQ,IAACJ,IAAoBE,EAAiB,CACpBF,GAAA,EACAC,GAAA,EACZI,MAAAA,EAAcC,SAASC,cAAc,QAC9B,MAAAF,GAAAA,EAAAG,aAAa,uBAAwB,QAClD,MAAAH,GAAAA,EAAaI,gBAAgB,wBAGVC,IACnBC,EAAY,cACZA,EAAY,UAChB,CACJ,EA3BIC,QA6BJ,SAAuBC,GACfA,GAAc,QAAdA,EAAMC,IAAe,CACfT,MAAAA,EAAcC,SAASC,cAAc,QACxBG,IACnB,MAAAL,GAAAA,EAAaI,gBAAgB,wBAC7B,MAAAJ,GAAAA,EAAaI,gBAAgB,wBACXT,GAAA,EACAC,GAAA,EAGlBU,EAAY,cACZA,EAAY,YAChB,CACJ,EAzCII,WA2CJ,WACI,IAAKd,EAAiB,CACAD,GAAA,EACAC,GAAA,EACZI,MAAAA,EAAcC,SAASC,cAAc,QAC9B,MAAAF,GAAAA,EAAAG,aAAa,uBAAwB,QAClD,MAAAH,GAAAA,EAAaI,gBAAgB,wBAGVC,IACnBC,EAAY,cACZA,EAAY,WACZA,EAAY,YAChB,CAKkBT,GAAA,EAClBc,YAAW,KACWd,GAAA,CAAA,GACnB,IACP,GA9DA,SAASQ,IACJO,OAAOC,KAAKf,GAA6CgB,SAASC,IAC/Dd,SAASe,oBAAoBD,EAAcjB,EAAUiB,GAAa,GAE1E,CAEA,SAAST,EAAYS,GACjBd,SAASgB,iBAAiBF,EAAcjB,EAAUiB,GACtD,CAwDO,SAASG,WACDjB,SAAa,MACpBK,EAAY,cACZA,EAAY,aAEpB"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|