@kanso-labs/kanso-ui 0.2.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/LICENSE +20 -0
- package/README.md +83 -0
- package/dist/assets/stylex.css +1623 -0
- package/dist/cjs/assets/stylex.css +1623 -0
- package/dist/cjs/components/avatar/index.cjs +89 -0
- package/dist/cjs/components/avatar/index.cjs.map +1 -0
- package/dist/cjs/components/avatar/index.d.cts +29 -0
- package/dist/cjs/components/badge/index.cjs +93 -0
- package/dist/cjs/components/badge/index.cjs.map +1 -0
- package/dist/cjs/components/badge/index.d.cts +27 -0
- package/dist/cjs/components/button/index.cjs +101 -0
- package/dist/cjs/components/button/index.cjs.map +1 -0
- package/dist/cjs/components/button/index.d.cts +22 -0
- package/dist/cjs/components/card/index.cjs +84 -0
- package/dist/cjs/components/card/index.cjs.map +1 -0
- package/dist/cjs/components/card/index.d.cts +29 -0
- package/dist/cjs/components/chip/index.cjs +53 -0
- package/dist/cjs/components/chip/index.cjs.map +1 -0
- package/dist/cjs/components/chip/index.d.cts +13 -0
- package/dist/cjs/components/currency/index.cjs +56 -0
- package/dist/cjs/components/currency/index.cjs.map +1 -0
- package/dist/cjs/components/currency/index.d.cts +36 -0
- package/dist/cjs/components/icon-button/index.cjs +80 -0
- package/dist/cjs/components/icon-button/index.cjs.map +1 -0
- package/dist/cjs/components/icon-button/index.d.cts +32 -0
- package/dist/cjs/components/index.d.cts +15 -0
- package/dist/cjs/components/link/index.cjs +61 -0
- package/dist/cjs/components/link/index.cjs.map +1 -0
- package/dist/cjs/components/link/index.d.cts +30 -0
- package/dist/cjs/components/list-item/index.cjs +42 -0
- package/dist/cjs/components/list-item/index.cjs.map +1 -0
- package/dist/cjs/components/list-item/index.d.cts +22 -0
- package/dist/cjs/components/separator/index.cjs +34 -0
- package/dist/cjs/components/separator/index.cjs.map +1 -0
- package/dist/cjs/components/separator/index.d.cts +14 -0
- package/dist/cjs/components/sheet/index.cjs +266 -0
- package/dist/cjs/components/sheet/index.cjs.map +1 -0
- package/dist/cjs/components/sheet/index.d.cts +73 -0
- package/dist/cjs/components/tabs/index.cjs +77 -0
- package/dist/cjs/components/tabs/index.cjs.map +1 -0
- package/dist/cjs/components/tabs/index.d.cts +24 -0
- package/dist/cjs/components/text/index.cjs +173 -0
- package/dist/cjs/components/text/index.cjs.map +1 -0
- package/dist/cjs/components/text/index.d.cts +19 -0
- package/dist/cjs/components/text-field/index.cjs +53 -0
- package/dist/cjs/components/text-field/index.cjs.map +1 -0
- package/dist/cjs/components/text-field/index.d.cts +30 -0
- package/dist/cjs/hooks/useRipple.cjs +391 -0
- package/dist/cjs/hooks/useRipple.cjs.map +1 -0
- package/dist/cjs/index.cjs +29 -0
- package/dist/cjs/index.d.cts +16 -0
- package/dist/cjs/node_modules/@stylexjs/stylex/lib/es/stylex.cjs +121 -0
- package/dist/cjs/node_modules/@stylexjs/stylex/lib/es/stylex.cjs.map +1 -0
- package/dist/cjs/styles/ripple.cjs +33 -0
- package/dist/cjs/styles/ripple.cjs.map +1 -0
- package/dist/cjs/tokens/values.cjs +36 -0
- package/dist/cjs/tokens/values.cjs.map +1 -0
- package/dist/components/avatar/index.d.ts +29 -0
- package/dist/components/avatar/index.js +89 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/index.d.ts +27 -0
- package/dist/components/badge/index.js +93 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/button/index.d.ts +22 -0
- package/dist/components/button/index.js +101 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/card/index.d.ts +29 -0
- package/dist/components/card/index.js +84 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/chip/index.d.ts +13 -0
- package/dist/components/chip/index.js +53 -0
- package/dist/components/chip/index.js.map +1 -0
- package/dist/components/currency/index.d.ts +36 -0
- package/dist/components/currency/index.js +56 -0
- package/dist/components/currency/index.js.map +1 -0
- package/dist/components/icon-button/index.d.ts +32 -0
- package/dist/components/icon-button/index.js +80 -0
- package/dist/components/icon-button/index.js.map +1 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/components/link/index.d.ts +30 -0
- package/dist/components/link/index.js +61 -0
- package/dist/components/link/index.js.map +1 -0
- package/dist/components/list-item/index.d.ts +22 -0
- package/dist/components/list-item/index.js +42 -0
- package/dist/components/list-item/index.js.map +1 -0
- package/dist/components/separator/index.d.ts +14 -0
- package/dist/components/separator/index.js +34 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/sheet/index.d.ts +73 -0
- package/dist/components/sheet/index.js +266 -0
- package/dist/components/sheet/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +24 -0
- package/dist/components/tabs/index.js +77 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/text/index.d.ts +19 -0
- package/dist/components/text/index.js +173 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/components/text-field/index.d.ts +30 -0
- package/dist/components/text-field/index.js +53 -0
- package/dist/components/text-field/index.js.map +1 -0
- package/dist/hooks/useRipple.js +391 -0
- package/dist/hooks/useRipple.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +15 -0
- package/dist/node_modules/@stylexjs/stylex/lib/es/stylex.js +121 -0
- package/dist/node_modules/@stylexjs/stylex/lib/es/stylex.js.map +1 -0
- package/dist/styles/ripple.js +33 -0
- package/dist/styles/ripple.js.map +1 -0
- package/dist/tokens/values.js +34 -0
- package/dist/tokens/values.js.map +1 -0
- package/dist/tokens.css +282 -0
- package/package.json +109 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRipple.js","names":["rect","width","size","height","positionEvent","startPoint","endPoint","event","target","rippleRef","resolve"],"sources":["../../src/hooks/useRipple.tsx"],"sourcesContent":["import type { MouseEvent, MouseEventHandler, PointerEvent, PointerEventHandler, ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useMemo, useRef, useState } from 'react';\nimport { rippleStyles } from '../styles/ripple';\nimport { motionDurationMs, motionEasing, spacingPx } from '../tokens/values';\n\n// Every timing this file drives is a motion token, spent at the point of use\n// below. They come from tokens/values rather than the StyleX theme because\n// element.animate() and setTimeout both reject a token's var() form, and the\n// same is true of the one geometry token: `PADDING` is added to a radius, and\n// a var() would concatenate rather than add. See src/styles/ripple.ts for the\n// opacity half of the mechanism, whose three timings are deliberately not\n// tokens.\n\n/** How far the ripple grows past the host's corners. `spacing.sm`. */\nconst PADDING = spacingPx.sm;\n\n// The rest are ratios and a pixel floor that no token group covers — spacing\n// is layout rhythm, and nothing in the set holds bare geometric ratios.\nconst INITIAL_ORIGIN_SCALE = 0.2;\nconst SOFT_EDGE_MINIMUM_SIZE = 75;\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35;\n\n// Static input, so this is computed once for every consumer of the module\n// rather than once per component instance.\nconst surfaceProps = stylex.props(rippleStyles.surface);\n\n/**\n * On touch: `Inactive -> TouchDelay -> WaitingForClick -> Inactive`, or\n * `Inactive -> TouchDelay -> Holding -> WaitingForClick -> Inactive` for a\n * held press.\n *\n * On mouse or pen: `Inactive -> WaitingForClick -> Inactive`.\n */\nconst RippleState = {\n /** A touch has been confirmed as a press (held past the touch delay). */\n Holding: 2,\n /** No press in progress. Touch down moves to TouchDelay; mouse/pen down moves to WaitingForClick. */\n Inactive: 0,\n /** Touch down received; waiting to see if it's a tap or a scroll/swipe. */\n TouchDelay: 1,\n /** The press has finished growing; waiting for the click that ends it. */\n WaitingForClick: 3\n} as const;\ninterface RippleEventHandlers<HostElement extends HTMLElement> {\n onClick?: MouseEventHandler<HostElement>;\n onContextMenu?: MouseEventHandler<HostElement>;\n onPointerCancel?: PointerEventHandler<HostElement>;\n onPointerDown?: PointerEventHandler<HostElement>;\n onPointerLeave?: PointerEventHandler<HostElement>;\n onPointerUp?: PointerEventHandler<HostElement>;\n}\ntype RippleState = (typeof RippleState)[keyof typeof RippleState];\nfunction isTouch(event: PointerEvent) {\n return event.pointerType === 'touch';\n}\n\n/**\n * Renders a press ripple that grows from the pointer's position, or from\n * the element's center for a keyboard or other non-pointer activation.\n *\n * Growth runs via the Web Animations API on a single reused element (no\n * per-click DOM nodes to clean up), over a fixed duration independent of how\n * long the element is held — a real press-and-hold keeps the ripple\n * growing until release, while a quick tap is still held visible for a\n * minimum duration so it plays a complete animation rather than a flicker.\n *\n * Merges its own handlers with `externalHandlers` (e.g. a component's own\n * consumer-supplied props — ripple's own run first, then the external\n * ones) and returns `handlers` to spread onto the interactive element and\n * `surface`, the node to render as a child. The host element must\n * establish a positioning context (`position: relative` or similar) so\n * `surface`, which fills it via `inset: 0`, clips to its bounds and\n * inherits its shape.\n *\n * Pass `enabled: false` to opt out — no ripple listeners are attached and\n * no surface is rendered, leaving `externalHandlers` and a component's own\n * hover/press state layer (if any) untouched.\n *\n * `handlers` and `surface` are hand-memoized (not left to build-tool\n * optimization) so a consumer rendering many instances — a list of icon\n * buttons, say — can memoize around them too, and so stability doesn't\n * depend on any particular compiler being configured.\n */\nfunction useRipple<HostElement extends HTMLElement = HTMLElement>(enabled = true, externalHandlers: RippleEventHandlers<HostElement> = {}): {\n handlers: RippleEventHandlers<HostElement>;\n surface: ReactNode;\n} {\n const [pressed, setPressed] = useState(false);\n const rippleRef = useRef<HTMLSpanElement>(null);\n const state = useRef<RippleState>(RippleState.Inactive);\n const growAnimation = useRef<Animation | undefined>(undefined);\n const rippleStartEvent = useRef<PointerEvent<HostElement> | undefined>(undefined);\n const initialSize = useRef(0);\n const rippleScale = useRef('1');\n const shouldReactToEvent = useCallback((event: PointerEvent<HostElement>) => {\n if (!event.isPrimary) {\n return false;\n }\n const startEvent = rippleStartEvent.current;\n if (startEvent && startEvent.pointerId !== event.pointerId) {\n return false;\n }\n return isTouch(event) || event.buttons === 1;\n }, []);\n const determineRippleSize = useCallback((rect: DOMRect) => {\n const {\n height,\n width\n } = rect;\n const maxDimension = Math.max(height, width);\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDimension, SOFT_EDGE_MINIMUM_SIZE);\n const size = Math.floor(maxDimension * INITIAL_ORIGIN_SCALE);\n const hypotenuse = Math.hypot(width, height);\n const maxRadius = hypotenuse + PADDING;\n initialSize.current = size;\n rippleScale.current = `${(maxRadius + softEdgeSize) / size}`;\n return `${size}px`;\n }, []);\n const getTranslationCoordinates = useCallback((rect: DOMRect, positionEvent?: PointerEvent<HostElement>) => {\n const {\n height,\n left,\n top,\n width\n } = rect;\n const size = initialSize.current;\n const endPoint = {\n x: (width - size) / 2,\n y: (height - size) / 2\n };\n const origin = positionEvent ? {\n x: positionEvent.clientX - left,\n y: positionEvent.clientY - top\n } : {\n x: width / 2,\n y: height / 2\n };\n const startPoint = {\n x: origin.x - size / 2,\n y: origin.y - size / 2\n };\n return {\n endPoint,\n startPoint\n };\n }, []);\n const startPressAnimation = useCallback((target: HostElement, positionEvent?: PointerEvent<HostElement>) => {\n const ripple = rippleRef.current;\n if (!ripple) {\n return;\n }\n setPressed(true);\n growAnimation.current?.cancel();\n\n // Read once and share: the two helpers below both only need the\n // target's rect, and a second `getBoundingClientRect()` call back to\n // back with the first would be a redundant layout read.\n const rect = target.getBoundingClientRect();\n const size = determineRippleSize(rect);\n const {\n endPoint,\n startPoint\n } = getTranslationCoordinates(rect, positionEvent);\n ripple.style.width = size;\n ripple.style.height = size;\n growAnimation.current = ripple.animate({\n transform: [`translate(${startPoint.x}px, ${startPoint.y}px) scale(1)`, `translate(${endPoint.x}px, ${endPoint.y}px) scale(${rippleScale.current})`]\n }, {\n // Growth runs over a fixed duration regardless of how long the\n // press is held, so the token is spent here rather than named as a\n // constant — element.animate() is one of the two places a StyleX\n // token could not have gone.\n duration: motionDurationMs.long1,\n easing: motionEasing.standard,\n fill: 'forwards'\n });\n }, [determineRippleSize, getTranslationCoordinates]);\n const endPressAnimation = useCallback(async () => {\n rippleStartEvent.current = undefined;\n state.current = RippleState.Inactive;\n const animation = growAnimation.current;\n const elapsed = typeof animation?.currentTime === 'number' ? animation.currentTime : Infinity;\n\n // The floor on how briefly a ripple may be visible, so a quick tap reads\n // as a deliberate ripple rather than a flicker.\n if (elapsed >= motionDurationMs.medium1) {\n setPressed(false);\n return;\n }\n await new Promise(resolve => {\n setTimeout(resolve, motionDurationMs.medium1 - elapsed);\n });\n if (growAnimation.current !== animation) {\n // A newer press started; let it own the pressed state instead.\n return;\n }\n setPressed(false);\n }, []);\n\n // Reads through a function so a stale narrowing of `state.current` from\n // before the `await` below isn't (incorrectly) carried across it — the\n // ref can change via a different handler while this one is suspended.\n const getState = useCallback(() => state.current, []);\n const handlePointerDownAsync = useCallback(async (event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n rippleStartEvent.current = event;\n const target = event.currentTarget;\n if (!isTouch(event)) {\n state.current = RippleState.WaitingForClick;\n startPressAnimation(target, event);\n return;\n }\n\n // Delay so a scroll/swipe starting on the element doesn't flash a\n // ripple — only a held (or quickly released) touch counts as a press.\n state.current = RippleState.TouchDelay;\n await new Promise(resolve => {\n setTimeout(resolve, motionDurationMs.short2);\n });\n if (getState() !== RippleState.TouchDelay) {\n return;\n }\n state.current = RippleState.Holding;\n startPressAnimation(target, event);\n }, [getState, shouldReactToEvent, startPressAnimation]);\n const handlePointerDown = useCallback((event: PointerEvent<HostElement>) => {\n void handlePointerDownAsync(event);\n }, [handlePointerDownAsync]);\n const handlePointerUp = useCallback((event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n if (state.current === RippleState.Holding) {\n state.current = RippleState.WaitingForClick;\n return;\n }\n if (state.current === RippleState.TouchDelay) {\n // Released before the delay elapsed: treat as a completed tap.\n state.current = RippleState.WaitingForClick;\n startPressAnimation(event.currentTarget, rippleStartEvent.current);\n }\n }, [shouldReactToEvent, startPressAnimation]);\n const handlePointerLeave = useCallback((event: PointerEvent<HostElement>) => {\n if (isTouch(event) || !shouldReactToEvent(event)) {\n return;\n }\n if (state.current !== RippleState.Inactive) {\n void endPressAnimation();\n }\n }, [endPressAnimation, shouldReactToEvent]);\n const handlePointerCancel = useCallback((event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n void endPressAnimation();\n }, [endPressAnimation, shouldReactToEvent]);\n const handleClick = useCallback((event: MouseEvent<HostElement>) => {\n if (state.current === RippleState.WaitingForClick) {\n void endPressAnimation();\n return;\n }\n if (state.current === RippleState.Inactive) {\n // No pointerdown preceded this click — keyboard activation, a\n // programmatic `.click()`, or assistive-tech-synthesized activation.\n // Play a complete, centered press immediately.\n startPressAnimation(event.currentTarget);\n void endPressAnimation();\n }\n }, [endPressAnimation, startPressAnimation]);\n const handleContextMenu = useCallback(() => {\n void endPressAnimation();\n }, [endPressAnimation]);\n const {\n onClick: onClickProp,\n onContextMenu: onContextMenuProp,\n onPointerCancel: onPointerCancelProp,\n onPointerDown: onPointerDownProp,\n onPointerLeave: onPointerLeaveProp,\n onPointerUp: onPointerUpProp\n } = externalHandlers;\n const onClick = useCallback((event: MouseEvent<HostElement>) => {\n handleClick(event);\n onClickProp?.(event);\n }, [handleClick, onClickProp]);\n const onContextMenu = useCallback((event: MouseEvent<HostElement>) => {\n handleContextMenu();\n onContextMenuProp?.(event);\n }, [handleContextMenu, onContextMenuProp]);\n const onPointerCancel = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerCancel(event);\n onPointerCancelProp?.(event);\n }, [handlePointerCancel, onPointerCancelProp]);\n const onPointerDown = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerDown(event);\n onPointerDownProp?.(event);\n }, [handlePointerDown, onPointerDownProp]);\n const onPointerLeave = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerLeave(event);\n onPointerLeaveProp?.(event);\n }, [handlePointerLeave, onPointerLeaveProp]);\n const onPointerUp = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerUp(event);\n onPointerUpProp?.(event);\n }, [handlePointerUp, onPointerUpProp]);\n const handlers = useMemo(() => ({\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }), [onClick, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp]);\n const surface = useMemo(() => <span aria-hidden=\"true\" {...surfaceProps}>\n <span ref={rippleRef} {...stylex.props(rippleStyles.press, pressed && rippleStyles.pressed)} />\n </span>, [pressed]);\n\n // Two separate memos rather than one branching on `enabled`, so that\n // whichever branch is actually active stays keyed only on its own\n // inputs — the enabled result doesn't get a new identity every time\n // `externalHandlers` does (a component typically passes a fresh object\n // literal each render), and vice versa.\n const enabledResult = useMemo(() => ({\n handlers,\n surface\n }), [handlers, surface]);\n const disabledResult = useMemo(() => ({\n handlers: externalHandlers,\n surface: null\n }), [externalHandlers]);\n return enabled ? enabledResult : disabledResult;\n}\nexport { useRipple };"],"mappings":";;;;;;;;AAeA,MAAM,UAAU,UAAU;AAI1B,MAAM,uBAAuB;AAC7B,MAAM,yBAAyB;AAC/B,MAAM,4BAA4B;AAIlC,MAAM,eAAe,MAAa,OAAa,OAAO;;;;;;;;AAStD,MAAM,cAAc;;CAElB,SAAS;;CAET,UAAU;;CAEV,YAAY;;CAEZ,iBAAiB;AACnB;AAUA,SAAS,QAAQ,OAAqB;CACpC,OAAO,MAAM,gBAAgB;AAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAA,UAAA,IAAA,IAAA;CAAA,MAAA,IAAA,EAAA,EAAA;CAAkE,MAAA,UAAA,OAAA,KAAA,IAAA,OAAA;CAAc,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAE,KAAA,OAAA,KAAA,IAAA,CAAsD,IAAtD;EAAuD,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAvD,MAAA,mBAAA;CAIhF,MAAA,CAAA,SAAA,cAA8B,SAAS,KAAK;CAC5C,MAAA,YAAkB,OAAwB,IAAI;CAC9C,MAAA,QAAc,OAAoB,YAAW,QAAS;CACtD,MAAA,gBAAsB,OAA8B,KAAA,CAAS;CAC7D,MA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AAA,EAAA,MAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,MAAA,EAAA;CAPD,MAAA,WAAgC;CAO2D,IAAA;CAAA,IAAA,EAAA,QAAA,SAAA;EAE3D,MAAA,MAAa,OAAY,OAAQ,WAAW,OAAY,OAAQ;EAAC,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,MAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,QAAA,KAAA;EADnE,MAAA,oBAAA,QAAA;GAAkB,eAAA;GAAM,GAAK;GACrD,UAAA,oBAAA,QAAA;IAAWE,KAAA;IAAS,GAAM;GAAiE,CAAA;EACtF,CAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,MAAA,EAAA;CAFX,MAAA,UAA8B;CAEN,IAAA;CAAA,IAAA,EAAA,QAAA,YAAA,EAAA,QAAA,SAAA;EAOa,MAAA;GAAA;GAAA;EAGrC;EAAC,EAAA,MAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,MAAA,EAAA;CAHD,MAAA,gBAAqC;CAGZ,IAAA;CAAA,IAAA,EAAA,QAAA,kBAAA;EACa,MAAA;GAAA,UAC1B;GAAgB,SACjB;EACX;EAAC,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,MAAA,EAAA;CAAuB,OACjB,UAAA,gBAAA;AAAwC;AAxPjD,SAAA,MAAA,WAAA;CAwIM,WAAWC,WAAS,iBAAgB,MAAO;AAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Avatar, { AvatarProps } from "./components/avatar/index.js";
|
|
2
|
+
import Badge, { BadgeProps } from "./components/badge/index.js";
|
|
3
|
+
import Button, { ButtonProps } from "./components/button/index.js";
|
|
4
|
+
import Card, { CardProps } from "./components/card/index.js";
|
|
5
|
+
import Chip, { ChipProps } from "./components/chip/index.js";
|
|
6
|
+
import Currency, { CurrencyProps } from "./components/currency/index.js";
|
|
7
|
+
import IconButton, { IconButtonProps } from "./components/icon-button/index.js";
|
|
8
|
+
import Link, { LinkProps } from "./components/link/index.js";
|
|
9
|
+
import ListItem, { ListItemProps } from "./components/list-item/index.js";
|
|
10
|
+
import Separator, { SeparatorProps } from "./components/separator/index.js";
|
|
11
|
+
import Sheet, { SheetProps } from "./components/sheet/index.js";
|
|
12
|
+
import Tabs, { TabsProps } from "./components/tabs/index.js";
|
|
13
|
+
import Text, { TextProps } from "./components/text/index.js";
|
|
14
|
+
import TextField, { TextFieldProps } from "./components/text-field/index.js";
|
|
15
|
+
import "./components/index.js";
|
|
16
|
+
export { Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Currency, type CurrencyProps, IconButton, type IconButtonProps, Link, type LinkProps, ListItem, type ListItemProps, Separator, type SeparatorProps, Sheet, type SheetProps, Tabs, type TabsProps, Text, TextField, type TextFieldProps, type TextProps };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Avatar from "./components/avatar/index.js";
|
|
2
|
+
import Badge from "./components/badge/index.js";
|
|
3
|
+
import Button from "./components/button/index.js";
|
|
4
|
+
import Card from "./components/card/index.js";
|
|
5
|
+
import Chip from "./components/chip/index.js";
|
|
6
|
+
import Currency from "./components/currency/index.js";
|
|
7
|
+
import IconButton from "./components/icon-button/index.js";
|
|
8
|
+
import Link from "./components/link/index.js";
|
|
9
|
+
import ListItem from "./components/list-item/index.js";
|
|
10
|
+
import Separator from "./components/separator/index.js";
|
|
11
|
+
import Sheet from "./components/sheet/index.js";
|
|
12
|
+
import Tabs from "./components/tabs/index.js";
|
|
13
|
+
import Text from "./components/text/index.js";
|
|
14
|
+
import TextField from "./components/text-field/index.js";
|
|
15
|
+
export { Avatar, Badge, Button, Card, Chip, Currency, IconButton, Link, ListItem, Separator, Sheet, Tabs, Text, TextField };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
//#region node_modules/@stylexjs/stylex/lib/es/stylex.mjs
|
|
2
|
+
var styleq = {};
|
|
3
|
+
var hasRequiredStyleq;
|
|
4
|
+
function requireStyleq() {
|
|
5
|
+
if (hasRequiredStyleq) return styleq;
|
|
6
|
+
hasRequiredStyleq = 1;
|
|
7
|
+
Object.defineProperty(styleq, "__esModule", { value: true });
|
|
8
|
+
styleq.styleq = void 0;
|
|
9
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
var compiledKey = "$$css";
|
|
11
|
+
function createStyleq(options) {
|
|
12
|
+
var disableCache;
|
|
13
|
+
var disableMix;
|
|
14
|
+
var transform;
|
|
15
|
+
if (options != null) {
|
|
16
|
+
disableCache = options.disableCache === true;
|
|
17
|
+
disableMix = options.disableMix === true;
|
|
18
|
+
transform = options.transform;
|
|
19
|
+
}
|
|
20
|
+
return function styleq() {
|
|
21
|
+
var definedProperties = [];
|
|
22
|
+
var className = "";
|
|
23
|
+
var inlineStyle = null;
|
|
24
|
+
var debugString = "";
|
|
25
|
+
var nextCache = disableCache ? null : cache;
|
|
26
|
+
var styles = new Array(arguments.length);
|
|
27
|
+
for (var i = 0; i < arguments.length; i++) styles[i] = arguments[i];
|
|
28
|
+
while (styles.length > 0) {
|
|
29
|
+
var possibleStyle = styles.pop();
|
|
30
|
+
if (possibleStyle == null || possibleStyle === false) continue;
|
|
31
|
+
if (Array.isArray(possibleStyle)) {
|
|
32
|
+
for (var _i = 0; _i < possibleStyle.length; _i++) styles.push(possibleStyle[_i]);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
var style = transform != null ? transform(possibleStyle) : possibleStyle;
|
|
36
|
+
if (style.$$css != null) {
|
|
37
|
+
var classNameChunk = "";
|
|
38
|
+
if (nextCache != null && nextCache.has(style)) {
|
|
39
|
+
var cacheEntry = nextCache.get(style);
|
|
40
|
+
if (cacheEntry != null) {
|
|
41
|
+
classNameChunk = cacheEntry[0];
|
|
42
|
+
debugString = cacheEntry[2];
|
|
43
|
+
definedProperties.push.apply(definedProperties, cacheEntry[1]);
|
|
44
|
+
nextCache = cacheEntry[3];
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
var definedPropertiesChunk = [];
|
|
48
|
+
for (var prop in style) {
|
|
49
|
+
var value = style[prop];
|
|
50
|
+
if (prop === compiledKey) {
|
|
51
|
+
var compiledKeyValue = style[prop];
|
|
52
|
+
if (compiledKeyValue !== true) debugString = debugString ? compiledKeyValue + "; " + debugString : compiledKeyValue;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (typeof value === "string" || value === null) {
|
|
56
|
+
if (!definedProperties.includes(prop)) {
|
|
57
|
+
definedProperties.push(prop);
|
|
58
|
+
if (nextCache != null) definedPropertiesChunk.push(prop);
|
|
59
|
+
if (typeof value === "string") classNameChunk += classNameChunk ? " " + value : value;
|
|
60
|
+
}
|
|
61
|
+
} else console.error("styleq: ".concat(prop, " typeof ").concat(String(value), " is not \"string\" or \"null\"."));
|
|
62
|
+
}
|
|
63
|
+
if (nextCache != null) {
|
|
64
|
+
var weakMap = /* @__PURE__ */ new WeakMap();
|
|
65
|
+
nextCache.set(style, [
|
|
66
|
+
classNameChunk,
|
|
67
|
+
definedPropertiesChunk,
|
|
68
|
+
debugString,
|
|
69
|
+
weakMap
|
|
70
|
+
]);
|
|
71
|
+
nextCache = weakMap;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (classNameChunk) className = className ? classNameChunk + " " + className : classNameChunk;
|
|
75
|
+
} else if (disableMix) {
|
|
76
|
+
if (inlineStyle == null) inlineStyle = {};
|
|
77
|
+
inlineStyle = Object.assign({}, style, inlineStyle);
|
|
78
|
+
} else {
|
|
79
|
+
var subStyle = null;
|
|
80
|
+
for (var _prop in style) {
|
|
81
|
+
var _value = style[_prop];
|
|
82
|
+
if (_value !== void 0) {
|
|
83
|
+
if (!definedProperties.includes(_prop)) {
|
|
84
|
+
if (_value != null) {
|
|
85
|
+
if (inlineStyle == null) inlineStyle = {};
|
|
86
|
+
if (subStyle == null) subStyle = {};
|
|
87
|
+
subStyle[_prop] = _value;
|
|
88
|
+
}
|
|
89
|
+
definedProperties.push(_prop);
|
|
90
|
+
nextCache = null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (subStyle != null) inlineStyle = Object.assign(subStyle, inlineStyle);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return [
|
|
98
|
+
className,
|
|
99
|
+
inlineStyle,
|
|
100
|
+
debugString
|
|
101
|
+
];
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
var styleq$1 = styleq.styleq = createStyleq();
|
|
105
|
+
styleq$1.factory = createStyleq;
|
|
106
|
+
return styleq;
|
|
107
|
+
}
|
|
108
|
+
var styleqExports = /*@__PURE__*/ requireStyleq();
|
|
109
|
+
function props(...styles) {
|
|
110
|
+
const [className, style, dataStyleSrc] = styleqExports.styleq(styles);
|
|
111
|
+
const result = {};
|
|
112
|
+
if (className != null && className !== "") result.className = className;
|
|
113
|
+
if (style != null && Object.keys(style).length > 0) result.style = style;
|
|
114
|
+
if (dataStyleSrc != null && dataStyleSrc !== "") result["data-style-src"] = dataStyleSrc;
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
Object.freeze({});
|
|
118
|
+
//#endregion
|
|
119
|
+
export { props };
|
|
120
|
+
|
|
121
|
+
//# sourceMappingURL=stylex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylex.js","names":[],"sources":["../../../../../../node_modules/@stylexjs/stylex/lib/es/stylex.mjs"],"sourcesContent":["var styleq = {};\n\nvar hasRequiredStyleq;\n\nfunction requireStyleq () {\n\tif (hasRequiredStyleq) return styleq;\n\thasRequiredStyleq = 1;\n\n\tObject.defineProperty(styleq, \"__esModule\", {\n\t value: true\n\t});\n\tstyleq.styleq = void 0;\n\tvar cache = new WeakMap();\n\tvar compiledKey = '$$css';\n\tfunction createStyleq(options) {\n\t var disableCache;\n\t var disableMix;\n\t var transform;\n\t if (options != null) {\n\t disableCache = options.disableCache === true;\n\t disableMix = options.disableMix === true;\n\t transform = options.transform;\n\t }\n\t return function styleq() {\n\t var definedProperties = [];\n\t var className = '';\n\t var inlineStyle = null;\n\t var debugString = '';\n\t var nextCache = disableCache ? null : cache;\n\t var styles = new Array(arguments.length);\n\t for (var i = 0; i < arguments.length; i++) {\n\t styles[i] = arguments[i];\n\t }\n\t while (styles.length > 0) {\n\t var possibleStyle = styles.pop();\n\t if (possibleStyle == null || possibleStyle === false) {\n\t continue;\n\t }\n\t if (Array.isArray(possibleStyle)) {\n\t for (var _i = 0; _i < possibleStyle.length; _i++) {\n\t styles.push(possibleStyle[_i]);\n\t }\n\t continue;\n\t }\n\t var style = transform != null ? transform(possibleStyle) : possibleStyle;\n\t if (style.$$css != null) {\n\t var classNameChunk = '';\n\t if (nextCache != null && nextCache.has(style)) {\n\t var cacheEntry = nextCache.get(style);\n\t if (cacheEntry != null) {\n\t classNameChunk = cacheEntry[0];\n\t debugString = cacheEntry[2];\n\t definedProperties.push.apply(definedProperties, cacheEntry[1]);\n\t nextCache = cacheEntry[3];\n\t }\n\t } else {\n\t var definedPropertiesChunk = [];\n\t for (var prop in style) {\n\t var value = style[prop];\n\t if (prop === compiledKey) {\n\t var compiledKeyValue = style[prop];\n\t if (compiledKeyValue !== true) {\n\t debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;\n\t }\n\t continue;\n\t }\n\t if (typeof value === 'string' || value === null) {\n\t if (!definedProperties.includes(prop)) {\n\t definedProperties.push(prop);\n\t if (nextCache != null) {\n\t definedPropertiesChunk.push(prop);\n\t }\n\t if (typeof value === 'string') {\n\t classNameChunk += classNameChunk ? ' ' + value : value;\n\t }\n\t }\n\t } else {\n\t console.error(\"styleq: \".concat(prop, \" typeof \").concat(String(value), \" is not \\\"string\\\" or \\\"null\\\".\"));\n\t }\n\t }\n\t if (nextCache != null) {\n\t var weakMap = new WeakMap();\n\t nextCache.set(style, [classNameChunk, definedPropertiesChunk, debugString, weakMap]);\n\t nextCache = weakMap;\n\t }\n\t }\n\t if (classNameChunk) {\n\t className = className ? classNameChunk + ' ' + className : classNameChunk;\n\t }\n\t } else {\n\t if (disableMix) {\n\t if (inlineStyle == null) {\n\t inlineStyle = {};\n\t }\n\t inlineStyle = Object.assign({}, style, inlineStyle);\n\t } else {\n\t var subStyle = null;\n\t for (var _prop in style) {\n\t var _value = style[_prop];\n\t if (_value !== undefined) {\n\t if (!definedProperties.includes(_prop)) {\n\t if (_value != null) {\n\t if (inlineStyle == null) {\n\t inlineStyle = {};\n\t }\n\t if (subStyle == null) {\n\t subStyle = {};\n\t }\n\t subStyle[_prop] = _value;\n\t }\n\t definedProperties.push(_prop);\n\t nextCache = null;\n\t }\n\t }\n\t }\n\t if (subStyle != null) {\n\t inlineStyle = Object.assign(subStyle, inlineStyle);\n\t }\n\t }\n\t }\n\t }\n\t var styleProps = [className, inlineStyle, debugString];\n\t return styleProps;\n\t };\n\t}\n\tvar styleq$1 = styleq.styleq = createStyleq();\n\tstyleq$1.factory = createStyleq;\n\treturn styleq;\n}\n\nvar styleqExports = /*@__PURE__*/ requireStyleq();\n\nconst errorForFn = name => new Error(`Unexpected 'stylex.${name}' call at runtime. Styles must be compiled by '@stylexjs/babel-plugin'.`);\nconst errorForType = key => errorForFn(`types.${key}`);\nconst create = function stylexCreate(_styles) {\n throw errorForFn('create');\n};\nconst createTheme = (_baseTokens, _overrides) => {\n throw errorForFn('createTheme');\n};\nconst defineConsts = function stylexDefineConsts(_styles) {\n throw errorForFn('defineConsts');\n};\nconst defineVars = function stylexDefineVars(_styles) {\n throw errorForFn('defineVars');\n};\nconst unstable_conditional = function stylexConditional(_value) {\n throw errorForFn('unstable_conditional');\n};\nconst unstable_defineVarsNested = function stylexDefineVarsNested(_styles) {\n throw errorForFn('unstable_defineVarsNested');\n};\nconst unstable_defineConstsNested = function stylexDefineConstsNested(_styles) {\n throw errorForFn('unstable_defineConstsNested');\n};\nconst unstable_createThemeNested = (_baseTokens, _overrides) => {\n throw errorForFn('unstable_createThemeNested');\n};\nconst defineMarker = () => {\n throw errorForFn('defineMarker');\n};\nconst firstThatWorks = (..._styles) => {\n throw errorForFn('firstThatWorks');\n};\nconst keyframes = _keyframes => {\n throw errorForFn('keyframes');\n};\nconst positionTry = _positionTry => {\n throw errorForFn('positionTry');\n};\nfunction props(...styles) {\n const [className, style, dataStyleSrc] = styleqExports.styleq(styles);\n const result = {};\n if (className != null && className !== '') {\n result.className = className;\n }\n if (style != null && Object.keys(style).length > 0) {\n result.style = style;\n }\n if (dataStyleSrc != null && dataStyleSrc !== '') {\n result['data-style-src'] = dataStyleSrc;\n }\n return result;\n}\nconst toKebabCase = str => str.replace(/([A-Z])/g, '-$1').toLowerCase();\nfunction attrs(...styles) {\n const {\n className,\n style,\n 'data-style-src': dataStyleSrc\n } = props.apply(this, styles);\n const result = {};\n if (className != null) {\n result.class = className;\n }\n if (style != null) {\n result.style = Object.entries(style).map(([key, value]) => `${toKebabCase(key)}:${value}`).join(';');\n }\n if (dataStyleSrc != null) {\n result['data-style-src'] = dataStyleSrc;\n }\n return result;\n}\nconst viewTransitionClass = _viewTransitionClass => {\n throw errorForFn('viewTransitionClass');\n};\nconst defaultMarker = () => {\n throw errorForFn('defaultMarker');\n};\nconst when = {\n ancestor: _p => {\n throw errorForFn('when.ancestor');\n },\n descendant: _p => {\n throw errorForFn('when.descendant');\n },\n siblingBefore: _p => {\n throw errorForFn('when.siblingBefore');\n },\n siblingAfter: _p => {\n throw errorForFn('when.siblingAfter');\n },\n anySibling: _p => {\n throw errorForFn('when.anySibling');\n }\n};\nconst env = Object.freeze({});\nconst types = {\n angle: _v => {\n throw errorForType('angle');\n },\n color: _v => {\n throw errorForType('color');\n },\n url: _v => {\n throw errorForType('url');\n },\n image: _v => {\n throw errorForType('image');\n },\n integer: _v => {\n throw errorForType('integer');\n },\n lengthPercentage: _v => {\n throw errorForType('lengthPercentage');\n },\n length: _v => {\n throw errorForType('length');\n },\n percentage: _v => {\n throw errorForType('percentage');\n },\n number: _v => {\n throw errorForType('number');\n },\n resolution: _v => {\n throw errorForType('resolution');\n },\n time: _v => {\n throw errorForType('time');\n },\n transformFunction: _v => {\n throw errorForType('transformFunction');\n },\n transformList: _v => {\n throw errorForType('transformList');\n }\n};\nconst legacyMerge = /*@__PURE__*/ function () {\n function _legacyMerge(...styles) {\n const [className] = styleqExports.styleq(styles);\n return className;\n }\n _legacyMerge.create = create;\n _legacyMerge.createTheme = createTheme;\n _legacyMerge.defineConsts = defineConsts;\n _legacyMerge.defineMarker = defineMarker;\n _legacyMerge.defineVars = defineVars;\n _legacyMerge.defaultMarker = defaultMarker;\n _legacyMerge.firstThatWorks = firstThatWorks;\n _legacyMerge.keyframes = keyframes;\n _legacyMerge.positionTry = positionTry;\n _legacyMerge.props = props;\n _legacyMerge.attrs = attrs;\n _legacyMerge.types = types;\n _legacyMerge.when = when;\n _legacyMerge.viewTransitionClass = viewTransitionClass;\n _legacyMerge.env = env;\n _legacyMerge.unstable_conditional = unstable_conditional;\n _legacyMerge.unstable_defineVarsNested = unstable_defineVarsNested;\n _legacyMerge.unstable_defineConstsNested = unstable_defineConstsNested;\n _legacyMerge.unstable_createThemeNested = unstable_createThemeNested;\n return _legacyMerge;\n}();\n\nexport { attrs, create, createTheme, defaultMarker, defineConsts, defineMarker, defineVars, env, firstThatWorks, keyframes, legacyMerge, positionTry, props, types, unstable_conditional, unstable_createThemeNested, unstable_defineConstsNested, unstable_defineVarsNested, viewTransitionClass, when };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAI,SAAS,CAAC;AAEd,IAAI;AAEJ,SAAS,gBAAiB;CACzB,IAAI,mBAAmB,OAAO;CAC9B,oBAAoB;CAEpB,OAAO,eAAe,QAAQ,cAAc,EAC1C,OAAO,KACT,CAAC;CACD,OAAO,SAAS,KAAK;CACrB,IAAI,wBAAQ,IAAI,QAAQ;CACxB,IAAI,cAAc;CACl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QAAQ,cAAc,IACrC,OAAO,YAAY;CAErB,IAAI,SAAS,QAAQ,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,GAC/C,OAAO,QAAQ;CAEjB,IAAI,gBAAgB,QAAQ,iBAAiB,IAC3C,OAAO,oBAAoB;CAE7B,OAAO;AACT;AA2CY,OAAO,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/styles/ripple.ts
|
|
2
|
+
const styles = {
|
|
3
|
+
press: {
|
|
4
|
+
kKwaWg: "xliahv6",
|
|
5
|
+
kbCHJM: "xu96u03",
|
|
6
|
+
kSiTet: "xg01cxk",
|
|
7
|
+
kVAEAm: "x10l6tqk",
|
|
8
|
+
k87sOh: "x13vifvy",
|
|
9
|
+
k3nNDw: "x1g0ag68",
|
|
10
|
+
kIyJzY: "xbg8nd6",
|
|
11
|
+
k1ekBW: "x19991ni",
|
|
12
|
+
kAMwcw: "xcj1dhv",
|
|
13
|
+
$$css: true
|
|
14
|
+
},
|
|
15
|
+
pressed: {
|
|
16
|
+
kSiTet: "xjg27g",
|
|
17
|
+
kIyJzY: "xjl7l83",
|
|
18
|
+
$$css: true
|
|
19
|
+
},
|
|
20
|
+
surface: {
|
|
21
|
+
kaIpWk: "x1pjcqnp",
|
|
22
|
+
k1xSpc: "x1lliihq x1c7sf14",
|
|
23
|
+
kpwlN0: "x10a8y8t",
|
|
24
|
+
kVQacm: "xb3r6kr",
|
|
25
|
+
kfzvcC: "x47corl",
|
|
26
|
+
kVAEAm: "x10l6tqk",
|
|
27
|
+
$$css: true
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { styles as rippleStyles };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=ripple.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple.js","names":[],"sources":["../../src/styles/ripple.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { stateLayerOpacity } from '../tokens/design.tokens.stylex';\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// Growth and opacity are two independent mechanisms. Growth (width/height/\n// transform) is driven imperatively via the Web Animations API in\n// useRipple, decoupled from press/release timing so it always plays out\n// over a fixed duration. Opacity is what this file owns — toggled by the\n// `pressed` class — with a fast fade-in and a slower fade-out, so a quick\n// tap still reads as a deliberate, visible ripple rather than a flicker.\n//\n// None of the three timings below is a motion token, and that is deliberate\n// rather than an oversight predating them. The fade pair is the asymmetry\n// the paragraph above describes: 105ms in against 375ms out, hand-tuned as\n// a ratio to each other, and neither lands on the scale (105ms is near\n// durationShort1's 100ms; 375ms sits between durationMedium3 and\n// durationLong1). Snapping either to its nearest token would flatten a\n// tuned asymmetry into two arbitrary values, and adding tokens to fit would\n// make a scale that documents itself as three bands of three describe this\n// component instead. `linear` is likewise not on the easing scale, and\n// belongs off it — a fade to and from a state layer wants no acceleration,\n// which is why every curve in the token set is the wrong answer here.\n//\n// These three are now the only ripple timings off the scale. Everything\n// useRipple drives from JS is a token, read through src/tokens/values\n// because element.animate() and setTimeout both reject the StyleX form.\n//\n// The gradient's soft edge (a currentColor disc fading to transparent over\n// its outer 30-35%, capped at 70px) replaces a hard-edged circle so the\n// ripple blends into the surface rather than looking like a solid dot.\n//\n// `closest-side` + a plain circular box means no `border-radius` is needed\n// on the ripple itself — the gradient's own shape reads as a circle.\nconst styles = {\n press: {\n kKwaWg: \"xliahv6\",\n kbCHJM: \"xu96u03\",\n kSiTet: \"xg01cxk\",\n kVAEAm: \"x10l6tqk\",\n k87sOh: \"x13vifvy\",\n k3nNDw: \"x1g0ag68\",\n kIyJzY: \"xbg8nd6\",\n k1ekBW: \"x19991ni\",\n kAMwcw: \"xcj1dhv\",\n $$css: true\n },\n pressed: {\n kSiTet: \"xjg27g\",\n kIyJzY: \"xjl7l83\",\n $$css: true\n },\n surface: {\n kaIpWk: \"x1pjcqnp\",\n k1xSpc: \"x1lliihq x1c7sf14\",\n kpwlN0: \"x10a8y8t\",\n kVQacm: \"xb3r6kr\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n }\n};\nexport { styles as rippleStyles };"],"mappings":";AAkCA,MAAM,SAAS;CACb,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/tokens/values.ts
|
|
2
|
+
const motionDurationMs = {
|
|
3
|
+
long1: 450,
|
|
4
|
+
long2: 500,
|
|
5
|
+
long3: 600,
|
|
6
|
+
medium1: 250,
|
|
7
|
+
medium2: 300,
|
|
8
|
+
medium3: 350,
|
|
9
|
+
short1: 100,
|
|
10
|
+
short2: 150,
|
|
11
|
+
short3: 200
|
|
12
|
+
};
|
|
13
|
+
const motionEasing = {
|
|
14
|
+
emphasized: "cubic-bezier(0.2, 0, 0, 1)",
|
|
15
|
+
emphasizedAccelerate: "cubic-bezier(0.3, 0, 0.8, 0.15)",
|
|
16
|
+
emphasizedDecelerate: "cubic-bezier(0.05, 0.7, 0.1, 1)",
|
|
17
|
+
springFast: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
18
|
+
springSlow: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
19
|
+
standard: "cubic-bezier(0.2, 0, 0, 1)"
|
|
20
|
+
};
|
|
21
|
+
const spacingPx = {
|
|
22
|
+
lg: 16,
|
|
23
|
+
md: 12,
|
|
24
|
+
sm: 8,
|
|
25
|
+
xl: 24,
|
|
26
|
+
xs: 4,
|
|
27
|
+
xxl: 32,
|
|
28
|
+
xxs: 2,
|
|
29
|
+
xxxl: 40
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { motionDurationMs, motionEasing, spacingPx };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.js","names":[],"sources":["../../src/tokens/values.ts"],"sourcesContent":["// AUTO-GENERATED by scripts/build-tokens.mjs from the sibling design.tokens.json.\n// Do not hand-edit — change design.tokens.json and run `npm run tokens:build`.\n//\n// Tokens as plain JS values, for the code that cannot take a CSS one. Reach for\n// the StyleX theme in design.tokens.stylex.ts anywhere a CSS property value\n// will do: those are var(--kui-*, literal) references, so a consumer who\n// redeclares the custom property moves them. The literals below are frozen at\n// build time and cannot honour such an override, which is the whole cost of\n// using them.\n//\n// So a group appears here only once something has to compute with it rather\n// than declare it, which today means two:\n//\n// motion — element.animate() throws a TypeError on a var() duration or\n// easing, and its duration wants a number of milliseconds, so even\n// '450ms' throws. setTimeout coerces a string to NaN and fires\n// immediately, silently.\n// spacing — useRipple does arithmetic with it, growing the ripple past the\n// host's corners by a fixed inset. A var() would concatenate into\n// nonsense rather than add.\n//\n// Colours, radii, shadows, typography and the state-layer opacities are all\n// declared rather than computed, so none of them is generated here.\n\nconst motionDurationMs = {\n long1: 450,\n long2: 500,\n long3: 600,\n medium1: 250,\n medium2: 300,\n medium3: 350,\n short1: 100,\n short2: 150,\n short3: 200,\n} as const\n\nconst motionEasing = {\n emphasized: 'cubic-bezier(0.2, 0, 0, 1)',\n emphasizedAccelerate: 'cubic-bezier(0.3, 0, 0.8, 0.15)',\n emphasizedDecelerate: 'cubic-bezier(0.05, 0.7, 0.1, 1)',\n springFast: 'cubic-bezier(0.34, 1.56, 0.64, 1)',\n springSlow: 'cubic-bezier(0.16, 1, 0.3, 1)',\n standard: 'cubic-bezier(0.2, 0, 0, 1)',\n} as const\n\nconst spacingPx = {\n lg: 16,\n md: 12,\n sm: 8,\n xl: 24,\n xs: 4,\n xxl: 32,\n xxs: 2,\n xxxl: 40,\n} as const\n\nexport { motionDurationMs, motionEasing, spacingPx }\n"],"mappings":";AAwBA,MAAM,mBAAmB;CACvB,OAAO;CACP,OAAO;CACP,OAAO;CACP,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;AACV;AAEA,MAAM,eAAe;CACnB,YAAY;CACZ,sBAAsB;CACtB,sBAAsB;CACtB,YAAY;CACZ,YAAY;CACZ,UAAU;AACZ;AAEA,MAAM,YAAY;CAChB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,KAAK;CACL,KAAK;CACL,MAAM;AACR"}
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/* AUTO-GENERATED by scripts/build-tokens.mjs from the sibling design.tokens.json.
|
|
2
|
+
Do not hand-edit — change design.tokens.json and run `npm run tokens:build`.
|
|
3
|
+
This is kanso-ui's public theming contract: override any custom property
|
|
4
|
+
below (e.g. in your app's global stylesheet, after importing this file)
|
|
5
|
+
to retheme every Kanso component — see the comment at the top of
|
|
6
|
+
build-tokens.mjs. */
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--kui-color-background: #fef7ff;
|
|
10
|
+
--kui-color-error-container: #f9dedc;
|
|
11
|
+
--kui-color-error: #b3261e;
|
|
12
|
+
--kui-color-inverse-on-surface: #f5eff7;
|
|
13
|
+
--kui-color-inverse-primary: #d0bcff;
|
|
14
|
+
--kui-color-inverse-surface: #322f35;
|
|
15
|
+
--kui-color-negative-container: #ffdbd1;
|
|
16
|
+
--kui-color-negative: #a04022;
|
|
17
|
+
--kui-color-on-background: #1d1b20;
|
|
18
|
+
--kui-color-on-error-container: #410e0b;
|
|
19
|
+
--kui-color-on-error: #ffffff;
|
|
20
|
+
--kui-color-on-negative-container: #3a0a00;
|
|
21
|
+
--kui-color-on-negative: #ffffff;
|
|
22
|
+
--kui-color-on-positive-container: #002115;
|
|
23
|
+
--kui-color-on-positive: #ffffff;
|
|
24
|
+
--kui-color-on-primary-container: #21005d;
|
|
25
|
+
--kui-color-on-primary-fixed-variant: #4f378b;
|
|
26
|
+
--kui-color-on-primary-fixed: #21005d;
|
|
27
|
+
--kui-color-on-primary: #ffffff;
|
|
28
|
+
--kui-color-on-secondary-container: #1d192b;
|
|
29
|
+
--kui-color-on-secondary-fixed-variant: #4a4458;
|
|
30
|
+
--kui-color-on-secondary-fixed: #1d192b;
|
|
31
|
+
--kui-color-on-secondary: #ffffff;
|
|
32
|
+
--kui-color-on-surface-variant: #49454f;
|
|
33
|
+
--kui-color-on-surface: #1d1b20;
|
|
34
|
+
--kui-color-on-tertiary-container: #31111d;
|
|
35
|
+
--kui-color-on-tertiary-fixed-variant: #633b48;
|
|
36
|
+
--kui-color-on-tertiary-fixed: #31111d;
|
|
37
|
+
--kui-color-on-tertiary: #ffffff;
|
|
38
|
+
--kui-color-outline-variant: #cac4d0;
|
|
39
|
+
--kui-color-outline: #79747e;
|
|
40
|
+
--kui-color-positive-container: #90f6ca;
|
|
41
|
+
--kui-color-positive: #006c4d;
|
|
42
|
+
--kui-color-primary-container: #eaddff;
|
|
43
|
+
--kui-color-primary-fixed-dim: #d0bcff;
|
|
44
|
+
--kui-color-primary-fixed: #eaddff;
|
|
45
|
+
--kui-color-primary: #6750a4;
|
|
46
|
+
--kui-color-scrim: #000000;
|
|
47
|
+
--kui-color-secondary-container: #e8def8;
|
|
48
|
+
--kui-color-secondary-fixed-dim: #ccc2dc;
|
|
49
|
+
--kui-color-secondary-fixed: #e8def8;
|
|
50
|
+
--kui-color-secondary: #625b71;
|
|
51
|
+
--kui-color-shadow: #000000;
|
|
52
|
+
--kui-color-surface-bright: #fef7ff;
|
|
53
|
+
--kui-color-surface-container-high: #ece6f0;
|
|
54
|
+
--kui-color-surface-container-highest: #e6e0e9;
|
|
55
|
+
--kui-color-surface-container-low: #f7f2fa;
|
|
56
|
+
--kui-color-surface-container-lowest: #ffffff;
|
|
57
|
+
--kui-color-surface-container: #f3edf7;
|
|
58
|
+
--kui-color-surface-dim: #ded8e1;
|
|
59
|
+
--kui-color-surface-tint: #6750a4;
|
|
60
|
+
--kui-color-surface-variant: #e7e0ec;
|
|
61
|
+
--kui-color-surface: #fef7ff;
|
|
62
|
+
--kui-color-tertiary-container: #ffd8e4;
|
|
63
|
+
--kui-color-tertiary-fixed-dim: #efb8c8;
|
|
64
|
+
--kui-color-tertiary-fixed: #ffd8e4;
|
|
65
|
+
--kui-color-tertiary: #7d5260;
|
|
66
|
+
--kui-motion-duration-long1: 450ms;
|
|
67
|
+
--kui-motion-duration-long2: 500ms;
|
|
68
|
+
--kui-motion-duration-long3: 600ms;
|
|
69
|
+
--kui-motion-duration-medium1: 250ms;
|
|
70
|
+
--kui-motion-duration-medium2: 300ms;
|
|
71
|
+
--kui-motion-duration-medium3: 350ms;
|
|
72
|
+
--kui-motion-duration-short1: 100ms;
|
|
73
|
+
--kui-motion-duration-short2: 150ms;
|
|
74
|
+
--kui-motion-duration-short3: 200ms;
|
|
75
|
+
--kui-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
|
|
76
|
+
--kui-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
|
|
77
|
+
--kui-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
|
|
78
|
+
--kui-motion-easing-spring-fast: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
79
|
+
--kui-motion-easing-spring-slow: cubic-bezier(0.16, 1, 0.3, 1);
|
|
80
|
+
--kui-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
81
|
+
--kui-radius-full: 9999px;
|
|
82
|
+
--kui-radius-lg: 16px;
|
|
83
|
+
--kui-radius-md: 12px;
|
|
84
|
+
--kui-radius-none: 0px;
|
|
85
|
+
--kui-radius-sm: 8px;
|
|
86
|
+
--kui-radius-xl: 28px;
|
|
87
|
+
--kui-radius-xs: 4px;
|
|
88
|
+
--kui-shadow-elevation1:
|
|
89
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
|
90
|
+
--kui-shadow-elevation2:
|
|
91
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
|
|
92
|
+
--kui-shadow-elevation3:
|
|
93
|
+
0px 1px 3px 0px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
|
|
94
|
+
--kui-shadow-elevation4:
|
|
95
|
+
0px 2px 3px 0px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15);
|
|
96
|
+
--kui-shadow-elevation5:
|
|
97
|
+
0px 4px 4px 0px rgba(0, 0, 0, 0.3), 0px 8px 12px 6px rgba(0, 0, 0, 0.15);
|
|
98
|
+
--kui-spacing-lg: 16px;
|
|
99
|
+
--kui-spacing-md: 12px;
|
|
100
|
+
--kui-spacing-sm: 8px;
|
|
101
|
+
--kui-spacing-xl: 24px;
|
|
102
|
+
--kui-spacing-xs: 4px;
|
|
103
|
+
--kui-spacing-xxl: 32px;
|
|
104
|
+
--kui-spacing-xxs: 2px;
|
|
105
|
+
--kui-spacing-xxxl: 40px;
|
|
106
|
+
--kui-state-layer-opacity-disabled-container: 0.12;
|
|
107
|
+
--kui-state-layer-opacity-disabled-content: 0.38;
|
|
108
|
+
--kui-state-layer-opacity-dragged: 0.16;
|
|
109
|
+
--kui-state-layer-opacity-focus: 0.12;
|
|
110
|
+
--kui-state-layer-opacity-hover: 0.08;
|
|
111
|
+
--kui-state-layer-opacity-pressed: 0.12;
|
|
112
|
+
--kui-typography-body-large-font:
|
|
113
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
114
|
+
sans-serif;
|
|
115
|
+
--kui-typography-body-large-line-height: 24px;
|
|
116
|
+
--kui-typography-body-large-size: 16px;
|
|
117
|
+
--kui-typography-body-large-tracking: 0.5px;
|
|
118
|
+
--kui-typography-body-large-weight: 400;
|
|
119
|
+
--kui-typography-body-medium-font:
|
|
120
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
121
|
+
sans-serif;
|
|
122
|
+
--kui-typography-body-medium-line-height: 20px;
|
|
123
|
+
--kui-typography-body-medium-size: 14px;
|
|
124
|
+
--kui-typography-body-medium-tracking: 0.25px;
|
|
125
|
+
--kui-typography-body-medium-weight: 400;
|
|
126
|
+
--kui-typography-body-small-font:
|
|
127
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
128
|
+
sans-serif;
|
|
129
|
+
--kui-typography-body-small-line-height: 16px;
|
|
130
|
+
--kui-typography-body-small-size: 12px;
|
|
131
|
+
--kui-typography-body-small-tracking: 0.4px;
|
|
132
|
+
--kui-typography-body-small-weight: 400;
|
|
133
|
+
--kui-typography-display-large-font:
|
|
134
|
+
'Roboto Serif', 'Iowan Old Style', Georgia, serif;
|
|
135
|
+
--kui-typography-display-large-line-height: 64px;
|
|
136
|
+
--kui-typography-display-large-size: 57px;
|
|
137
|
+
--kui-typography-display-large-tracking: -0.25px;
|
|
138
|
+
--kui-typography-display-large-weight: 400;
|
|
139
|
+
--kui-typography-display-medium-font:
|
|
140
|
+
'Roboto Serif', 'Iowan Old Style', Georgia, serif;
|
|
141
|
+
--kui-typography-display-medium-line-height: 52px;
|
|
142
|
+
--kui-typography-display-medium-size: 45px;
|
|
143
|
+
--kui-typography-display-medium-tracking: 0px;
|
|
144
|
+
--kui-typography-display-medium-weight: 400;
|
|
145
|
+
--kui-typography-display-small-font:
|
|
146
|
+
'Roboto Serif', 'Iowan Old Style', Georgia, serif;
|
|
147
|
+
--kui-typography-display-small-line-height: 44px;
|
|
148
|
+
--kui-typography-display-small-size: 36px;
|
|
149
|
+
--kui-typography-display-small-tracking: 0px;
|
|
150
|
+
--kui-typography-display-small-weight: 400;
|
|
151
|
+
--kui-typography-font-family-brand:
|
|
152
|
+
'Roboto Serif', 'Iowan Old Style', Georgia, serif;
|
|
153
|
+
--kui-typography-font-family-mono:
|
|
154
|
+
'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace;
|
|
155
|
+
--kui-typography-font-family-plain:
|
|
156
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
157
|
+
sans-serif;
|
|
158
|
+
--kui-typography-headline-large-font:
|
|
159
|
+
'Roboto Serif', 'Iowan Old Style', Georgia, serif;
|
|
160
|
+
--kui-typography-headline-large-line-height: 40px;
|
|
161
|
+
--kui-typography-headline-large-size: 32px;
|
|
162
|
+
--kui-typography-headline-large-tracking: 0px;
|
|
163
|
+
--kui-typography-headline-large-weight: 400;
|
|
164
|
+
--kui-typography-headline-medium-font:
|
|
165
|
+
'Roboto Serif', 'Iowan Old Style', Georgia, serif;
|
|
166
|
+
--kui-typography-headline-medium-line-height: 36px;
|
|
167
|
+
--kui-typography-headline-medium-size: 28px;
|
|
168
|
+
--kui-typography-headline-medium-tracking: 0px;
|
|
169
|
+
--kui-typography-headline-medium-weight: 400;
|
|
170
|
+
--kui-typography-headline-small-font:
|
|
171
|
+
'Roboto Serif', 'Iowan Old Style', Georgia, serif;
|
|
172
|
+
--kui-typography-headline-small-line-height: 32px;
|
|
173
|
+
--kui-typography-headline-small-size: 24px;
|
|
174
|
+
--kui-typography-headline-small-tracking: 0px;
|
|
175
|
+
--kui-typography-headline-small-weight: 400;
|
|
176
|
+
--kui-typography-label-large-font:
|
|
177
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
178
|
+
sans-serif;
|
|
179
|
+
--kui-typography-label-large-line-height: 20px;
|
|
180
|
+
--kui-typography-label-large-size: 14px;
|
|
181
|
+
--kui-typography-label-large-tracking: 0.1px;
|
|
182
|
+
--kui-typography-label-large-weight: 500;
|
|
183
|
+
--kui-typography-label-medium-font:
|
|
184
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
185
|
+
sans-serif;
|
|
186
|
+
--kui-typography-label-medium-line-height: 16px;
|
|
187
|
+
--kui-typography-label-medium-size: 12px;
|
|
188
|
+
--kui-typography-label-medium-tracking: 0.5px;
|
|
189
|
+
--kui-typography-label-medium-weight: 500;
|
|
190
|
+
--kui-typography-label-small-font:
|
|
191
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
192
|
+
sans-serif;
|
|
193
|
+
--kui-typography-label-small-line-height: 16px;
|
|
194
|
+
--kui-typography-label-small-size: 11px;
|
|
195
|
+
--kui-typography-label-small-tracking: 0.5px;
|
|
196
|
+
--kui-typography-label-small-weight: 500;
|
|
197
|
+
--kui-typography-title-large-font:
|
|
198
|
+
'Roboto Serif', 'Iowan Old Style', Georgia, serif;
|
|
199
|
+
--kui-typography-title-large-line-height: 28px;
|
|
200
|
+
--kui-typography-title-large-size: 22px;
|
|
201
|
+
--kui-typography-title-large-tracking: 0px;
|
|
202
|
+
--kui-typography-title-large-weight: 400;
|
|
203
|
+
--kui-typography-title-medium-font:
|
|
204
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
205
|
+
sans-serif;
|
|
206
|
+
--kui-typography-title-medium-line-height: 24px;
|
|
207
|
+
--kui-typography-title-medium-size: 16px;
|
|
208
|
+
--kui-typography-title-medium-tracking: 0.15px;
|
|
209
|
+
--kui-typography-title-medium-weight: 500;
|
|
210
|
+
--kui-typography-title-small-font:
|
|
211
|
+
'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
212
|
+
sans-serif;
|
|
213
|
+
--kui-typography-title-small-line-height: 20px;
|
|
214
|
+
--kui-typography-title-small-size: 14px;
|
|
215
|
+
--kui-typography-title-small-tracking: 0.1px;
|
|
216
|
+
--kui-typography-title-small-weight: 500;
|
|
217
|
+
--kui-typography-weight-bold: 700;
|
|
218
|
+
--kui-typography-weight-medium: 500;
|
|
219
|
+
--kui-typography-weight-regular: 400;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@media (prefers-color-scheme: dark) {
|
|
223
|
+
:root {
|
|
224
|
+
--kui-color-background: #141218;
|
|
225
|
+
--kui-color-error-container: #8c1d18;
|
|
226
|
+
--kui-color-error: #f2b8b5;
|
|
227
|
+
--kui-color-inverse-on-surface: #322f35;
|
|
228
|
+
--kui-color-inverse-primary: #6750a4;
|
|
229
|
+
--kui-color-inverse-surface: #e6e0e9;
|
|
230
|
+
--kui-color-negative-container: #81290c;
|
|
231
|
+
--kui-color-negative: #ffb59f;
|
|
232
|
+
--kui-color-on-background: #e6e0e9;
|
|
233
|
+
--kui-color-on-error-container: #f9dedc;
|
|
234
|
+
--kui-color-on-error: #601410;
|
|
235
|
+
--kui-color-on-negative-container: #ffdbd1;
|
|
236
|
+
--kui-color-on-negative: #5f1600;
|
|
237
|
+
--kui-color-on-positive-container: #90f6ca;
|
|
238
|
+
--kui-color-on-positive: #003827;
|
|
239
|
+
--kui-color-on-primary-container: #eaddff;
|
|
240
|
+
--kui-color-on-primary-fixed-variant: #4f378b;
|
|
241
|
+
--kui-color-on-primary-fixed: #21005d;
|
|
242
|
+
--kui-color-on-primary: #381e72;
|
|
243
|
+
--kui-color-on-secondary-container: #e8def8;
|
|
244
|
+
--kui-color-on-secondary-fixed-variant: #4a4458;
|
|
245
|
+
--kui-color-on-secondary-fixed: #1d192b;
|
|
246
|
+
--kui-color-on-secondary: #332d41;
|
|
247
|
+
--kui-color-on-surface-variant: #cac4d0;
|
|
248
|
+
--kui-color-on-surface: #e6e0e9;
|
|
249
|
+
--kui-color-on-tertiary-container: #ffd8e4;
|
|
250
|
+
--kui-color-on-tertiary-fixed-variant: #633b48;
|
|
251
|
+
--kui-color-on-tertiary-fixed: #31111d;
|
|
252
|
+
--kui-color-on-tertiary: #492532;
|
|
253
|
+
--kui-color-outline-variant: #49454f;
|
|
254
|
+
--kui-color-outline: #938f99;
|
|
255
|
+
--kui-color-positive-container: #00513a;
|
|
256
|
+
--kui-color-positive: #74d9af;
|
|
257
|
+
--kui-color-primary-container: #4f378b;
|
|
258
|
+
--kui-color-primary-fixed-dim: #d0bcff;
|
|
259
|
+
--kui-color-primary-fixed: #eaddff;
|
|
260
|
+
--kui-color-primary: #d0bcff;
|
|
261
|
+
--kui-color-scrim: #000000;
|
|
262
|
+
--kui-color-secondary-container: #4a4458;
|
|
263
|
+
--kui-color-secondary-fixed-dim: #ccc2dc;
|
|
264
|
+
--kui-color-secondary-fixed: #e8def8;
|
|
265
|
+
--kui-color-secondary: #ccc2dc;
|
|
266
|
+
--kui-color-shadow: #000000;
|
|
267
|
+
--kui-color-surface-bright: #3b383e;
|
|
268
|
+
--kui-color-surface-container-high: #2b2930;
|
|
269
|
+
--kui-color-surface-container-highest: #36343b;
|
|
270
|
+
--kui-color-surface-container-low: #1d1b20;
|
|
271
|
+
--kui-color-surface-container-lowest: #0f0d13;
|
|
272
|
+
--kui-color-surface-container: #211f26;
|
|
273
|
+
--kui-color-surface-dim: #141218;
|
|
274
|
+
--kui-color-surface-tint: #d0bcff;
|
|
275
|
+
--kui-color-surface-variant: #49454f;
|
|
276
|
+
--kui-color-surface: #141218;
|
|
277
|
+
--kui-color-tertiary-container: #633b48;
|
|
278
|
+
--kui-color-tertiary-fixed-dim: #efb8c8;
|
|
279
|
+
--kui-color-tertiary-fixed: #ffd8e4;
|
|
280
|
+
--kui-color-tertiary: #efb8c8;
|
|
281
|
+
}
|
|
282
|
+
}
|