@ada-cx/lovelace 1.19.0 → 1.19.1
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/components/AgentMessage/AgentMessage.js.map +1 -1
- package/dist/components/AttachmentChip/AttachmentChip.css.js +1 -1
- package/dist/components/AttachmentChip/AttachmentChip.js.map +1 -1
- package/dist/components/Avatar/Avatar.css.js +1 -1
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarPlaceholder.js.map +1 -1
- package/dist/components/Banner/Banner.css.js +1 -1
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/BannerContainer.js.map +1 -1
- package/dist/components/Banner/BannerContainerSlide.js.map +1 -1
- package/dist/components/BubbleOverlay/BubbleOverlay.js.map +1 -1
- package/dist/components/Button/Button.css.js +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/CardActions.js.map +1 -1
- package/dist/components/Card/CardBody.js.map +1 -1
- package/dist/components/Card/CardDescription.js.map +1 -1
- package/dist/components/Card/CardMedia.js.map +1 -1
- package/dist/components/Card/CardRoot.js.map +1 -1
- package/dist/components/Card/CardTitle.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +60 -60
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselItem.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.css.js +1 -1
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/Checkbox/CheckboxIndicator.js.map +1 -1
- package/dist/components/Chip/Chip.css.js +1 -1
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Dialog/Dialog.css.js +1 -1
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/DialogActions.js.map +1 -1
- package/dist/components/Dialog/DialogBody.js.map +1 -1
- package/dist/components/Dialog/DialogContent.js.map +1 -1
- package/dist/components/Dialog/DialogIcon.js.map +1 -1
- package/dist/components/Dialog/DialogRoot.js.map +1 -1
- package/dist/components/Dialog/DialogTitle.js.map +1 -1
- package/dist/components/DialogOverlay/DialogOverlay.js.map +1 -1
- package/dist/components/Divider/Divider.css.js +1 -1
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/DropZone/DropZone.js.map +1 -1
- package/dist/components/FullscreenOverlay/FullscreenOverlay.js.map +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderRoot.js.map +1 -1
- package/dist/components/Header/HeaderTitle.js.map +1 -1
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon/icons/AdaLogo.js.map +1 -1
- package/dist/components/Icon/icons/ArrowDown.js.map +1 -1
- package/dist/components/Icon/icons/ArrowLeft.js.map +1 -1
- package/dist/components/Icon/icons/ArrowNortheast.js.map +1 -1
- package/dist/components/Icon/icons/ArrowNorthwest.js.map +1 -1
- package/dist/components/Icon/icons/ArrowRight.js.map +1 -1
- package/dist/components/Icon/icons/ArrowUp.js.map +1 -1
- package/dist/components/Icon/icons/Bell.js.map +1 -1
- package/dist/components/Icon/icons/BellSlash.js.map +1 -1
- package/dist/components/Icon/icons/Checkmark.js.map +1 -1
- package/dist/components/Icon/icons/CheckmarkCircle.js.map +1 -1
- package/dist/components/Icon/icons/ChevronLeft.js.map +1 -1
- package/dist/components/Icon/icons/ChevronRight.js.map +1 -1
- package/dist/components/Icon/icons/CloudUpload.js.map +1 -1
- package/dist/components/Icon/icons/Document.js.map +1 -1
- package/dist/components/Icon/icons/Download.js.map +1 -1
- package/dist/components/Icon/icons/Ellipses.js.map +1 -1
- package/dist/components/Icon/icons/Email.js.map +1 -1
- package/dist/components/Icon/icons/ExclamationSync.js.map +1 -1
- package/dist/components/Icon/icons/ExclamationTriangle.js.map +1 -1
- package/dist/components/Icon/icons/Eye.js.map +1 -1
- package/dist/components/Icon/icons/EyeSlash.js.map +1 -1
- package/dist/components/Icon/icons/Glyph.js.map +1 -1
- package/dist/components/Icon/icons/Language.js.map +1 -1
- package/dist/components/Icon/icons/MediaSlash.js.map +1 -1
- package/dist/components/Icon/icons/MessagingFill.js.map +1 -1
- package/dist/components/Icon/icons/Minimize.js.map +1 -1
- package/dist/components/Icon/icons/Mute.js.map +1 -1
- package/dist/components/Icon/icons/Paperclip.js.map +1 -1
- package/dist/components/Icon/icons/PersonFill.js.map +1 -1
- package/dist/components/Icon/icons/PlayFill.js.map +1 -1
- package/dist/components/Icon/icons/Send.js.map +1 -1
- package/dist/components/Icon/icons/StarBadgeFill.js.map +1 -1
- package/dist/components/Icon/icons/ThumbsDown.js.map +1 -1
- package/dist/components/Icon/icons/ThumbsUp.js.map +1 -1
- package/dist/components/Icon/icons/Volume.js.map +1 -1
- package/dist/components/Icon/icons/Xmark.js.map +1 -1
- package/dist/components/Icon/icons/XmarkCircle.js.map +1 -1
- package/dist/components/IconButton/IconButton.css.js +1 -1
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/Image/Image.js.map +1 -1
- package/dist/components/Input/Input.context.js.map +1 -1
- package/dist/components/Input/Input.css.js +1 -1
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/InputAttachments.js.map +1 -1
- package/dist/components/Input/InputButton.js.map +1 -1
- package/dist/components/Input/InputControl.js.map +1 -1
- package/dist/components/Input/InputField.js.map +1 -1
- package/dist/components/Input/InputHelperText.js.map +1 -1
- package/dist/components/Input/InputLabel.js.map +1 -1
- package/dist/components/Input/InputRoot.js.map +1 -1
- package/dist/components/Input/InputTextArea.js.map +1 -1
- package/dist/components/Link/Link.css.js +1 -1
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/MenuItem/Menu.js.map +1 -1
- package/dist/components/MenuItem/MenuItem.js.map +1 -1
- package/dist/components/MenuItem/MenuItemCheckbox.js.map +1 -1
- package/dist/components/MenuItem/MenuItemLabel.js.map +1 -1
- package/dist/components/MenuItem/MenuItemRadio.js.map +1 -1
- package/dist/components/MenuItem/MenuItemRoot.js.map +1 -1
- package/dist/components/MenuItem/MenuItemToggle.js.map +1 -1
- package/dist/components/MessageError/MessageError.js.map +1 -1
- package/dist/components/MessageProse/MessageProse.js.map +1 -1
- package/dist/components/MessageRow/MessageRow.context.js.map +1 -1
- package/dist/components/MessageRow/MessageRow.css.js +1 -1
- package/dist/components/MessageRow/MessageRow.js.map +1 -1
- package/dist/components/MessageRow/MessageRowContent.js.map +1 -1
- package/dist/components/MessageRow/MessageRowRoot.js.map +1 -1
- package/dist/components/PictureMessage/PictureMessage.css.js +1 -1
- package/dist/components/PictureMessage/PictureMessage.js.map +1 -1
- package/dist/components/PillButton/PillButton.css.js +1 -1
- package/dist/components/PillButton/PillButton.js.map +1 -1
- package/dist/components/ProactiveMessage/ProactiveMessage.js.map +1 -1
- package/dist/components/Radio/Radio.css.js +1 -1
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/RadioGroup.js.map +1 -1
- package/dist/components/Radio/RadioIndicator.js.map +1 -1
- package/dist/components/ScrollMarker/ScrollMarker.css.js +1 -1
- package/dist/components/ScrollMarker/ScrollMarker.js.map +1 -1
- package/dist/components/Sheet/Sheet.js.map +1 -1
- package/dist/components/Sheet/SheetActions.js.map +1 -1
- package/dist/components/Sheet/SheetBackButton.js.map +1 -1
- package/dist/components/Sheet/SheetBody.js.map +1 -1
- package/dist/components/Sheet/SheetCloseButton.js.map +1 -1
- package/dist/components/Sheet/SheetHeader.js.map +1 -1
- package/dist/components/Sheet/SheetRoot.js.map +1 -1
- package/dist/components/Sheet/SheetTitle.js.map +1 -1
- package/dist/components/SheetOverlay/SheetOverlay.js.map +1 -1
- package/dist/components/Spinner/Spinner.css.js +1 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/SurveyRating/SurveyRating.js.map +1 -1
- package/dist/components/SurveySelect/SurveySelect.js.map +1 -1
- package/dist/components/Text/Text.css.js +1 -1
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/ThinkingShimmer/ThinkingShimmer.js.map +1 -1
- package/dist/components/Toast/Toast.css.js +1 -1
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/ToastContainer.js.map +1 -1
- package/dist/components/Toast/index.js +4 -4
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/Toggle/ToggleIndicator.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/TypingIndicator/TypingIndicator.js.map +1 -1
- package/dist/components/UserMessage/UserMessage.js.map +1 -1
- package/dist/components/VideoMessage/VideoMessage.css.js +1 -1
- package/dist/components/VideoMessage/VideoMessage.js.map +1 -1
- package/dist/hooks/overlayRegistry.js.map +1 -1
- package/dist/hooks/usePrefersReducedMotion.js.map +1 -1
- package/dist/hooks/useSubmitOnEnter.js.map +1 -1
- package/dist/runtime/LovelaceProvider.js +6 -6
- package/dist/runtime/LovelaceProvider.js.map +1 -1
- package/dist/runtime/branding.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tokens/tokens.js.map +1 -1
- package/dist/utils/animation.js.map +1 -1
- package/dist/utils/cx.js.map +1 -1
- package/dist/vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js +1 -1
- package/dist/vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/tokens/tokens.ts"],"sourcesContent":["import type { LovelacePrimitiveToken, LovelaceToken } from \"./generated/tokens\";\n\n/** Bare CSS custom-property name for a token — the single source of the `--lovelace-` prefix. */\nexport const tokenName = <T extends LovelaceToken>(name: T) =>\n\t`--lovelace-${name}` as const;\n\n/** `var()` reference to a token, for use as a style value. */\nexport const t = <T extends LovelaceToken>(name: T) =>\n\t`var(${tokenName(name)})` as const;\n\nexport type TokenRef = ReturnType<typeof t<LovelaceToken>>;\n\nexport type LovelaceOverridableToken = Exclude<\n\tLovelaceToken,\n\tLovelacePrimitiveToken\n>;\n\nexport type { LovelaceToken };\n"],"mappings":";AAGA,IAAa,KAAsC,MAClD,cAAc,KAGF,KAA8B,MAC1C,OAAO,EAAU,
|
|
1
|
+
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/tokens/tokens.ts"],"sourcesContent":["import type { LovelacePrimitiveToken, LovelaceToken } from \"./generated/tokens\";\n\n/** Bare CSS custom-property name for a token — the single source of the `--lovelace-` prefix. */\nexport const tokenName = <T extends LovelaceToken>(name: T) =>\n\t`--lovelace-${name}` as const;\n\n/** `var()` reference to a token, for use as a style value. */\nexport const t = <T extends LovelaceToken>(name: T) =>\n\t`var(${tokenName(name)})` as const;\n\nexport type TokenRef = ReturnType<typeof t<LovelaceToken>>;\n\nexport type LovelaceOverridableToken = Exclude<\n\tLovelaceToken,\n\tLovelacePrimitiveToken\n>;\n\nexport type { LovelaceToken };\n"],"mappings":";AAGA,IAAa,KAAsC,MAClD,cAAc,KAGF,KAA8B,MAC1C,OAAO,EAAU,CAAI,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.js","names":[],"sources":["../../src/utils/animation.ts"],"sourcesContent":["import type { RefObject } from \"react\";\nimport { useCallback, useLayoutEffect, useState } from \"react\";\nimport { flushSync } from \"react-dom\";\n\n/**\n * Runs `onEnd` once every animation on the element has settled. Modelled on\n * react-aria's overlay animation handling, which is private API — RAC drives\n * `data-entering`/`data-exiting` for us on Dialog and Sheet, but its Toast does\n * not, so lovelace needs its own copy for the toast surfaces.\n *\n * Two cases resolve immediately and both are load-bearing: jsdom has no\n * `getAnimations`, and an element whose transition has not started yet reports\n * none. The latter is what removes `data-entering` and lets the transition run.\n */\nfunction useAnimationEnd(\n\tref: RefObject<HTMLElement | null>,\n\tisActive: boolean,\n\tonEnd: () => void,\n) {\n\tuseLayoutEffect(() => {\n\t\tconst element = ref.current;\n\t\tif (!isActive || !element) {\n\t\t\treturn;\n\t\t}\n\t\tif (!(\"getAnimations\" in element)) {\n\t\t\tonEnd();\n\t\t\treturn;\n\t\t}\n\t\tconst animations = element.getAnimations();\n\t\tif (animations.length === 0) {\n\t\t\tonEnd();\n\t\t\treturn;\n\t\t}\n\t\tlet cancelled = false;\n\t\tPromise.allSettled(animations.map((animation) => animation.finished)).then(\n\t\t\t() => {\n\t\t\t\tif (!cancelled) {\n\t\t\t\t\tflushSync(onEnd);\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t};\n\t}, [ref, isActive, onEnd]);\n}\n\n/**\n * True until the element's entrance animation finishes. Style the \"from\" state\n * off `[data-entering]`; removing the attribute is what starts the transition.\n */\nexport function useEnterAnimation(ref: RefObject<HTMLElement | null>): boolean {\n\tconst [isEntering, setIsEntering] = useState(true);\n\tuseAnimationEnd(\n\t\tref,\n\t\tisEntering,\n\t\tuseCallback(() => setIsEntering(false), []),\n\t);\n\treturn isEntering;\n}\n\n/**\n * True while the element plays its exit animation after `isPresent` goes false.\n * Keep the element mounted until it returns false, and style the \"to\" state off\n * `[data-exiting]`.\n */\nexport function useExitAnimation(\n\tref: RefObject<HTMLElement | null>,\n\tisPresent: boolean,\n): boolean {\n\tconst [phase, setPhase] = useState<\"present\" | \"exiting\" | \"exited\">(\n\t\tisPresent ? \"present\" : \"exited\",\n\t);\n\n\t// Derive during render rather than in an effect so the exit styles land in the\n\t// same commit that dropped `isPresent` — a frame of the entered state would\n\t// otherwise paint first and the transition would start from the wrong place.\n\tif (isPresent && phase !== \"present\") {\n\t\tsetPhase(\"present\");\n\t} else if (!isPresent && phase === \"present\") {\n\t\tsetPhase(\"exiting\");\n\t}\n\n\tconst isExiting = phase === \"exiting\";\n\tuseAnimationEnd(\n\t\tref,\n\t\tisExiting,\n\t\tuseCallback(\n\t\t\t() => setPhase((current) => (current === \"exiting\" ? \"exited\" : current)),\n\t\t\t[],\n\t\t),\n\t);\n\treturn isExiting;\n}\n"],"mappings":";;;AAcA,SAAS,EACR,GACA,GACA,GACC;
|
|
1
|
+
{"version":3,"file":"animation.js","names":[],"sources":["../../src/utils/animation.ts"],"sourcesContent":["import type { RefObject } from \"react\";\nimport { useCallback, useLayoutEffect, useState } from \"react\";\nimport { flushSync } from \"react-dom\";\n\n/**\n * Runs `onEnd` once every animation on the element has settled. Modelled on\n * react-aria's overlay animation handling, which is private API — RAC drives\n * `data-entering`/`data-exiting` for us on Dialog and Sheet, but its Toast does\n * not, so lovelace needs its own copy for the toast surfaces.\n *\n * Two cases resolve immediately and both are load-bearing: jsdom has no\n * `getAnimations`, and an element whose transition has not started yet reports\n * none. The latter is what removes `data-entering` and lets the transition run.\n */\nfunction useAnimationEnd(\n\tref: RefObject<HTMLElement | null>,\n\tisActive: boolean,\n\tonEnd: () => void,\n) {\n\tuseLayoutEffect(() => {\n\t\tconst element = ref.current;\n\t\tif (!isActive || !element) {\n\t\t\treturn;\n\t\t}\n\t\tif (!(\"getAnimations\" in element)) {\n\t\t\tonEnd();\n\t\t\treturn;\n\t\t}\n\t\tconst animations = element.getAnimations();\n\t\tif (animations.length === 0) {\n\t\t\tonEnd();\n\t\t\treturn;\n\t\t}\n\t\tlet cancelled = false;\n\t\tPromise.allSettled(animations.map((animation) => animation.finished)).then(\n\t\t\t() => {\n\t\t\t\tif (!cancelled) {\n\t\t\t\t\tflushSync(onEnd);\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t};\n\t}, [ref, isActive, onEnd]);\n}\n\n/**\n * True until the element's entrance animation finishes. Style the \"from\" state\n * off `[data-entering]`; removing the attribute is what starts the transition.\n */\nexport function useEnterAnimation(ref: RefObject<HTMLElement | null>): boolean {\n\tconst [isEntering, setIsEntering] = useState(true);\n\tuseAnimationEnd(\n\t\tref,\n\t\tisEntering,\n\t\tuseCallback(() => setIsEntering(false), []),\n\t);\n\treturn isEntering;\n}\n\n/**\n * True while the element plays its exit animation after `isPresent` goes false.\n * Keep the element mounted until it returns false, and style the \"to\" state off\n * `[data-exiting]`.\n */\nexport function useExitAnimation(\n\tref: RefObject<HTMLElement | null>,\n\tisPresent: boolean,\n): boolean {\n\tconst [phase, setPhase] = useState<\"present\" | \"exiting\" | \"exited\">(\n\t\tisPresent ? \"present\" : \"exited\",\n\t);\n\n\t// Derive during render rather than in an effect so the exit styles land in the\n\t// same commit that dropped `isPresent` — a frame of the entered state would\n\t// otherwise paint first and the transition would start from the wrong place.\n\tif (isPresent && phase !== \"present\") {\n\t\tsetPhase(\"present\");\n\t} else if (!isPresent && phase === \"present\") {\n\t\tsetPhase(\"exiting\");\n\t}\n\n\tconst isExiting = phase === \"exiting\";\n\tuseAnimationEnd(\n\t\tref,\n\t\tisExiting,\n\t\tuseCallback(\n\t\t\t() => setPhase((current) => (current === \"exiting\" ? \"exited\" : current)),\n\t\t\t[],\n\t\t),\n\t);\n\treturn isExiting;\n}\n"],"mappings":";;;AAcA,SAAS,EACR,GACA,GACA,GACC;CACD,QAAsB;EACrB,IAAM,IAAU,EAAI;EACpB,IAAI,CAAC,KAAY,CAAC,GACjB;EAED,IAAI,EAAE,mBAAmB,IAAU;GAClC,EAAM;GACN;EACD;EACA,IAAM,IAAa,EAAQ,cAAc;EACzC,IAAI,EAAW,WAAW,GAAG;GAC5B,EAAM;GACN;EACD;EACA,IAAI,IAAY;EAQhB,OAPA,QAAQ,WAAW,EAAW,KAAK,MAAc,EAAU,QAAQ,CAAC,CAAC,CAAC,WAC/D;GACL,AAAK,KACJ,EAAU,CAAK;EAEjB,CACD,SACa;GACZ,IAAY;EACb;CACD,GAAG;EAAC;EAAK;EAAU;CAAK,CAAC;AAC1B;AAMA,SAAgB,EAAkB,GAA6C;CAC9E,IAAM,CAAC,GAAY,KAAiB,EAAS,EAAI;CAMjD,OALA,EACC,GACA,GACA,QAAkB,EAAc,EAAK,GAAG,CAAC,CAAC,CAC3C,GACO;AACR;AAOA,SAAgB,EACf,GACA,GACU;CACV,IAAM,CAAC,GAAO,KAAY,EACzB,IAAY,YAAY,QACzB;CAKA,AAAI,KAAa,MAAU,YAC1B,EAAS,SAAS,IACR,CAAC,KAAa,MAAU,aAClC,EAAS,SAAS;CAGnB,IAAM,IAAY,MAAU;CAS5B,OARA,EACC,GACA,GACA,QACO,GAAU,MAAa,MAAY,YAAY,WAAW,CAAQ,GACxE,CAAC,CACF,CACD,GACO;AACR"}
|
package/dist/utils/cx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cx.js","names":[],"sources":["../../src/utils/cx.ts"],"sourcesContent":["/** Join truthy class names into a single space-separated className string. */\nexport const cx = (...classes: (string | false | null | undefined)[]) =>\n\tclasses.filter(Boolean).join(\" \");\n"],"mappings":";AACA,IAAa,KAAM,GAAG,MACrB,EAAQ,OAAO,
|
|
1
|
+
{"version":3,"file":"cx.js","names":[],"sources":["../../src/utils/cx.ts"],"sourcesContent":["/** Join truthy class names into a single space-separated className string. */\nexport const cx = (...classes: (string | false | null | undefined)[]) =>\n\tclasses.filter(Boolean).join(\" \");\n"],"mappings":";AACA,IAAa,KAAM,GAAG,MACrB,EAAQ,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRuntimeFn-62c9670f.esm.js","names":[],"sources":["../../../../../../../node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js"],"sourcesContent":["function toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\n\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : String(i);\n}\n\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\n\nfunction mapValues(input, fn) {\n var result = {};\n for (var _key in input) {\n result[_key] = fn(input[_key], _key);\n }\n return result;\n}\n\nvar shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {\n for (var key of Object.keys(compoundCheck)) {\n var _selections$key;\n if (compoundCheck[key] !== ((_selections$key = selections[key]) !== null && _selections$key !== void 0 ? _selections$key : defaultVariants[key])) {\n return false;\n }\n }\n return true;\n};\nvar createRuntimeFn = config => {\n var runtimeFn = options => {\n var className = config.defaultClassName;\n var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);\n for (var variantName in selections) {\n var _selections$variantNa;\n var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];\n if (variantSelection != null) {\n var selection = variantSelection;\n if (typeof selection === 'boolean') {\n // @ts-expect-error\n selection = selection === true ? 'true' : 'false';\n }\n var selectionClassName =\n // @ts-expect-error\n config.variantClassNames[variantName][selection];\n if (selectionClassName) {\n className += ' ' + selectionClassName;\n }\n }\n }\n for (var [compoundCheck, compoundClassName] of config.compoundVariants) {\n if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) {\n className += ' ' + compoundClassName;\n }\n }\n return className;\n };\n runtimeFn.variants = () => Object.keys(config.variantClassNames);\n runtimeFn.classNames = {\n get base() {\n return config.defaultClassName.split(' ')[0];\n },\n get variants() {\n return mapValues(config.variantClassNames, classNames => mapValues(classNames, className => className.split(' ')[0]));\n }\n };\n return runtimeFn;\n};\n\nexport { createRuntimeFn as c, mapValues as m };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAY,GAAG,GAAG;
|
|
1
|
+
{"version":3,"file":"createRuntimeFn-62c9670f.esm.js","names":[],"sources":["../../../../../../../node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js"],"sourcesContent":["function toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\n\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : String(i);\n}\n\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\n\nfunction mapValues(input, fn) {\n var result = {};\n for (var _key in input) {\n result[_key] = fn(input[_key], _key);\n }\n return result;\n}\n\nvar shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {\n for (var key of Object.keys(compoundCheck)) {\n var _selections$key;\n if (compoundCheck[key] !== ((_selections$key = selections[key]) !== null && _selections$key !== void 0 ? _selections$key : defaultVariants[key])) {\n return false;\n }\n }\n return true;\n};\nvar createRuntimeFn = config => {\n var runtimeFn = options => {\n var className = config.defaultClassName;\n var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);\n for (var variantName in selections) {\n var _selections$variantNa;\n var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];\n if (variantSelection != null) {\n var selection = variantSelection;\n if (typeof selection === 'boolean') {\n // @ts-expect-error\n selection = selection === true ? 'true' : 'false';\n }\n var selectionClassName =\n // @ts-expect-error\n config.variantClassNames[variantName][selection];\n if (selectionClassName) {\n className += ' ' + selectionClassName;\n }\n }\n }\n for (var [compoundCheck, compoundClassName] of config.compoundVariants) {\n if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) {\n className += ' ' + compoundClassName;\n }\n }\n return className;\n };\n runtimeFn.variants = () => Object.keys(config.variantClassNames);\n runtimeFn.classNames = {\n get base() {\n return config.defaultClassName.split(' ')[0];\n },\n get variants() {\n return mapValues(config.variantClassNames, classNames => mapValues(classNames, className => className.split(' ')[0]));\n }\n };\n return runtimeFn;\n};\n\nexport { createRuntimeFn as c, mapValues as m };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAY,GAAG,GAAG;CACzB,IAAgB,OAAO,KAAnB,YAAwB,CAAC,GAAG,OAAO;CACvC,IAAI,IAAI,EAAE,OAAO;CACjB,IAAe,MAA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