@pg-labs-incubator/cobweb 0.0.4 → 0.0.6
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/package.json +7 -4
- package/target/esbuild/action/action.css +1 -1
- package/target/esbuild/action/base.jsx +1 -1
- package/target/esbuild/action/button.jsx +3 -3
- package/target/esbuild/action/fab-menu-context.jsx +1 -1
- package/target/esbuild/action/fab-menu.jsx +3 -3
- package/target/esbuild/action/fab.jsx +3 -3
- package/target/esbuild/action/group.jsx +7 -7
- package/target/esbuild/action/icon-button.jsx +3 -3
- package/target/esbuild/action/index.jsx +1 -1
- package/target/esbuild/action/split-button.jsx +4 -4
- package/target/esbuild/color/contrast.jsx +1 -1
- package/target/esbuild/color/dynamic.jsx +1 -1
- package/target/esbuild/color/hct.jsx +1 -1
- package/target/esbuild/color/index.jsx +1 -1
- package/target/esbuild/color/palette.jsx +1 -1
- package/target/esbuild/color/scheme.jsx +1 -1
- package/target/esbuild/color/temperature.jsx +1 -1
- package/target/esbuild/container/card.jsx +1 -1
- package/target/esbuild/container/elevation-shadow.jsx +1 -1
- package/target/esbuild/container/index.jsx +1 -1
- package/target/esbuild/dom/client.jsx +1 -1
- package/target/esbuild/dom/index.jsx +1 -1
- package/target/esbuild/dom/server.jsx +1 -1
- package/target/esbuild/dom/types.jsx +1 -1
- package/target/esbuild/feedback/badge.jsx +6 -6
- package/target/esbuild/feedback/focus.jsx +1 -1
- package/target/esbuild/feedback/index.jsx +1 -1
- package/target/esbuild/feedback/loading.jsx +3 -3
- package/target/esbuild/feedback/observe.jsx +1 -1
- package/target/esbuild/feedback/progress.jsx +9 -9
- package/target/esbuild/feedback/snackbar.jsx +6 -6
- package/target/esbuild/feedback/tooltip.jsx +6 -6
- package/target/esbuild/icon/icon.jsx +1 -1
- package/target/esbuild/icon/index.jsx +1 -1
- package/target/esbuild/index.jsx +1 -1
- package/target/esbuild/input/autocomplete.jsx +2 -2
- package/target/esbuild/input/base.jsx +2 -2
- package/target/esbuild/input/date-picker.jsx +19 -19
- package/target/esbuild/input/date-time.jsx +3 -3
- package/target/esbuild/input/index.jsx +1 -1
- package/target/esbuild/input/paired-input.jsx +1 -1
- package/target/esbuild/input/picker-dialog.jsx +3 -3
- package/target/esbuild/input/select.jsx +4 -4
- package/target/esbuild/input/slider.jsx +7 -7
- package/target/esbuild/input/text-field.jsx +4 -4
- package/target/esbuild/input/time-picker.jsx +5 -5
- package/target/esbuild/motion/follow-height.jsx +1 -0
- package/target/esbuild/motion/frame.jsx +1 -1
- package/target/esbuild/motion/index.jsx +1 -1
- package/target/esbuild/motion/material.jsx +1 -1
- package/target/esbuild/motion/motion.jsx +1 -1
- package/target/esbuild/motion/spring.jsx +1 -1
- package/target/esbuild/motion/transition.jsx +1 -1
- package/target/esbuild/motion/velocity.jsx +1 -1
- package/target/esbuild/navigation/app-bar.jsx +8 -8
- package/target/esbuild/navigation/base.jsx +1 -1
- package/target/esbuild/navigation/drawer.jsx +7 -7
- package/target/esbuild/navigation/index.jsx +1 -1
- package/target/esbuild/navigation/navigation.jsx +12 -12
- package/target/esbuild/navigation/scroll.jsx +1 -1
- package/target/esbuild/navigation/search.jsx +4 -4
- package/target/esbuild/navigation/tabs.jsx +3 -3
- package/target/esbuild/navigation/toolbar.jsx +3 -3
- package/target/esbuild/selection/base.jsx +1 -1
- package/target/esbuild/selection/checkbox.jsx +4 -4
- package/target/esbuild/selection/chip.jsx +5 -5
- package/target/esbuild/selection/index.jsx +1 -1
- package/target/esbuild/selection/radio.jsx +3 -3
- package/target/esbuild/selection/segmented.jsx +4 -4
- package/target/esbuild/selection/switch.jsx +3 -3
- package/target/esbuild/shape/corner-rounding.jsx +1 -1
- package/target/esbuild/shape/cubic.jsx +1 -1
- package/target/esbuild/shape/index.jsx +1 -1
- package/target/esbuild/shape/material-shapes.jsx +1 -1
- package/target/esbuild/shape/morph.jsx +1 -1
- package/target/esbuild/shape/path.jsx +1 -1
- package/target/esbuild/shape/point.jsx +1 -1
- package/target/esbuild/shape/rounded-polygon.jsx +1 -1
- package/target/esbuild/shape/shapes.jsx +1 -1
- package/target/esbuild/spacing/index.jsx +1 -1
- package/target/esbuild/state/component.css +1 -1
- package/target/esbuild/state/component.jsx +1 -1
- package/target/esbuild/state/controller.jsx +1 -1
- package/target/esbuild/state/index.jsx +1 -1
- package/target/esbuild/state/ripple.jsx +1 -1
- package/target/esbuild/state/state.jsx +1 -1
- package/target/esbuild/state/style.jsx +1 -1
- package/target/esbuild/surface/carousel-layout.jsx +1 -1
- package/target/esbuild/surface/carousel.jsx +2 -2
- package/target/esbuild/surface/dialog.jsx +5 -5
- package/target/esbuild/surface/divider.jsx +1 -1
- package/target/esbuild/surface/drag.jsx +1 -1
- package/target/esbuild/surface/gestures.jsx +3 -3
- package/target/esbuild/surface/index.jsx +1 -1
- package/target/esbuild/surface/interactive.jsx +1 -1
- package/target/esbuild/surface/list-patterns.jsx +3 -3
- package/target/esbuild/surface/list.jsx +2 -2
- package/target/esbuild/surface/menu.jsx +3 -3
- package/target/esbuild/surface/scaffold.jsx +7 -7
- package/target/esbuild/surface/sheet.jsx +5 -5
- package/target/esbuild/surface/side-sheet.jsx +2 -2
- package/target/esbuild/surface/slots.jsx +1 -1
- package/target/esbuild/surface/surface.jsx +1 -1
- package/target/esbuild/text/index.jsx +1 -1
- package/target/esbuild/text/text.jsx +2 -2
- package/target/esbuild/text/typography.jsx +1 -1
- package/target/esbuild/util/box-side.jsx +1 -1
- package/target/esbuild/util/debug.jsx +1 -1
- package/target/esbuild/util/dom.jsx +1 -1
- package/target/esbuild/util/environment.jsx +1 -0
- package/target/esbuild/util/event.jsx +1 -1
- package/target/esbuild/util/index.jsx +1 -1
- package/target/esbuild/util/preconditions.jsx +1 -1
- package/target/esbuild/util/reactive.jsx +1 -1
- package/target/node/color.js +1 -0
- package/target/node/shape.js +1 -0
- package/target/tsc/motion/follow-height.d.ts +51 -0
- package/target/tsc/motion/index.d.ts +7 -3
- package/target/tsc/motion/spring.d.ts +3 -3
- package/target/tsc/shape/index.d.ts +1 -1
- package/target/tsc/shape/material-shapes.d.ts +56 -0
- package/target/tsc/shape/path.d.ts +16 -0
- package/target/tsc/util/environment.d.ts +14 -0
- package/target/tsc/util/index.d.ts +2 -1
- package/target/tsc/util/preconditions.d.ts +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pg-labs-incubator/cobweb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Cobweb components library, based on Material 3 design, for SolidJS.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"homepage": "https://pglabs.ai/projects/cobweb",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"./src/**/*.yaml",
|
|
18
18
|
"./target/esbuild/**/*.css",
|
|
19
19
|
"./target/esbuild/**/*.jsx",
|
|
20
|
+
"./target/node/*.js",
|
|
20
21
|
"./target/tsc/**/*.d.ts"
|
|
21
22
|
],
|
|
22
23
|
"exports": {
|
|
@@ -33,7 +34,8 @@
|
|
|
33
34
|
"./color": {
|
|
34
35
|
"types": "./target/tsc/color/index.d.ts",
|
|
35
36
|
"solid": "./target/esbuild/color/index.jsx",
|
|
36
|
-
"style": "./target/esbuild/color/index.css"
|
|
37
|
+
"style": "./target/esbuild/color/index.css",
|
|
38
|
+
"default": "./target/node/color.js"
|
|
37
39
|
},
|
|
38
40
|
"./container": {
|
|
39
41
|
"types": "./target/tsc/container/index.d.ts",
|
|
@@ -67,7 +69,8 @@
|
|
|
67
69
|
},
|
|
68
70
|
"./shape": {
|
|
69
71
|
"types": "./target/tsc/shape/index.d.ts",
|
|
70
|
-
"solid": "./target/esbuild/shape/index.jsx"
|
|
72
|
+
"solid": "./target/esbuild/shape/index.jsx",
|
|
73
|
+
"default": "./target/node/shape.js"
|
|
71
74
|
},
|
|
72
75
|
"./selection": {
|
|
73
76
|
"types": "./target/tsc/selection/index.d.ts",
|
|
@@ -101,7 +104,7 @@
|
|
|
101
104
|
},
|
|
102
105
|
"devDependencies": {
|
|
103
106
|
"@pg-labs-incubator/cobweb-design": "^0.0.1",
|
|
104
|
-
"@pg-labs-incubator/lightningcss-plugin-cobweb": "^0.0.
|
|
107
|
+
"@pg-labs-incubator/lightningcss-plugin-cobweb": "^0.0.2",
|
|
105
108
|
"@solidjs/testing-library": "^0.8.10",
|
|
106
109
|
"@vitest/browser": "^3.2.4",
|
|
107
110
|
"playwright": "1.62.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@cw-attribute-roles cw-Action;@cw-attribute-roles cw-Button;@cw-attribute-roles cw-ButtonGroup;@cw-attribute-roles cw-SplitButton;@layer cw-style{:is(.cw-Button,.cw-IconButton,.cw-FAB){--cw-Action-container-shadowColor: cw-var(--cw-Action-container-shadowColor, default);--cw-Action-disabled-containerColor: cw-var(--cw-Action-disabled-containerColor, default);--cw-Action-disabled-contentColor: cw-var(--cw-Action-disabled-contentColor, default);--cw-Action-disabled-outlineColor: cw-var(--cw-Action-disabled-outlineColor, default);--cw-Action-icon-color: cw-var(--cw-Action-icon-color, default);--cw-Action-label-color: cw-var(--cw-Action-label-color, default);--cw-Action-selected-containerColor: cw-var(--cw-Action-selected-containerColor, default);--cw-Action-selected-contentColor: cw-var(--cw-Action-selected-contentColor, default);--cw-Action-unselected-containerColor: cw-var(--cw-Action-unselected-containerColor, default);--cw-Action-unselected-contentColor: cw-var(--cw-Action-unselected-contentColor, default);--_CW-ACTION-CONTAINER_COLOR: cw-var(--cw-Action-container-color);--_CW-ACTION-ELEVATION: cw-var(--cw-Action-container-elevation);--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-ICON_COLOR: cw-var(--cw-Action-icon-color);--_CW-ACTION-INNER_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-LABEL_COLOR: cw-var(--cw-Action-label-color);--_CW-ACTION-OUTLINE_COLOR: cw-var(--cw-Action-container-outlineColor);--_CW-ACTION-OUTLINE_WIDTH: 0px;--_CW-ACTION-SHADOW_COLOR: cw-var(--cw-Action-container-shadowColor);--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) ;--_CW-ACTION-SHAPE_DURATION: cw-var(--cw-Motion-spring-effect-default-duration);--_CW-ACTION-SHAPE_EASING: cw-var(--cw-Motion-spring-effect-default-easing);--_CW-ACTION-SIZE_DURATION: cw-var(--cw-Motion-spring-spatial-fast-duration);--_CW-ACTION-SIZE_EASING: cw-var(--cw-Motion-spring-spatial-fast-easing);--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-VISUAL_BLOCK_SIZE: cw-var(--cw-Button-containerHeight);--_CW-ACTION-VISUAL_BLOCK_START: calc((100% - var(--_CW-ACTION-VISUAL_BLOCK_SIZE)) / 2);--_CW-ACTION-VISUAL_INLINE_SIZE: 100%;--_CW-ACTION-VISUAL_INLINE_START: calc((100% - var(--_CW-ACTION-VISUAL_INLINE_SIZE)) / 2);--cw-interactable-focusIndicator-color: cw-var(--cw-Color-secondary-fill);--cw-interactable-focusIndicator-offset: cw-var(--cw-State-focusIndicator-outerOffset);--cw-interactable-focusIndicator-thickness: cw-var(--cw-State-focusIndicator-thickness);--cw-interactable-stateLayer-color: var(--_CW-ACTION-LABEL_COLOR);-webkit-tap-highlight-color:transparent;align-items:center;appearance:none;background-color:transparent;border:0;box-sizing:border-box;color:var(--_CW-ACTION-LABEL_COLOR);cursor:pointer;display:inline-flex;flex:none;font:inherit;isolation:isolate;justify-content:center;min-block-size:48px;min-inline-size:48px;outline:none;position:relative;text-decoration:none;transition-duration:cw-var(--cw-Motion-spring-effect-fast-duration),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION);transition-property:color,column-gap,inline-size,padding-block-end,padding-block-start,padding-inline-end,padding-inline-start;transition-timing-function:cw-var(--cw-Motion-spring-effect-fast-easing),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING);user-select:none;vertical-align:middle;z-index:0}:is(.cw-Button,.cw-IconButton,.cw-FAB)[hidden]{display:none!important}:is(.cw-Button,.cw-IconButton,.cw-FAB)[aria-disabled=true]{cursor:default}:is(.cw-Button,.cw-IconButton,.cw-FAB):after{background-color:var(--_CW-ACTION-CONTAINER_COLOR);background-image:var(--_CW-ACTION-CONTAINER_OVERLAY, none);block-size:var(--_CW-ACTION-VISUAL_BLOCK_SIZE);border-color:var(--_CW-ACTION-OUTLINE_COLOR);border-end-end-radius:var(--_CW-ACTION-END_END_SHAPE);border-end-start-radius:var(--_CW-ACTION-END_START_SHAPE);border-start-end-radius:var(--_CW-ACTION-START_END_SHAPE);border-start-start-radius:var(--_CW-ACTION-START_START_SHAPE);border-style:solid;border-width:var(--_CW-ACTION-OUTLINE_WIDTH);box-shadow:0 calc((clamp(0,var(--_CW-ACTION-ELEVATION),1) + clamp(0,var(--_CW-ACTION-ELEVATION) - 3,1) + clamp(0,var(--_CW-ACTION-ELEVATION) - 4,1)*2)*1px) calc((clamp(0,var(--_CW-ACTION-ELEVATION),1)*2 + clamp(0,var(--_CW-ACTION-ELEVATION) - 2,1) + clamp(0,var(--_CW-ACTION-ELEVATION) - 4,1))*1px) cw-scale-opacity(var(--_CW-ACTION-SHADOW_COLOR),calc(clamp(0,var(--_CW-ACTION-ELEVATION),1)*.3)),0 calc((clamp(0,var(--_CW-ACTION-ELEVATION),2) + clamp(0,var(--_CW-ACTION-ELEVATION) - 2,3)*2)*1px) calc((clamp(0,var(--_CW-ACTION-ELEVATION),2)*3 + clamp(0,var(--_CW-ACTION-ELEVATION) - 2,3)*2)*1px) calc((clamp(0,var(--_CW-ACTION-ELEVATION),4) + clamp(0,var(--_CW-ACTION-ELEVATION) - 4,1)*2)*1px) cw-scale-opacity(var(--_CW-ACTION-SHADOW_COLOR),calc(clamp(0,var(--_CW-ACTION-ELEVATION),1)*.15));box-sizing:border-box;content:"";inline-size:var(--_CW-ACTION-VISUAL_INLINE_SIZE);inset-block-start:var(--_CW-ACTION-VISUAL_BLOCK_START);inset-inline-start:var(--_CW-ACTION-VISUAL_INLINE_START);pointer-events:none;position:absolute;transition-duration:cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-default-duration),var(--_CW-ACTION-SHAPE_DURATION),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-default-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration);transition-property:background-color,block-size,border-color,border-radius,border-width,box-shadow,inline-size,inset-block-start,inset-inline-start;transition-timing-function:cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-default-easing),var(--_CW-ACTION-SHAPE_EASING),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-default-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing);z-index:-2}:is(.cw-Button,.cw-IconButton,.cw-FAB):before,:is(.cw-Button,.cw-IconButton,.cw-FAB)._cw-interactable-stateLayer:before{block-size:var(--_CW-ACTION-VISUAL_BLOCK_SIZE);border-end-end-radius:var(--_CW-ACTION-END_END_SHAPE);border-end-start-radius:var(--_CW-ACTION-END_START_SHAPE);border-start-end-radius:var(--_CW-ACTION-START_END_SHAPE);border-start-start-radius:var(--_CW-ACTION-START_START_SHAPE);box-sizing:border-box;content:"";inline-size:var(--_CW-ACTION-VISUAL_INLINE_SIZE);inset-block-end:auto;inset-block-start:var(--_CW-ACTION-VISUAL_BLOCK_START);inset-inline-end:auto;inset-inline-start:var(--_CW-ACTION-VISUAL_INLINE_START);pointer-events:none;position:absolute;z-index:-1}.cw-interactable:is(.cw-Button,.cw-IconButton,.cw-FAB):before{transition-duration:cw-var(--cw-Motion-spring-spatial-fast-duration),var(--_CW-ACTION-SHAPE_DURATION),cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration);transition-property:block-size,border-radius,color,inline-size,inset-block-start,inset-inline-start,outline-offset,outline-width;transition-timing-function:cw-var(--cw-Motion-spring-spatial-fast-easing),var(--_CW-ACTION-SHAPE_EASING),cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing)}:is(.cw-Button,.cw-IconButton,.cw-FAB) .cw-Icon{--cw-Icon-color: var(--_CW-ACTION-ICON_COLOR);transition-duration:cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration);transition-property:--cw-Icon-size,color,rotate;transition-timing-function:cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing)}:is(.cw-Button-toggle,.cw-IconButton-toggle,.cw-FAB-toggle){--_CW-ACTION-CONTAINER_COLOR: cw-var(--cw-Action-unselected-containerColor);--_CW-ACTION-ICON_COLOR: cw-var(--cw-Action-unselected-contentColor);--_CW-ACTION-LABEL_COLOR: cw-var(--cw-Action-unselected-contentColor)}:is(._cw-Button-outlined,._cw-IconButton-outlined){--_CW-ACTION-OUTLINE_WIDTH: cw-var(--cw-Button-outlineWidth)}:is(.cw-Button-checked,.cw-IconButton-checked,.cw-FAB-checked),._cw-FABMenu-open>.cw-FABMenu-trigger .cw-FAB{--_CW-ACTION-CONTAINER_COLOR: cw-var(--cw-Action-selected-containerColor);--_CW-ACTION-ICON_COLOR: cw-var(--cw-Action-selected-contentColor);--_CW-ACTION-LABEL_COLOR: cw-var(--cw-Action-selected-contentColor);--_CW-ACTION-OUTLINE_WIDTH: 0px}.cw-Button.cw-Button-disabled,.cw-IconButton.cw-IconButton-disabled,.cw-FAB.cw-FAB-disabled{--_CW-ACTION-CONTAINER_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-containerColor), cw-var(--cw-Action-disabled-containerOpacity) );--_CW-ACTION-ELEVATION: 0;--_CW-ACTION-ICON_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-contentColor), cw-var(--cw-Action-disabled-contentOpacity) );--_CW-ACTION-LABEL_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-contentColor), cw-var(--cw-Action-disabled-contentOpacity) );--_CW-ACTION-OUTLINE_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-outlineColor), cw-var(--cw-Action-disabled-outlineOpacity) );cursor:default}:is(.cw-Button-disabled.cw-Button-checked,.cw-IconButton-disabled.cw-IconButton-checked,.cw-FAB-disabled.cw-FAB-checked){--_CW-ACTION-CONTAINER_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-containerColor), cw-var(--cw-Action-disabled-selectedContainerOpacity) )}:is(.cw-Button-hover,.cw-IconButton-hover,.cw-FAB-hover){--_CW-ACTION-ELEVATION: cw-var(--cw-Action-hover-containerElevation);--cw-interactable-stateLayer-opacity: cw-var(--cw-State-layer-hoverOpacity)}:is(.cw-Button-focus,.cw-IconButton-focus,.cw-FAB-focus){--_CW-ACTION-ELEVATION: cw-var(--cw-Action-focus-containerElevation);--cw-interactable-stateLayer-opacity: cw-var(--cw-State-layer-focusOpacity)}:is(.cw-Button-press,.cw-IconButton-press,.cw-FAB-press){--_CW-ACTION-ELEVATION: cw-var(--cw-Action-press-containerElevation);--cw-interactable-ripple-color: var(--cw-interactable-stateLayer-color);--cw-interactable-ripple-opacity: cw-var(--cw-State-layer-pressOpacity)}.cw-Button{--_CW-BUTTON-ICON_SIZE: cw-var(--cw-Button-iconSize);block-size:max(48px,cw-var(--cw-Button-containerHeight));column-gap:cw-var(--cw-Button-iconLabelSpace);padding-block:0;padding-inline:calc(cw-var(--cw-Button-leadingSpace) + var(--_CW-BUTTONGROUP-DELTA, 0px) / 2) calc(cw-var(--cw-Button-trailingSpace) + var(--_CW-BUTTONGROUP-DELTA, 0px) / 2)}.cw-Button:any-link{letter-spacing:normal;text-indent:0;text-shadow:none;text-transform:none;word-spacing:normal}.cw-Button-disabled:any-link{pointer-events:none}._cw-Button-xs{@cw-apply-theme xs,cw-Button;}._cw-Button-sm{@cw-apply-theme sm,cw-Button;}._cw-Button-md{@cw-apply-theme md,cw-Button;}._cw-Button-lg{@cw-apply-theme lg,cw-Button;}._cw-Button-xl{@cw-apply-theme xl,cw-Button;}.cw-ActionButton-label{-cw-typescale:--cw-Typescale-label-large;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}._cw-Button-md>.cw-ActionButton-label{-cw-typescale:--cw-Typescale-title-medium}._cw-Button-lg>.cw-ActionButton-label{-cw-typescale:--cw-Typescale-headline-small}._cw-Button-xl>.cw-ActionButton-label{-cw-typescale:--cw-Typescale-headline-large}:is(.cw-ActionButton-leadingIcon,.cw-ActionButton-trailingIcon){align-items:center;color:var(--_CW-ACTION-ICON_COLOR);display:inline-flex;flex:none;font-size:var(--_CW-BUTTON-ICON_SIZE);justify-content:center;pointer-events:none}:is(.cw-ActionButton-label,.cw-ActionButton-leadingIcon,.cw-ActionButton-trailingIcon):empty{display:none}.cw-Button .cw-Icon{--cw-Icon-size: var(--_CW-BUTTON-ICON_SIZE)}._cw-Button-square,.cw-Button.cw-Button-checked{--_CW-ACTION-SHAPE: cw-var(--cw-Button-squareShape)}._cw-Button-square.cw-Button-checked{--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }.cw-Button.cw-Button-press{--_CW-ACTION-SHAPE: cw-var(--cw-Button-pressedShape)}.cw-Button-toggle{--_CW-ACTION-SHAPE_DURATION: cw-var(--cw-Motion-spring-spatial-fast-duration);--_CW-ACTION-SHAPE_EASING: cw-var(--cw-Motion-spring-spatial-fast-easing)}.cw-IconButton{--_CW-ACTION-VISUAL_INLINE_SIZE: calc( var(--_CW-ICONBUTTON-ICON_SIZE) + 2 * var(--_CW-ICONBUTTON-SPACE) + var(--_CW-BUTTONGROUP-DELTA, 0px) );--_CW-ICONBUTTON-ICON_SIZE: cw-var(--cw-Button-iconButton-iconSize);--_CW-ICONBUTTON-SPACE: cw-var(--cw-Button-iconButton-defaultSpace);block-size:max(48px,cw-var(--cw-Button-containerHeight));inline-size:max(48px,var(--_CW-ACTION-VISUAL_INLINE_SIZE));padding:0}._cw-IconButton-xs{@cw-apply-theme xs,cw-Button;}._cw-IconButton-sm{@cw-apply-theme sm,cw-Button;}._cw-IconButton-md{@cw-apply-theme md,cw-Button;}._cw-IconButton-lg{@cw-apply-theme lg,cw-Button;}._cw-IconButton-xl{@cw-apply-theme xl,cw-Button;}._cw-IconButton-narrow{--_CW-ICONBUTTON-SPACE: cw-var(--cw-Button-iconButton-narrowSpace)}._cw-IconButton-wide{--_CW-ICONBUTTON-SPACE: cw-var(--cw-Button-iconButton-wideSpace)}.cw-IconButton .cw-Icon{--cw-Icon-size: var(--_CW-ICONBUTTON-ICON_SIZE)}._cw-IconButton-square,.cw-IconButton.cw-IconButton-checked{--_CW-ACTION-SHAPE: cw-var(--cw-Button-squareShape)}._cw-IconButton-square.cw-IconButton-checked{--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }.cw-IconButton.cw-IconButton-press{--_CW-ACTION-SHAPE: cw-var(--cw-Button-pressedShape)}.cw-FAB{--_CW-ACTION-SHAPE: cw-var(--cw-Button-fab-containerShape);--_CW-ACTION-VISUAL_INLINE_SIZE: cw-var(--cw-Button-containerHeight);--_CW-FAB-FADE_DURATION: cw-var(--cw-Motion-spring-effect-fast-duration);--_CW-FAB-FADE_EASING: cw-var(--cw-Motion-spring-effect-fast-easing);--_CW-FAB-ICON_SIZE: cw-var(--cw-Button-iconSize);block-size:max(48px,cw-var(--cw-Button-containerHeight));column-gap:0;min-inline-size:max(48px,cw-var(--cw-Button-containerHeight));padding-block:0;padding-inline:calc((cw-var(--cw-Button-containerHeight) - var(--_CW-FAB-ICON_SIZE)) / 2)}.cw-FAB{@cw-apply-theme fab,cw-Button;}._cw-FAB-small{@cw-apply-theme fabSmall,cw-Button;}._cw-FAB-medium{@cw-apply-theme fabMedium,cw-Button;}._cw-FAB-large{@cw-apply-theme fabLarge,cw-Button;}._cw-FAB-small._cw-FAB-extended{@cw-apply-theme extendedFabSmall,cw-Button;}._cw-FAB-large._cw-FAB-extended{@cw-apply-theme extendedFabLarge,cw-Button;}._cw-FAB-extended{--_CW-ACTION-VISUAL_INLINE_SIZE: 100%}._cw-FAB-expanded{column-gap:cw-var(--cw-Button-iconLabelSpace);padding-inline:cw-var(--cw-Button-leadingSpace) cw-var(--cw-Button-trailingSpace)}._cw-FAB-expanded:has(>.cw-FAB-icon:empty){padding-inline-start:cw-var(--cw-Button-trailingSpace)}.cw-FAB-icon{align-items:center;color:var(--_CW-ACTION-ICON_COLOR);display:inline-flex;flex:none;font-size:var(--_CW-FAB-ICON_SIZE);justify-content:center;pointer-events:none}.cw-FAB .cw-Icon{--cw-Icon-size: var(--_CW-FAB-ICON_SIZE)}.cw-FAB-label{-cw-typescale:--cw-Typescale-label-large;display:grid;grid-template-columns:minmax(0,0fr);opacity:0;overflow:hidden;text-wrap:nowrap;transition-duration:var(--_CW-ACTION-SIZE_DURATION),var(--_CW-FAB-FADE_DURATION);transition-property:grid-template-columns,opacity;transition-timing-function:var(--_CW-ACTION-SIZE_EASING),var(--_CW-FAB-FADE_EASING)}.cw-FAB-icon:empty,.cw-FAB-label:empty{display:none}._cw-FAB-expanded>.cw-FAB-label{grid-template-columns:minmax(0,1fr);opacity:1}._cw-FAB-extended:not(._cw-FAB-small,._cw-FAB-medium,._cw-FAB-large){--_CW-ACTION-SIZE_DURATION: cw-var(--cw-Motion-spring-spatial-default-duration);--_CW-ACTION-SIZE_EASING: cw-var(--cw-Motion-spring-spatial-default-easing)}._cw-FAB-expanded:not(._cw-FAB-small,._cw-FAB-medium,._cw-FAB-large){--_CW-ACTION-SIZE_DURATION: cw-var(--cw-Motion-spring-spatial-fast-duration);--_CW-ACTION-SIZE_EASING: cw-var(--cw-Motion-spring-spatial-fast-easing);--_CW-FAB-FADE_DURATION: cw-var(--cw-Motion-spring-effect-default-duration);--_CW-FAB-FADE_EASING: cw-var(--cw-Motion-spring-effect-default-easing)}._cw-FAB-small>.cw-FAB-label{-cw-typescale:--cw-Typescale-title-medium}._cw-FAB-medium>.cw-FAB-label{-cw-typescale:--cw-Typescale-title-large}._cw-FAB-large>.cw-FAB-label{-cw-typescale:--cw-Typescale-headline-small}.cw-FAB.cw-FAB-checked,._cw-FABMenu-open>.cw-FABMenu-trigger .cw-FAB{--_CW-ACTION-SHAPE: calc(var(--_CW-FAB-CLOSE_SIZE) / 2);--_CW-ACTION-SHAPE_DURATION: cw-var(--cw-Motion-spring-spatial-fast-duration);--_CW-ACTION-SHAPE_EASING: cw-var(--cw-Motion-spring-spatial-fast-easing);--_CW-ACTION-VISUAL_BLOCK_SIZE: var(--_CW-FAB-CLOSE_SIZE);--_CW-ACTION-VISUAL_BLOCK_START: 0px;--_CW-ACTION-VISUAL_INLINE_SIZE: var(--_CW-FAB-CLOSE_SIZE);--_CW-ACTION-VISUAL_INLINE_START: calc(100% - var(--_CW-FAB-CLOSE_SIZE));--_CW-FAB-CLOSE_SIZE: cw-var(--cw-Button-closeButton-containerHeight);--_CW-FAB-ICON_SIZE: cw-var(--cw-Button-closeButton-iconSize);padding-block:calc((var(--_CW-FAB-CLOSE_SIZE) - var(--_CW-FAB-ICON_SIZE)) / 2) calc(cw-var(--cw-Button-containerHeight) - (var(--_CW-FAB-CLOSE_SIZE) + var(--_CW-FAB-ICON_SIZE)) / 2);padding-inline:calc(cw-var(--cw-Button-containerHeight) - (var(--_CW-FAB-CLOSE_SIZE) + var(--_CW-FAB-ICON_SIZE)) / 2) calc((var(--_CW-FAB-CLOSE_SIZE) - var(--_CW-FAB-ICON_SIZE)) / 2)}.cw-FABMenu{display:inline-flex;position:relative}.cw-FABMenu-trigger{display:inline-flex}.cw-FABMenu-items{align-items:end;display:flex;flex-direction:column;inline-size:max-content;inset-block-end:calc(100% + cw-var(--cw-Button-fabMenu-closeButtonSpacing));inset-inline-end:0;max-inline-size:calc(100vw - 32px);position:absolute;row-gap:cw-var(--cw-Button-fabMenu-itemSpacing)}.cw-FABMenu-items .cw-FAB{@cw-apply-theme fabMenuItem,cw-Button;}.cw-FABMenu-items .cw-FAB{--_CW-ACTION-VISUAL_BLOCK_SIZE: 100%;block-size:auto;min-block-size:max(48px,cw-var(--cw-Button-containerHeight))}.cw-FABMenu-items .cw-FAB>.cw-FAB-label{-cw-typescale:--cw-Typescale-title-medium;overflow-wrap:anywhere;text-wrap:wrap}.cw-FABMenu-items>*{clip-path:inset(-24px -24px -24px calc(100% + 24px) round 52px);opacity:0;transition-delay:calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0)),calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0)),calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0) + cw-var(--cw-Motion-spring-spatial-fast-duration));transition-duration:cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-fast-duration),0s;transition-property:clip-path,opacity,visibility;transition-timing-function:cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-fast-easing),linear;visibility:hidden}.cw-FABMenu-items:dir(rtl)>*{clip-path:inset(-24px calc(100% + 24px) -24px -24px round 52px)}._cw-FABMenu-open>.cw-FABMenu-items>*{clip-path:inset(-24px round 52px);opacity:1;transition-delay:calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0)),calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0)),0s;visibility:visible}.cw-ButtonGroup{--_CW-BUTTONGROUP-INNER_SHAPE: cw-var(--cw-ButtonGroup-innerShape);--_CW-BUTTONGROUP-PRESSED_SHAPE: cw-var(--cw-ButtonGroup-pressedShape);align-items:center;display:inline-flex}._cw-ButtonGroup-xs{@cw-apply-theme xs,cw-ButtonGroup;@cw-apply-theme xs,cw-Button;}._cw-ButtonGroup-sm{@cw-apply-theme sm,cw-ButtonGroup;@cw-apply-theme sm,cw-Button;}._cw-ButtonGroup-md{@cw-apply-theme md,cw-ButtonGroup;@cw-apply-theme md,cw-Button;}._cw-ButtonGroup-lg{@cw-apply-theme lg,cw-ButtonGroup;@cw-apply-theme lg,cw-Button;}._cw-ButtonGroup-xl{@cw-apply-theme xl,cw-ButtonGroup;@cw-apply-theme xl,cw-Button;}.cw-ButtonGroup._cw-ButtonGroup-standard{gap:cw-var(--cw-ButtonGroup-spacing)}.cw-ButtonGroup._cw-ButtonGroup-connected{gap:cw-var(--cw-ButtonGroup-connectedSpacing)}._cw-ButtonGroup-vertical{align-items:stretch;flex-direction:column}._cw-ButtonGroup-overflow{display:flex;position:relative}._cw-ButtonGroup-overflow>._cw-ButtonGroup-overflowed{max-inline-size:100%;pointer-events:none;position:absolute;visibility:hidden}.cw-ButtonGroup._cw-ButtonGroup-connected>:is(.cw-Button,.cw-IconButton){--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-INNER_SHAPE: var(--_CW-BUTTONGROUP-INNER_SHAPE);--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) ;--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-INNER_SHAPE)}._cw-ButtonGroup-connected._cw-ButtonGroup-square>:is(.cw-Button,.cw-IconButton){--_CW-ACTION-SHAPE: cw-var(--cw-Button-squareShape)}._cw-ButtonGroup-connected>:is(.cw-Button,.cw-IconButton):is(.cw-Button-checked,.cw-IconButton-checked){--_CW-ACTION-INNER_SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) ;--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }._cw-ButtonGroup-connected>:is(.cw-Button,.cw-IconButton):is(.cw-Button-press,.cw-IconButton-press){--_CW-ACTION-INNER_SHAPE: var(--_CW-BUTTONGROUP-PRESSED_SHAPE)}._cw-ButtonGroup-connected:not(._cw-ButtonGroup-vertical)>:nth-child(1 of:is(.cw-Button,.cw-IconButton)){--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-SHAPE)}._cw-ButtonGroup-connected:not(._cw-ButtonGroup-vertical)>:nth-last-child(1 of:is(.cw-Button,.cw-IconButton)){--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-SHAPE)}._cw-ButtonGroup-connected._cw-ButtonGroup-vertical>:nth-child(1 of:is(.cw-Button,.cw-IconButton)){--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-SHAPE)}._cw-ButtonGroup-connected._cw-ButtonGroup-vertical>:nth-last-child(1 of:is(.cw-Button,.cw-IconButton)){--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-SHAPE)}._cw-ButtonGroup-selection{--_CW-BUTTONGROUP-ACTION_HEIGHT: cw-var(--cw-Button-containerHeight);--_CW-BUTTONGROUP-ACTION_PRESSED_SHAPE: cw-var(--cw-Button-pressedShape);--_CW-BUTTONGROUP-ACTION_SQUARE_SHAPE: cw-var(--cw-Button-squareShape);--_CW-BUTTONGROUP-ICON_LABEL_SPACE: cw-var(--cw-Button-iconLabelSpace);--_CW-BUTTONGROUP-ICON_SIZE: cw-var(--cw-Button-iconSize);--_CW-BUTTONGROUP-PADDING: cw-var(--cw-Button-leadingSpace)}._cw-ButtonGroup-selection>.cw-SegmentedButton{--_CW-BUTTONGROUP-INNER: var(--_CW-BUTTONGROUP-INNER_SHAPE);--_CW-BUTTONGROUP-ROUND: calc(var(--_CW-BUTTONGROUP-ACTION_HEIGHT) / 2);--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ROUND);--cw-selection-segmented-container-color: cw-var(--cw-Color-surface-container)}._cw-ButtonGroup-selection>.cw-SegmentedButton.cw-SegmentedButton-selected{--cw-selection-segmented-container-color: cw-var(--cw-Color-primary-fill)}._cw-ButtonGroup-selection._cw-ButtonGroup-square>.cw-SegmentedButton{--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ACTION_SQUARE_SHAPE)}._cw-ButtonGroup-standard>.cw-SegmentedButton-selected{--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ACTION_SQUARE_SHAPE)}._cw-ButtonGroup-standard._cw-ButtonGroup-square>.cw-SegmentedButton-selected{--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ROUND)}._cw-ButtonGroup-connected._cw-ButtonGroup-selection>.cw-SegmentedButton-selected{--_CW-BUTTONGROUP-INNER: var(--_CW-BUTTONGROUP-ROUND);--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ROUND)}._cw-ButtonGroup-standard._cw-ButtonGroup-selection>.cw-SegmentedButton-press{--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ACTION_PRESSED_SHAPE)}._cw-ButtonGroup-connected._cw-ButtonGroup-selection>.cw-SegmentedButton-press{--_CW-BUTTONGROUP-INNER: var(--_CW-BUTTONGROUP-PRESSED_SHAPE)}.cw-ButtonGroup._cw-ButtonGroup-selection:is(._cw-ButtonGroup-standard,._cw-ButtonGroup-connected)>.cw-SegmentedButton{block-size:max(48px,var(--_CW-BUTTONGROUP-ACTION_HEIGHT));border-radius:var(--_CW-BUTTONGROUP-SHAPE);margin:0;transition-duration:cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration);transition-property:background-color,border-radius,color,padding-inline-end,padding-inline-start;transition-timing-function:cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing)}.cw-ButtonGroup._cw-ButtonGroup-selection._cw-ButtonGroup-connected>.cw-SegmentedButton{border-end-end-radius:var(--_CW-BUTTONGROUP-INNER);border-end-start-radius:var(--_CW-BUTTONGROUP-INNER);border-start-end-radius:var(--_CW-BUTTONGROUP-INNER);border-start-start-radius:var(--_CW-BUTTONGROUP-INNER)}.cw-ButtonGroup._cw-ButtonGroup-connected:not(._cw-ButtonGroup-vertical)>.cw-SegmentedButton-first{border-end-start-radius:var(--_CW-BUTTONGROUP-SHAPE);border-start-start-radius:var(--_CW-BUTTONGROUP-SHAPE)}.cw-ButtonGroup._cw-ButtonGroup-connected:not(._cw-ButtonGroup-vertical)>.cw-SegmentedButton-last{border-end-end-radius:var(--_CW-BUTTONGROUP-SHAPE);border-start-end-radius:var(--_CW-BUTTONGROUP-SHAPE)}.cw-ButtonGroup._cw-ButtonGroup-connected._cw-ButtonGroup-vertical>.cw-SegmentedButton-first{border-start-end-radius:var(--_CW-BUTTONGROUP-SHAPE);border-start-start-radius:var(--_CW-BUTTONGROUP-SHAPE)}.cw-ButtonGroup._cw-ButtonGroup-connected._cw-ButtonGroup-vertical>.cw-SegmentedButton-last{border-end-end-radius:var(--_CW-BUTTONGROUP-SHAPE);border-end-start-radius:var(--_CW-BUTTONGROUP-SHAPE)}._cw-ButtonGroup-selection>.cw-SegmentedButton ._cw-SegmentedButton-icon{block-size:var(--_CW-BUTTONGROUP-ICON_SIZE);flex-basis:var(--_CW-BUTTONGROUP-ICON_SIZE);inline-size:var(--_CW-BUTTONGROUP-ICON_SIZE);max-block-size:var(--_CW-BUTTONGROUP-ICON_SIZE);max-inline-size:var(--_CW-BUTTONGROUP-ICON_SIZE)}._cw-ButtonGroup-selection>.cw-SegmentedButton .cw-Icon{--cw-Icon-size: var(--_CW-BUTTONGROUP-ICON_SIZE)}._cw-ButtonGroup-md>.cw-SegmentedButton ._cw-SegmentedButton-label{-cw-typescale:--cw-Typescale-title-medium}._cw-ButtonGroup-lg>.cw-SegmentedButton ._cw-SegmentedButton-label{-cw-typescale:--cw-Typescale-headline-small}._cw-ButtonGroup-xl>.cw-SegmentedButton ._cw-SegmentedButton-label{-cw-typescale:--cw-Typescale-headline-large}.cw-SplitButton{--_CW-SPLITBUTTON-INNER_SHAPE: cw-var(--cw-SplitButton-innerShape);--_CW-SPLITBUTTON-INTERACTION_SHAPE: cw-var(--cw-SplitButton-interactionShape);--_CW-SPLITBUTTON-LEADING_END_PADDING: cw-var(--cw-SplitButton-leadingEndPadding);--_CW-SPLITBUTTON-LEADING_START_PADDING: cw-var(--cw-SplitButton-leadingStartPadding);--_CW-SPLITBUTTON-TRAILING_ICON_SIZE: cw-var(--cw-SplitButton-trailingIconSize);--_CW-SPLITBUTTON-TRAILING_PADDING: cw-var(--cw-SplitButton-trailingPadding);display:inline-flex;gap:cw-var(--cw-SplitButton-spacing);isolation:isolate}._cw-SplitButton-xs{@cw-apply-theme xs,cw-SplitButton;}._cw-SplitButton-sm{@cw-apply-theme sm,cw-SplitButton;}._cw-SplitButton-md{@cw-apply-theme md,cw-SplitButton;}._cw-SplitButton-lg{@cw-apply-theme lg,cw-SplitButton;}._cw-SplitButton-xl{@cw-apply-theme xl,cw-SplitButton;}:is(.cw-SplitButton-primary,.cw-SplitButton-secondary){display:inline-flex}.cw-SplitButton :is(.cw-Button,.cw-IconButton){--_CW-ACTION-INNER_SHAPE: var(--_CW-SPLITBUTTON-INNER_SHAPE);--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }.cw-SplitButton :is(.cw-Button,.cw-IconButton):is(.cw-Button-hover,.cw-IconButton-hover){--_CW-ACTION-INNER_SHAPE: var(--_CW-SPLITBUTTON-INTERACTION_SHAPE)}.cw-SplitButton-secondary :is(.cw-Button,.cw-IconButton):is(.cw-Button-checked,.cw-IconButton-checked,[aria-expanded=true]){--_CW-ACTION-CONTAINER_OVERLAY: linear-gradient( cw-scale-opacity(var(--_CW-ACTION-LABEL_COLOR), cw-var(--cw-State-layer-pressOpacity)), cw-scale-opacity(var(--_CW-ACTION-LABEL_COLOR), cw-var(--cw-State-layer-pressOpacity)) );--_CW-ACTION-INNER_SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }.cw-SplitButton :is(.cw-Button,.cw-IconButton):is(.cw-Button-press,.cw-IconButton-press){--_CW-ACTION-INNER_SHAPE: var(--_CW-SPLITBUTTON-INTERACTION_SHAPE)}.cw-SplitButton-primary :is(.cw-Button,.cw-IconButton){--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-INNER_SHAPE);padding-inline:var(--_CW-SPLITBUTTON-LEADING_START_PADDING) var(--_CW-SPLITBUTTON-LEADING_END_PADDING)}.cw-SplitButton-secondary :is(.cw-Button,.cw-IconButton){--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-SIZE_DURATION: var(--_CW-ACTION-SHAPE_DURATION);--_CW-ACTION-SIZE_EASING: var(--_CW-ACTION-SHAPE_EASING);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-BUTTON-ICON_SIZE: var(--_CW-SPLITBUTTON-TRAILING_ICON_SIZE);--_CW-ICONBUTTON-ICON_SIZE: var(--_CW-SPLITBUTTON-TRAILING_ICON_SIZE);--_CW-ICONBUTTON-SPACE: var(--_CW-SPLITBUTTON-TRAILING_PADDING);--_CW-SPLITBUTTON-OPTICAL_OFFSET: clamp( -1 * var(--_CW-SPLITBUTTON-TRAILING_PADDING), .11 * (var(--_CW-ACTION-INNER_SHAPE) - var(--_CW-ACTION-SHAPE)), var(--_CW-SPLITBUTTON-TRAILING_PADDING) );padding-inline:calc(var(--_CW-SPLITBUTTON-TRAILING_PADDING) + var(--_CW-SPLITBUTTON-OPTICAL_OFFSET)) calc(var(--_CW-SPLITBUTTON-TRAILING_PADDING) - var(--_CW-SPLITBUTTON-OPTICAL_OFFSET))}.cw-SplitButton-secondary :is(.cw-Button,.cw-IconButton):is(.cw-Button-checked,.cw-IconButton-checked,[aria-expanded=true]) .cw-Icon{rotate:180deg}}@layer cw-theme{.cw-ButtonGroup._cw-ButtonGroup-selection>.cw-SegmentedButton{--cw-SegmentedButton-containerHeight: var(--_CW-BUTTONGROUP-ACTION_HEIGHT);--cw-SegmentedButton-contentSpacing: var(--_CW-BUTTONGROUP-ICON_LABEL_SPACE);--cw-SegmentedButton-horizontalPadding: calc( var(--_CW-BUTTONGROUP-PADDING) + var(--_CW-BUTTONGROUP-DELTA, 0px) / 2 );--cw-SegmentedButton-outlineThickness: 0px;--cw-SegmentedButton-selectedContainerColor: cw-var(--cw-Color-primary-fill);--cw-SegmentedButton-selectedLabelTextColor: cw-var(--cw-Color-primary-onFill);--cw-SegmentedButton-unselectedLabelTextColor: cw-var(--cw-Color-surface-onFillVariant)}._cw-Button-elevated{@cw-apply-theme elevated,cw-Action;}._cw-Button-filled{@cw-apply-theme filled,cw-Action;}._cw-Button-filled-tonal{@cw-apply-theme filledTonal,cw-Action;}._cw-Button-outlined{@cw-apply-theme outlined,cw-Action;}._cw-Button-text{@cw-apply-theme text,cw-Action;}.cw-IconButton{@cw-apply-theme icon,cw-Action;}._cw-IconButton-filled{@cw-apply-theme filled,cw-Action;}._cw-IconButton-filled-tonal{@cw-apply-theme filledTonal,cw-Action;}._cw-IconButton-outlined{@cw-apply-theme outlined,cw-Action;}._cw-IconButton-standard{@cw-apply-theme standard,cw-Action;}.cw-FAB{@cw-apply-theme fab,cw-Action;}._cw-FAB-lowered{@cw-apply-theme fabLowered,cw-Action;}._cw-FAB-primary,._cw-FAB-primary-container{@cw-apply-theme fabPrimary,cw-Action;}._cw-FAB-secondary,._cw-FAB-secondary-container{@cw-apply-theme fabSecondary,cw-Action;}._cw-FAB-tertiary,._cw-FAB-tertiary-container{@cw-apply-theme fabTertiary,cw-Action;}._cw-FAB-surface{@cw-apply-theme fabSurface,cw-Action;}._cw-FAB-surface._cw-FAB-lowered{@cw-apply-theme fabSurfaceLowered,cw-Action;}._cw-FAB-primary-filled{@cw-apply-theme fabPrimaryFilled,cw-Action;}._cw-FAB-secondary-filled{@cw-apply-theme fabSecondaryFilled,cw-Action;}._cw-FAB-tertiary-filled{@cw-apply-theme fabTertiaryFilled,cw-Action;}}
|
|
1
|
+
@cw-attribute-roles cw-Action;@cw-attribute-roles cw-Button;@cw-attribute-roles cw-ButtonGroup;@cw-attribute-roles cw-SplitButton;@layer cw-style{:is(.cw-Button,.cw-IconButton,.cw-FAB){--cw-Action-container-shadowColor: cw-var(--cw-Action-container-shadowColor, default);--cw-Action-disabled-containerColor: cw-var(--cw-Action-disabled-containerColor, default);--cw-Action-disabled-contentColor: cw-var(--cw-Action-disabled-contentColor, default);--cw-Action-disabled-outlineColor: cw-var(--cw-Action-disabled-outlineColor, default);--cw-Action-icon-color: cw-var(--cw-Action-icon-color, default);--cw-Action-label-color: cw-var(--cw-Action-label-color, default);--cw-Action-selected-containerColor: cw-var(--cw-Action-selected-containerColor, default);--cw-Action-selected-contentColor: cw-var(--cw-Action-selected-contentColor, default);--cw-Action-unselected-containerColor: cw-var(--cw-Action-unselected-containerColor, default);--cw-Action-unselected-contentColor: cw-var(--cw-Action-unselected-contentColor, default);--_CW-ACTION-CONTAINER_COLOR: cw-var(--cw-Action-container-color);--_CW-ACTION-ELEVATION: cw-var(--cw-Action-container-elevation);--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-ICON_COLOR: cw-var(--cw-Action-icon-color);--_CW-ACTION-INNER_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-LABEL_COLOR: cw-var(--cw-Action-label-color);--_CW-ACTION-OUTLINE_COLOR: cw-var(--cw-Action-container-outlineColor);--_CW-ACTION-OUTLINE_WIDTH: 0px;--_CW-ACTION-SHADOW_COLOR: cw-var(--cw-Action-container-shadowColor);--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) ;--_CW-ACTION-SHAPE_DURATION: cw-var(--cw-Motion-spring-effect-default-duration);--_CW-ACTION-SHAPE_EASING: cw-var(--cw-Motion-spring-effect-default-easing);--_CW-ACTION-SIZE_DURATION: cw-var(--cw-Motion-spring-spatial-fast-duration);--_CW-ACTION-SIZE_EASING: cw-var(--cw-Motion-spring-spatial-fast-easing);--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-VISUAL_BLOCK_SIZE: cw-var(--cw-Button-containerHeight);--_CW-ACTION-VISUAL_BLOCK_START: calc((100% - var(--_CW-ACTION-VISUAL_BLOCK_SIZE)) / 2);--_CW-ACTION-VISUAL_INLINE_SIZE: 100%;--_CW-ACTION-VISUAL_INLINE_START: calc((100% - var(--_CW-ACTION-VISUAL_INLINE_SIZE)) / 2);--cw-interactable-focusIndicator-color: cw-var(--cw-Color-secondary-fill);--cw-interactable-focusIndicator-offset: cw-var(--cw-State-focusIndicator-outerOffset);--cw-interactable-focusIndicator-thickness: cw-var(--cw-State-focusIndicator-thickness);--cw-interactable-stateLayer-color: var(--_CW-ACTION-LABEL_COLOR);-webkit-tap-highlight-color:transparent;align-items:center;appearance:none;background-color:transparent;border:0;box-sizing:border-box;color:var(--_CW-ACTION-LABEL_COLOR);cursor:pointer;display:inline-flex;flex:none;font:inherit;isolation:isolate;justify-content:center;min-block-size:48px;min-inline-size:48px;outline:none;position:relative;text-decoration:none;transition-duration:cw-var(--cw-Motion-spring-effect-fast-duration),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION),var(--_CW-ACTION-SIZE_DURATION);transition-property:color,column-gap,inline-size,padding-block-end,padding-block-start,padding-inline-end,padding-inline-start;transition-timing-function:cw-var(--cw-Motion-spring-effect-fast-easing),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING),var(--_CW-ACTION-SIZE_EASING);user-select:none;vertical-align:middle;z-index:0}:is(.cw-Button,.cw-IconButton,.cw-FAB)[hidden]{display:none!important}:is(.cw-Button,.cw-IconButton,.cw-FAB)[aria-disabled=true]{cursor:default}:is(.cw-Button,.cw-IconButton,.cw-FAB):after{background-color:var(--_CW-ACTION-CONTAINER_COLOR);background-image:var(--_CW-ACTION-CONTAINER_OVERLAY, none);block-size:var(--_CW-ACTION-VISUAL_BLOCK_SIZE);border-color:var(--_CW-ACTION-OUTLINE_COLOR);border-end-end-radius:var(--_CW-ACTION-END_END_SHAPE);border-end-start-radius:var(--_CW-ACTION-END_START_SHAPE);border-start-end-radius:var(--_CW-ACTION-START_END_SHAPE);border-start-start-radius:var(--_CW-ACTION-START_START_SHAPE);border-style:solid;border-width:var(--_CW-ACTION-OUTLINE_WIDTH);box-shadow:0 calc((clamp(0,var(--_CW-ACTION-ELEVATION),1) + clamp(0,var(--_CW-ACTION-ELEVATION) - 3,1) + clamp(0,var(--_CW-ACTION-ELEVATION) - 4,1)*2)*1px) calc((clamp(0,var(--_CW-ACTION-ELEVATION),1)*2 + clamp(0,var(--_CW-ACTION-ELEVATION) - 2,1) + clamp(0,var(--_CW-ACTION-ELEVATION) - 4,1))*1px) cw-scale-opacity(var(--_CW-ACTION-SHADOW_COLOR),calc(clamp(0,var(--_CW-ACTION-ELEVATION),1)*.3)),0 calc((clamp(0,var(--_CW-ACTION-ELEVATION),2) + clamp(0,var(--_CW-ACTION-ELEVATION) - 2,3)*2)*1px) calc((clamp(0,var(--_CW-ACTION-ELEVATION),2)*3 + clamp(0,var(--_CW-ACTION-ELEVATION) - 2,3)*2)*1px) calc((clamp(0,var(--_CW-ACTION-ELEVATION),4) + clamp(0,var(--_CW-ACTION-ELEVATION) - 4,1)*2)*1px) cw-scale-opacity(var(--_CW-ACTION-SHADOW_COLOR),calc(clamp(0,var(--_CW-ACTION-ELEVATION),1)*.15));box-sizing:border-box;content:"";inline-size:var(--_CW-ACTION-VISUAL_INLINE_SIZE);inset-block-start:var(--_CW-ACTION-VISUAL_BLOCK_START);inset-inline-start:var(--_CW-ACTION-VISUAL_INLINE_START);pointer-events:none;position:absolute;transition-duration:cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-default-duration),var(--_CW-ACTION-SHAPE_DURATION),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-default-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration);transition-property:background-color,block-size,border-color,border-radius,border-width,box-shadow,inline-size,inset-block-start,inset-inline-start;transition-timing-function:cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-default-easing),var(--_CW-ACTION-SHAPE_EASING),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-default-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing);z-index:-2}:is(.cw-Button,.cw-IconButton,.cw-FAB):before,:is(.cw-Button,.cw-IconButton,.cw-FAB)._cw-interactable-stateLayer:before{block-size:var(--_CW-ACTION-VISUAL_BLOCK_SIZE);border-end-end-radius:var(--_CW-ACTION-END_END_SHAPE);border-end-start-radius:var(--_CW-ACTION-END_START_SHAPE);border-start-end-radius:var(--_CW-ACTION-START_END_SHAPE);border-start-start-radius:var(--_CW-ACTION-START_START_SHAPE);box-sizing:border-box;content:"";inline-size:var(--_CW-ACTION-VISUAL_INLINE_SIZE);inset-block-end:auto;inset-block-start:var(--_CW-ACTION-VISUAL_BLOCK_START);inset-inline-end:auto;inset-inline-start:var(--_CW-ACTION-VISUAL_INLINE_START);pointer-events:none;position:absolute;z-index:-1}.cw-interactable:is(.cw-Button,.cw-IconButton,.cw-FAB):before{transition-duration:cw-var(--cw-Motion-spring-spatial-fast-duration),var(--_CW-ACTION-SHAPE_DURATION),cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration);transition-property:block-size,border-radius,color,inline-size,inset-block-start,inset-inline-start,outline-offset,outline-width;transition-timing-function:cw-var(--cw-Motion-spring-spatial-fast-easing),var(--_CW-ACTION-SHAPE_EASING),cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing)}:is(.cw-Button,.cw-IconButton,.cw-FAB) .cw-Icon{--cw-Icon-color: var(--_CW-ACTION-ICON_COLOR);transition-duration:cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration);transition-property:--cw-Icon-size,color,rotate;transition-timing-function:cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing)}:is(.cw-Button-toggle,.cw-IconButton-toggle,.cw-FAB-toggle){--_CW-ACTION-CONTAINER_COLOR: cw-var(--cw-Action-unselected-containerColor);--_CW-ACTION-ICON_COLOR: cw-var(--cw-Action-unselected-contentColor);--_CW-ACTION-LABEL_COLOR: cw-var(--cw-Action-unselected-contentColor)}:is(._cw-Button-outlined,._cw-IconButton-outlined){--_CW-ACTION-OUTLINE_WIDTH: cw-var(--cw-Button-outlineWidth)}:is(.cw-Button-checked,.cw-IconButton-checked,.cw-FAB-checked),._cw-FABMenu-open>.cw-FABMenu-trigger .cw-FAB{--_CW-ACTION-CONTAINER_COLOR: cw-var(--cw-Action-selected-containerColor);--_CW-ACTION-ICON_COLOR: cw-var(--cw-Action-selected-contentColor);--_CW-ACTION-LABEL_COLOR: cw-var(--cw-Action-selected-contentColor);--_CW-ACTION-OUTLINE_WIDTH: 0px}.cw-Button.cw-Button-disabled,.cw-IconButton.cw-IconButton-disabled,.cw-FAB.cw-FAB-disabled{--_CW-ACTION-CONTAINER_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-containerColor), cw-var(--cw-Action-disabled-containerOpacity) );--_CW-ACTION-ELEVATION: 0;--_CW-ACTION-ICON_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-contentColor), cw-var(--cw-Action-disabled-contentOpacity) );--_CW-ACTION-LABEL_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-contentColor), cw-var(--cw-Action-disabled-contentOpacity) );--_CW-ACTION-OUTLINE_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-outlineColor), cw-var(--cw-Action-disabled-outlineOpacity) );cursor:default}@media (forced-colors: active){:is(._cw-Button-elevated,._cw-Button-filled,._cw-Button-filled-tonal,._cw-Button-outlined,._cw-IconButton-filled,._cw-IconButton-filled-tonal,._cw-IconButton-outlined,.cw-FAB),._cw-FABMenu-open>.cw-FABMenu-trigger .cw-FAB{--_CW-ACTION-OUTLINE_COLOR: ButtonText;--_CW-ACTION-OUTLINE_WIDTH: 1px}.cw-Button.cw-Button-disabled,.cw-IconButton.cw-IconButton-disabled,.cw-FAB.cw-FAB-disabled{--_CW-ACTION-OUTLINE_COLOR: GrayText}}:is(.cw-Button-disabled.cw-Button-checked,.cw-IconButton-disabled.cw-IconButton-checked,.cw-FAB-disabled.cw-FAB-checked){--_CW-ACTION-CONTAINER_COLOR: cw-scale-opacity( cw-var(--cw-Action-disabled-containerColor), cw-var(--cw-Action-disabled-selectedContainerOpacity) )}:is(.cw-Button-hover,.cw-IconButton-hover,.cw-FAB-hover){--_CW-ACTION-ELEVATION: cw-var(--cw-Action-hover-containerElevation);--cw-interactable-stateLayer-opacity: cw-var(--cw-State-layer-hoverOpacity)}:is(.cw-Button-focus,.cw-IconButton-focus,.cw-FAB-focus){--_CW-ACTION-ELEVATION: cw-var(--cw-Action-focus-containerElevation);--cw-interactable-stateLayer-opacity: cw-var(--cw-State-layer-focusOpacity)}:is(.cw-Button-press,.cw-IconButton-press,.cw-FAB-press){--_CW-ACTION-ELEVATION: cw-var(--cw-Action-press-containerElevation);--cw-interactable-ripple-color: var(--cw-interactable-stateLayer-color);--cw-interactable-ripple-opacity: cw-var(--cw-State-layer-pressOpacity)}.cw-Button{--_CW-BUTTON-ICON_SIZE: cw-var(--cw-Button-iconSize);block-size:max(48px,cw-var(--cw-Button-containerHeight));column-gap:cw-var(--cw-Button-iconLabelSpace);padding-block:0;padding-inline:calc(cw-var(--cw-Button-leadingSpace) + var(--_CW-BUTTONGROUP-DELTA, 0px) / 2) calc(cw-var(--cw-Button-trailingSpace) + var(--_CW-BUTTONGROUP-DELTA, 0px) / 2)}.cw-Button:any-link{letter-spacing:normal;text-indent:0;text-shadow:none;text-transform:none;word-spacing:normal}.cw-Button-disabled:any-link{pointer-events:none}._cw-Button-xs{@cw-apply-theme xs,cw-Button;}._cw-Button-sm{@cw-apply-theme sm,cw-Button;}._cw-Button-md{@cw-apply-theme md,cw-Button;}._cw-Button-lg{@cw-apply-theme lg,cw-Button;}._cw-Button-xl{@cw-apply-theme xl,cw-Button;}.cw-ActionButton-label{-cw-typescale:--cw-Typescale-label-large;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}._cw-Button-md>.cw-ActionButton-label{-cw-typescale:--cw-Typescale-title-medium}._cw-Button-lg>.cw-ActionButton-label{-cw-typescale:--cw-Typescale-headline-small}._cw-Button-xl>.cw-ActionButton-label{-cw-typescale:--cw-Typescale-headline-large}:is(.cw-ActionButton-leadingIcon,.cw-ActionButton-trailingIcon){align-items:center;color:var(--_CW-ACTION-ICON_COLOR);display:inline-flex;flex:none;font-size:var(--_CW-BUTTON-ICON_SIZE);justify-content:center;pointer-events:none}:is(.cw-ActionButton-label,.cw-ActionButton-leadingIcon,.cw-ActionButton-trailingIcon):empty{display:none}.cw-Button .cw-Icon{--cw-Icon-size: var(--_CW-BUTTON-ICON_SIZE)}._cw-Button-square,.cw-Button.cw-Button-checked{--_CW-ACTION-SHAPE: cw-var(--cw-Button-squareShape)}._cw-Button-square.cw-Button-checked{--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }.cw-Button.cw-Button-press{--_CW-ACTION-SHAPE: cw-var(--cw-Button-pressedShape)}.cw-Button-toggle{--_CW-ACTION-SHAPE_DURATION: cw-var(--cw-Motion-spring-spatial-fast-duration);--_CW-ACTION-SHAPE_EASING: cw-var(--cw-Motion-spring-spatial-fast-easing)}.cw-IconButton{--_CW-ACTION-VISUAL_INLINE_SIZE: calc( var(--_CW-ICONBUTTON-ICON_SIZE) + 2 * var(--_CW-ICONBUTTON-SPACE) + var(--_CW-BUTTONGROUP-DELTA, 0px) );--_CW-ICONBUTTON-ICON_SIZE: cw-var(--cw-Button-iconButton-iconSize);--_CW-ICONBUTTON-SPACE: cw-var(--cw-Button-iconButton-defaultSpace);block-size:max(48px,cw-var(--cw-Button-containerHeight));inline-size:max(48px,var(--_CW-ACTION-VISUAL_INLINE_SIZE));padding:0}._cw-IconButton-xs{@cw-apply-theme xs,cw-Button;}._cw-IconButton-sm{@cw-apply-theme sm,cw-Button;}._cw-IconButton-md{@cw-apply-theme md,cw-Button;}._cw-IconButton-lg{@cw-apply-theme lg,cw-Button;}._cw-IconButton-xl{@cw-apply-theme xl,cw-Button;}._cw-IconButton-narrow{--_CW-ICONBUTTON-SPACE: cw-var(--cw-Button-iconButton-narrowSpace)}._cw-IconButton-wide{--_CW-ICONBUTTON-SPACE: cw-var(--cw-Button-iconButton-wideSpace)}.cw-IconButton .cw-Icon{--cw-Icon-size: var(--_CW-ICONBUTTON-ICON_SIZE)}._cw-IconButton-square,.cw-IconButton.cw-IconButton-checked{--_CW-ACTION-SHAPE: cw-var(--cw-Button-squareShape)}._cw-IconButton-square.cw-IconButton-checked{--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }.cw-IconButton.cw-IconButton-press{--_CW-ACTION-SHAPE: cw-var(--cw-Button-pressedShape)}.cw-FAB{--_CW-ACTION-SHAPE: cw-var(--cw-Button-fab-containerShape);--_CW-ACTION-VISUAL_INLINE_SIZE: cw-var(--cw-Button-containerHeight);--_CW-FAB-FADE_DURATION: cw-var(--cw-Motion-spring-effect-fast-duration);--_CW-FAB-FADE_EASING: cw-var(--cw-Motion-spring-effect-fast-easing);--_CW-FAB-ICON_SIZE: cw-var(--cw-Button-iconSize);block-size:max(48px,cw-var(--cw-Button-containerHeight));column-gap:0;min-inline-size:max(48px,cw-var(--cw-Button-containerHeight));padding-block:0;padding-inline:calc((cw-var(--cw-Button-containerHeight) - var(--_CW-FAB-ICON_SIZE)) / 2)}.cw-FAB{@cw-apply-theme fab,cw-Button;}._cw-FAB-small{@cw-apply-theme fabSmall,cw-Button;}._cw-FAB-medium{@cw-apply-theme fabMedium,cw-Button;}._cw-FAB-large{@cw-apply-theme fabLarge,cw-Button;}._cw-FAB-small._cw-FAB-extended{@cw-apply-theme extendedFabSmall,cw-Button;}._cw-FAB-large._cw-FAB-extended{@cw-apply-theme extendedFabLarge,cw-Button;}._cw-FAB-extended{--_CW-ACTION-VISUAL_INLINE_SIZE: 100%}._cw-FAB-expanded{column-gap:cw-var(--cw-Button-iconLabelSpace);padding-inline:cw-var(--cw-Button-leadingSpace) cw-var(--cw-Button-trailingSpace)}._cw-FAB-expanded:has(>.cw-FAB-icon:empty){padding-inline-start:cw-var(--cw-Button-trailingSpace)}.cw-FAB-icon{align-items:center;color:var(--_CW-ACTION-ICON_COLOR);display:inline-flex;flex:none;font-size:var(--_CW-FAB-ICON_SIZE);justify-content:center;pointer-events:none}.cw-FAB .cw-Icon{--cw-Icon-size: var(--_CW-FAB-ICON_SIZE)}.cw-FAB-label{-cw-typescale:--cw-Typescale-label-large;display:grid;grid-template-columns:minmax(0,0fr);opacity:0;overflow:hidden;text-wrap:nowrap;transition-duration:var(--_CW-ACTION-SIZE_DURATION),var(--_CW-FAB-FADE_DURATION);transition-property:grid-template-columns,opacity;transition-timing-function:var(--_CW-ACTION-SIZE_EASING),var(--_CW-FAB-FADE_EASING)}.cw-FAB-icon:empty,.cw-FAB-label:empty{display:none}._cw-FAB-expanded>.cw-FAB-label{grid-template-columns:minmax(0,1fr);opacity:1}._cw-FAB-extended:not(._cw-FAB-small,._cw-FAB-medium,._cw-FAB-large){--_CW-ACTION-SIZE_DURATION: cw-var(--cw-Motion-spring-spatial-default-duration);--_CW-ACTION-SIZE_EASING: cw-var(--cw-Motion-spring-spatial-default-easing)}._cw-FAB-expanded:not(._cw-FAB-small,._cw-FAB-medium,._cw-FAB-large){--_CW-ACTION-SIZE_DURATION: cw-var(--cw-Motion-spring-spatial-fast-duration);--_CW-ACTION-SIZE_EASING: cw-var(--cw-Motion-spring-spatial-fast-easing);--_CW-FAB-FADE_DURATION: cw-var(--cw-Motion-spring-effect-default-duration);--_CW-FAB-FADE_EASING: cw-var(--cw-Motion-spring-effect-default-easing)}._cw-FAB-small>.cw-FAB-label{-cw-typescale:--cw-Typescale-title-medium}._cw-FAB-medium>.cw-FAB-label{-cw-typescale:--cw-Typescale-title-large}._cw-FAB-large>.cw-FAB-label{-cw-typescale:--cw-Typescale-headline-small}.cw-FAB.cw-FAB-checked,._cw-FABMenu-open>.cw-FABMenu-trigger .cw-FAB{--_CW-ACTION-SHAPE: calc(var(--_CW-FAB-CLOSE_SIZE) / 2);--_CW-ACTION-SHAPE_DURATION: cw-var(--cw-Motion-spring-spatial-fast-duration);--_CW-ACTION-SHAPE_EASING: cw-var(--cw-Motion-spring-spatial-fast-easing);--_CW-ACTION-VISUAL_BLOCK_SIZE: var(--_CW-FAB-CLOSE_SIZE);--_CW-ACTION-VISUAL_BLOCK_START: 0px;--_CW-ACTION-VISUAL_INLINE_SIZE: var(--_CW-FAB-CLOSE_SIZE);--_CW-ACTION-VISUAL_INLINE_START: calc(100% - var(--_CW-FAB-CLOSE_SIZE));--_CW-FAB-CLOSE_SIZE: cw-var(--cw-Button-closeButton-containerHeight);--_CW-FAB-ICON_SIZE: cw-var(--cw-Button-closeButton-iconSize);padding-block:calc((var(--_CW-FAB-CLOSE_SIZE) - var(--_CW-FAB-ICON_SIZE)) / 2) calc(cw-var(--cw-Button-containerHeight) - (var(--_CW-FAB-CLOSE_SIZE) + var(--_CW-FAB-ICON_SIZE)) / 2);padding-inline:calc(cw-var(--cw-Button-containerHeight) - (var(--_CW-FAB-CLOSE_SIZE) + var(--_CW-FAB-ICON_SIZE)) / 2) calc((var(--_CW-FAB-CLOSE_SIZE) - var(--_CW-FAB-ICON_SIZE)) / 2)}.cw-FABMenu{display:inline-flex;position:relative}.cw-FABMenu-trigger{display:inline-flex}.cw-FABMenu-items{align-items:end;display:flex;flex-direction:column;inline-size:max-content;inset-block-end:calc(100% + cw-var(--cw-Button-fabMenu-closeButtonSpacing));inset-inline-end:0;max-inline-size:calc(100vw - 32px);position:absolute;row-gap:cw-var(--cw-Button-fabMenu-itemSpacing)}.cw-FABMenu-items .cw-FAB{@cw-apply-theme fabMenuItem,cw-Button;}.cw-FABMenu-items .cw-FAB{--_CW-ACTION-VISUAL_BLOCK_SIZE: 100%;block-size:auto;min-block-size:max(48px,cw-var(--cw-Button-containerHeight))}.cw-FABMenu-items .cw-FAB>.cw-FAB-label{-cw-typescale:--cw-Typescale-title-medium;overflow-wrap:anywhere;text-wrap:wrap}.cw-FABMenu-items>*{clip-path:inset(-24px -24px -24px calc(100% + 24px) round 52px);opacity:0;transition-delay:calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0)),calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0)),calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0) + cw-var(--cw-Motion-spring-spatial-fast-duration));transition-duration:cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-fast-duration),0s;transition-property:clip-path,opacity,visibility;transition-timing-function:cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-fast-easing),linear;visibility:hidden}.cw-FABMenu-items:dir(rtl)>*{clip-path:inset(-24px calc(100% + 24px) -24px -24px round 52px)}._cw-FABMenu-open>.cw-FABMenu-items>*{clip-path:inset(-24px round 52px);opacity:1;transition-delay:calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0)),calc(cw-var(--cw-Motion-spring-effect-slow-duration) * var(--_CW-FABMENU-STAGGER, 0)),0s;visibility:visible}.cw-ButtonGroup{--_CW-BUTTONGROUP-INNER_SHAPE: cw-var(--cw-ButtonGroup-innerShape);--_CW-BUTTONGROUP-PRESSED_SHAPE: cw-var(--cw-ButtonGroup-pressedShape);align-items:center;display:inline-flex}._cw-ButtonGroup-xs{@cw-apply-theme xs,cw-ButtonGroup;@cw-apply-theme xs,cw-Button;}._cw-ButtonGroup-sm{@cw-apply-theme sm,cw-ButtonGroup;@cw-apply-theme sm,cw-Button;}._cw-ButtonGroup-md{@cw-apply-theme md,cw-ButtonGroup;@cw-apply-theme md,cw-Button;}._cw-ButtonGroup-lg{@cw-apply-theme lg,cw-ButtonGroup;@cw-apply-theme lg,cw-Button;}._cw-ButtonGroup-xl{@cw-apply-theme xl,cw-ButtonGroup;@cw-apply-theme xl,cw-Button;}.cw-ButtonGroup._cw-ButtonGroup-standard{gap:cw-var(--cw-ButtonGroup-spacing)}.cw-ButtonGroup._cw-ButtonGroup-connected{gap:cw-var(--cw-ButtonGroup-connectedSpacing)}._cw-ButtonGroup-vertical{align-items:stretch;flex-direction:column}._cw-ButtonGroup-overflow{display:flex;position:relative}._cw-ButtonGroup-overflow>._cw-ButtonGroup-overflowed{max-inline-size:100%;pointer-events:none;position:absolute;visibility:hidden}.cw-ButtonGroup._cw-ButtonGroup-connected>:is(.cw-Button,.cw-IconButton){--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-INNER_SHAPE: var(--_CW-BUTTONGROUP-INNER_SHAPE);--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) ;--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-INNER_SHAPE)}._cw-ButtonGroup-connected._cw-ButtonGroup-square>:is(.cw-Button,.cw-IconButton){--_CW-ACTION-SHAPE: cw-var(--cw-Button-squareShape)}._cw-ButtonGroup-connected>:is(.cw-Button,.cw-IconButton):is(.cw-Button-checked,.cw-IconButton-checked){--_CW-ACTION-INNER_SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) ;--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }._cw-ButtonGroup-connected>:is(.cw-Button,.cw-IconButton):is(.cw-Button-press,.cw-IconButton-press){--_CW-ACTION-INNER_SHAPE: var(--_CW-BUTTONGROUP-PRESSED_SHAPE)}._cw-ButtonGroup-connected:not(._cw-ButtonGroup-vertical)>:nth-child(1 of:is(.cw-Button,.cw-IconButton)){--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-SHAPE)}._cw-ButtonGroup-connected:not(._cw-ButtonGroup-vertical)>:nth-last-child(1 of:is(.cw-Button,.cw-IconButton)){--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-SHAPE)}._cw-ButtonGroup-connected._cw-ButtonGroup-vertical>:nth-child(1 of:is(.cw-Button,.cw-IconButton)){--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-SHAPE)}._cw-ButtonGroup-connected._cw-ButtonGroup-vertical>:nth-last-child(1 of:is(.cw-Button,.cw-IconButton)){--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-SHAPE);--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-SHAPE)}._cw-ButtonGroup-selection{--_CW-BUTTONGROUP-ACTION_HEIGHT: cw-var(--cw-Button-containerHeight);--_CW-BUTTONGROUP-ACTION_PRESSED_SHAPE: cw-var(--cw-Button-pressedShape);--_CW-BUTTONGROUP-ACTION_SQUARE_SHAPE: cw-var(--cw-Button-squareShape);--_CW-BUTTONGROUP-ICON_LABEL_SPACE: cw-var(--cw-Button-iconLabelSpace);--_CW-BUTTONGROUP-ICON_SIZE: cw-var(--cw-Button-iconSize);--_CW-BUTTONGROUP-PADDING: cw-var(--cw-Button-leadingSpace)}._cw-ButtonGroup-selection>.cw-SegmentedButton{--_CW-BUTTONGROUP-INNER: var(--_CW-BUTTONGROUP-INNER_SHAPE);--_CW-BUTTONGROUP-ROUND: calc(var(--_CW-BUTTONGROUP-ACTION_HEIGHT) / 2);--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ROUND);--cw-selection-segmented-container-color: cw-var(--cw-Color-surface-container)}._cw-ButtonGroup-selection>.cw-SegmentedButton.cw-SegmentedButton-selected{--cw-selection-segmented-container-color: cw-var(--cw-Color-primary-fill)}._cw-ButtonGroup-selection._cw-ButtonGroup-square>.cw-SegmentedButton{--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ACTION_SQUARE_SHAPE)}._cw-ButtonGroup-standard>.cw-SegmentedButton-selected{--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ACTION_SQUARE_SHAPE)}._cw-ButtonGroup-standard._cw-ButtonGroup-square>.cw-SegmentedButton-selected{--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ROUND)}._cw-ButtonGroup-connected._cw-ButtonGroup-selection>.cw-SegmentedButton-selected{--_CW-BUTTONGROUP-INNER: var(--_CW-BUTTONGROUP-ROUND);--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ROUND)}._cw-ButtonGroup-standard._cw-ButtonGroup-selection>.cw-SegmentedButton-press{--_CW-BUTTONGROUP-SHAPE: var(--_CW-BUTTONGROUP-ACTION_PRESSED_SHAPE)}._cw-ButtonGroup-connected._cw-ButtonGroup-selection>.cw-SegmentedButton-press{--_CW-BUTTONGROUP-INNER: var(--_CW-BUTTONGROUP-PRESSED_SHAPE)}.cw-ButtonGroup._cw-ButtonGroup-selection:is(._cw-ButtonGroup-standard,._cw-ButtonGroup-connected)>.cw-SegmentedButton{block-size:max(48px,var(--_CW-BUTTONGROUP-ACTION_HEIGHT));border-radius:var(--_CW-BUTTONGROUP-SHAPE);margin:0;transition-duration:cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-effect-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration),cw-var(--cw-Motion-spring-spatial-fast-duration);transition-property:background-color,border-radius,color,padding-inline-end,padding-inline-start;transition-timing-function:cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-effect-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing),cw-var(--cw-Motion-spring-spatial-fast-easing)}.cw-ButtonGroup._cw-ButtonGroup-selection._cw-ButtonGroup-connected>.cw-SegmentedButton{border-end-end-radius:var(--_CW-BUTTONGROUP-INNER);border-end-start-radius:var(--_CW-BUTTONGROUP-INNER);border-start-end-radius:var(--_CW-BUTTONGROUP-INNER);border-start-start-radius:var(--_CW-BUTTONGROUP-INNER)}.cw-ButtonGroup._cw-ButtonGroup-connected:not(._cw-ButtonGroup-vertical)>.cw-SegmentedButton-first{border-end-start-radius:var(--_CW-BUTTONGROUP-SHAPE);border-start-start-radius:var(--_CW-BUTTONGROUP-SHAPE)}.cw-ButtonGroup._cw-ButtonGroup-connected:not(._cw-ButtonGroup-vertical)>.cw-SegmentedButton-last{border-end-end-radius:var(--_CW-BUTTONGROUP-SHAPE);border-start-end-radius:var(--_CW-BUTTONGROUP-SHAPE)}.cw-ButtonGroup._cw-ButtonGroup-connected._cw-ButtonGroup-vertical>.cw-SegmentedButton-first{border-start-end-radius:var(--_CW-BUTTONGROUP-SHAPE);border-start-start-radius:var(--_CW-BUTTONGROUP-SHAPE)}.cw-ButtonGroup._cw-ButtonGroup-connected._cw-ButtonGroup-vertical>.cw-SegmentedButton-last{border-end-end-radius:var(--_CW-BUTTONGROUP-SHAPE);border-end-start-radius:var(--_CW-BUTTONGROUP-SHAPE)}._cw-ButtonGroup-selection>.cw-SegmentedButton ._cw-SegmentedButton-icon{block-size:var(--_CW-BUTTONGROUP-ICON_SIZE);flex-basis:var(--_CW-BUTTONGROUP-ICON_SIZE);inline-size:var(--_CW-BUTTONGROUP-ICON_SIZE);max-block-size:var(--_CW-BUTTONGROUP-ICON_SIZE);max-inline-size:var(--_CW-BUTTONGROUP-ICON_SIZE)}._cw-ButtonGroup-selection>.cw-SegmentedButton .cw-Icon{--cw-Icon-size: var(--_CW-BUTTONGROUP-ICON_SIZE)}._cw-ButtonGroup-md>.cw-SegmentedButton ._cw-SegmentedButton-label{-cw-typescale:--cw-Typescale-title-medium}._cw-ButtonGroup-lg>.cw-SegmentedButton ._cw-SegmentedButton-label{-cw-typescale:--cw-Typescale-headline-small}._cw-ButtonGroup-xl>.cw-SegmentedButton ._cw-SegmentedButton-label{-cw-typescale:--cw-Typescale-headline-large}.cw-SplitButton{--_CW-SPLITBUTTON-INNER_SHAPE: cw-var(--cw-SplitButton-innerShape);--_CW-SPLITBUTTON-INTERACTION_SHAPE: cw-var(--cw-SplitButton-interactionShape);--_CW-SPLITBUTTON-LEADING_END_PADDING: cw-var(--cw-SplitButton-leadingEndPadding);--_CW-SPLITBUTTON-LEADING_START_PADDING: cw-var(--cw-SplitButton-leadingStartPadding);--_CW-SPLITBUTTON-TRAILING_ICON_SIZE: cw-var(--cw-SplitButton-trailingIconSize);--_CW-SPLITBUTTON-TRAILING_PADDING: cw-var(--cw-SplitButton-trailingPadding);display:inline-flex;gap:cw-var(--cw-SplitButton-spacing);isolation:isolate}._cw-SplitButton-xs{@cw-apply-theme xs,cw-SplitButton;}._cw-SplitButton-sm{@cw-apply-theme sm,cw-SplitButton;}._cw-SplitButton-md{@cw-apply-theme md,cw-SplitButton;}._cw-SplitButton-lg{@cw-apply-theme lg,cw-SplitButton;}._cw-SplitButton-xl{@cw-apply-theme xl,cw-SplitButton;}:is(.cw-SplitButton-primary,.cw-SplitButton-secondary){display:inline-flex}.cw-SplitButton :is(.cw-Button,.cw-IconButton){--_CW-ACTION-INNER_SHAPE: var(--_CW-SPLITBUTTON-INNER_SHAPE);--_CW-ACTION-SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }.cw-SplitButton :is(.cw-Button,.cw-IconButton):is(.cw-Button-hover,.cw-IconButton-hover){--_CW-ACTION-INNER_SHAPE: var(--_CW-SPLITBUTTON-INTERACTION_SHAPE)}.cw-SplitButton-secondary :is(.cw-Button,.cw-IconButton):is(.cw-Button-checked,.cw-IconButton-checked,[aria-expanded=true]){--_CW-ACTION-CONTAINER_OVERLAY: linear-gradient( cw-scale-opacity(var(--_CW-ACTION-LABEL_COLOR), cw-var(--cw-State-layer-pressOpacity)), cw-scale-opacity(var(--_CW-ACTION-LABEL_COLOR), cw-var(--cw-State-layer-pressOpacity)) );--_CW-ACTION-INNER_SHAPE: calc(cw-var(--cw-Button-containerHeight)/2) }.cw-SplitButton :is(.cw-Button,.cw-IconButton):is(.cw-Button-press,.cw-IconButton-press){--_CW-ACTION-INNER_SHAPE: var(--_CW-SPLITBUTTON-INTERACTION_SHAPE)}.cw-SplitButton-primary :is(.cw-Button,.cw-IconButton){--_CW-ACTION-END_END_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-START_END_SHAPE: var(--_CW-ACTION-INNER_SHAPE);padding-inline:var(--_CW-SPLITBUTTON-LEADING_START_PADDING) var(--_CW-SPLITBUTTON-LEADING_END_PADDING)}.cw-SplitButton-secondary :is(.cw-Button,.cw-IconButton){--_CW-ACTION-END_START_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-ACTION-SIZE_DURATION: var(--_CW-ACTION-SHAPE_DURATION);--_CW-ACTION-SIZE_EASING: var(--_CW-ACTION-SHAPE_EASING);--_CW-ACTION-START_START_SHAPE: var(--_CW-ACTION-INNER_SHAPE);--_CW-BUTTON-ICON_SIZE: var(--_CW-SPLITBUTTON-TRAILING_ICON_SIZE);--_CW-ICONBUTTON-ICON_SIZE: var(--_CW-SPLITBUTTON-TRAILING_ICON_SIZE);--_CW-ICONBUTTON-SPACE: var(--_CW-SPLITBUTTON-TRAILING_PADDING);--_CW-SPLITBUTTON-OPTICAL_OFFSET: clamp( -1 * var(--_CW-SPLITBUTTON-TRAILING_PADDING), .11 * (var(--_CW-ACTION-INNER_SHAPE) - var(--_CW-ACTION-SHAPE)), var(--_CW-SPLITBUTTON-TRAILING_PADDING) );padding-inline:calc(var(--_CW-SPLITBUTTON-TRAILING_PADDING) + var(--_CW-SPLITBUTTON-OPTICAL_OFFSET)) calc(var(--_CW-SPLITBUTTON-TRAILING_PADDING) - var(--_CW-SPLITBUTTON-OPTICAL_OFFSET))}.cw-SplitButton-secondary :is(.cw-Button,.cw-IconButton):is(.cw-Button-checked,.cw-IconButton-checked,[aria-expanded=true]) .cw-Icon{rotate:180deg}}@layer cw-theme{.cw-ButtonGroup._cw-ButtonGroup-selection>.cw-SegmentedButton{--cw-SegmentedButton-containerHeight: var(--_CW-BUTTONGROUP-ACTION_HEIGHT);--cw-SegmentedButton-contentSpacing: var(--_CW-BUTTONGROUP-ICON_LABEL_SPACE);--cw-SegmentedButton-horizontalPadding: calc( var(--_CW-BUTTONGROUP-PADDING) + var(--_CW-BUTTONGROUP-DELTA, 0px) / 2 );--cw-SegmentedButton-outlineThickness: 0px;--cw-SegmentedButton-selectedContainerColor: cw-var(--cw-Color-primary-fill);--cw-SegmentedButton-selectedLabelTextColor: cw-var(--cw-Color-primary-onFill);--cw-SegmentedButton-unselectedLabelTextColor: cw-var(--cw-Color-surface-onFillVariant)}._cw-Button-elevated{@cw-apply-theme elevated,cw-Action;}._cw-Button-filled{@cw-apply-theme filled,cw-Action;}._cw-Button-filled-tonal{@cw-apply-theme filledTonal,cw-Action;}._cw-Button-outlined{@cw-apply-theme outlined,cw-Action;}._cw-Button-text{@cw-apply-theme text,cw-Action;}.cw-IconButton{@cw-apply-theme icon,cw-Action;}._cw-IconButton-filled{@cw-apply-theme filled,cw-Action;}._cw-IconButton-filled-tonal{@cw-apply-theme filledTonal,cw-Action;}._cw-IconButton-outlined{@cw-apply-theme outlined,cw-Action;}._cw-IconButton-standard{@cw-apply-theme standard,cw-Action;}.cw-FAB{@cw-apply-theme fab,cw-Action;}._cw-FAB-lowered{@cw-apply-theme fabLowered,cw-Action;}._cw-FAB-primary,._cw-FAB-primary-container{@cw-apply-theme fabPrimary,cw-Action;}._cw-FAB-secondary,._cw-FAB-secondary-container{@cw-apply-theme fabSecondary,cw-Action;}._cw-FAB-tertiary,._cw-FAB-tertiary-container{@cw-apply-theme fabTertiary,cw-Action;}._cw-FAB-surface{@cw-apply-theme fabSurface,cw-Action;}._cw-FAB-surface._cw-FAB-lowered{@cw-apply-theme fabSurfaceLowered,cw-Action;}._cw-FAB-primary-filled{@cw-apply-theme fabPrimaryFilled,cw-Action;}._cw-FAB-secondary-filled{@cw-apply-theme fabSecondaryFilled,cw-Action;}._cw-FAB-tertiary-filled{@cw-apply-theme fabTertiaryFilled,cw-Action;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as l,untrack as c}from"solid-js";import{isAnchorElement as d,preventDisabledLinkKey as u}from"../navigation/base";import{FocusState as a,HoverState as h,PressState as p}from"../state";import{InteractableController as g}from"../state/controller";import{deferAfterDelegatedCancellation as f}from"../util/event";import"./action.css";const x
|
|
1
|
+
import{createContext as l,untrack as c}from"solid-js";import{isAnchorElement as d,preventDisabledLinkKey as u}from"../navigation/base";import{FocusState as a,HoverState as h,PressState as p}from"../state";import{InteractableController as g}from"../state/controller";import{deferAfterDelegatedCancellation as f}from"../util/event";import"./action.css";const x=/* @__PURE__ */l();function P(s){return(s.nodeType===Node.DOCUMENT_NODE?s:s.ownerDocument)?.defaultView?.MutationObserver??MutationObserver;}const b=a|h|p,C=a;class T extends g{#s;#n;#r;#d;#o;#i;#e;constructor(e,t){const n="checked"in e,o="attr:aria-disabled"in e,i="attr:aria-pressed"in e;super(e,{baseInteractionCssClassName:t,styleElementIsFunction:!0}),this.#s=t,this.#n=n,this.#r=o,this.#d=i,this.#o=r=>{this.isDisabled()&&r.preventDefault();},this.#i=r=>u(r,super.functionElement),this.#e=!n&&c(()=>e.defaultChecked===!0)?4:0;}isDisabled(){return(this.#e&1)!==0;}isToggle(){return(this.#e&2)!==0;}isChecked(){return this.isToggle()&&(this.#n?super.readProp("checked",!0)[0]===!0:(this.#e&4)!==0);}actionClass(e){return`${this.#s}-${e}`;}#t(e,t){this.#e=t?this.#e|e:this.#e&~e;}#a(){this.#d||super.setAttribute("aria-pressed",this.isToggle()?this.isChecked():void 0),super.setClass(this.actionClass("checked"),this.isChecked());}applyComponentProps(){const e=super.readProps(["checked","disabled","href","readOnly","tabIndex","toggle","type"]),t=e.disabled===!0,n=e.href!==void 0,o=e.toggle===!0,i=o&&e.readOnly===!0;e.disabledChanged&&(this.#t(1,t),super.setClass(this.actionClass("disabled"),t)),(e.disabledChanged||e.hrefChanged)&&super.setAttribute("disabled",t&&!n),e.hrefChanged&&super.setAttribute("href",e.href),e.toggleChanged&&(this.#t(2,o),super.setClass(this.actionClass("toggle"),o)),(e.toggleChanged||e.readOnlyChanged)&&this.#t(8,i),!this.#r&&(e.disabledChanged||e.hrefChanged||e.readOnlyChanged||e.toggleChanged)&&super.setAttribute("aria-disabled",i||t&&n?"true":void 0),(e.toggleChanged||e.checkedChanged)&&this.#a(),(e.disabledChanged||e.toggleChanged||e.readOnlyChanged)&&super.setEnabledInteractionStates(t?0:i?C:b),(e.typeChanged||e.hrefChanged)&&super.setAttribute("type",n?void 0:e.type??"button"),(e.tabIndexChanged||e.disabledChanged)&&super.setAttribute("tabindex",t?-1:e.tabIndex);}onFunctionElementChanged(e){const t=super.functionElement;super.onFunctionElementChanged(e),d(t)&&(t.removeEventListener("click",this.#o),t.removeEventListener("keydown",this.#i)),d(e)&&(e.addEventListener("click",this.#o),e.addEventListener("keydown",this.#i));}onEvent(e){if(this.isDisabled()||(e.type==="click"&&this.isToggle()&&(this.#e&8)!==0&&e.preventDefault(),super.onEvent(e),e.type!=="click"||e.defaultPrevented||!this.isToggle()))return;const t=this.functionElement;f(e,t,()=>{if(this.isControllerDisposed||e.defaultPrevented||t===null||t!==this.functionElement||this.isDisabled()||t.matches(":disabled")||!this.isToggle()||(this.#e&8)!==0)return;const n=!this.isChecked();this.props.onChange?.(n,this,e),!(this.#n||this.isControllerDisposed||!this.isToggle())&&(this.#t(4,n),this.#a());},!1);}}export{T as ActionButtonController,x as ActionLayoutContext,P as mutationObserverOf};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createMemo as u,mergeProps as f,useContext as p}from"solid-js";import{defineInteractableComponent as A}from"../state";import{ActionButtonController as b,ActionLayoutContext as d}from"./base";const h={toggle:!0};function l(n){return`_cw-Button-${n??"filled"}
|
|
1
|
+
import{createMemo as u,mergeProps as f,useContext as p}from"solid-js";import{defineInteractableComponent as A}from"../state";import{ActionButtonController as b,ActionLayoutContext as d}from"./base";const h={toggle:!0};function l(n){return`_cw-Button-${n??"filled"}`;}function B(n,t){return`_cw-Button-${t?.size??n??"md"}`;}function g(n,t){return(t?.shape??n)==="square";}function I(n,t){const e=p(d),o=t.toggle===!0,a=o&&("checked"in t?t.checked===!0:t.defaultChecked===!0),s=t.disabled===!0,i=t.href!==void 0,r={"aria-disabled":o&&t.readOnly===!0||s&&i?"true":void 0,"aria-pressed":o?a?"true":"false":void 0},c={...n.classList,"cw-Button":!0,"cw-Button-checked":a,"cw-Button-disabled":s,"cw-Button-toggle":o,"_cw-Button-square":g(t.shape,e),[B(t.size,e)]:!0,[l(t.variant)]:!0};return i?<a{...r}{...n}classList={c}href={t.href}tabindex={s?-1:t.tabIndex}>
|
|
2
2
|
<span class="cw-ActionButton-leadingIcon">{t.leadingIcon}</span>
|
|
3
3
|
<span class="cw-ActionButton-label">{n.children}</span>
|
|
4
4
|
<span class="cw-ActionButton-trailingIcon">{t.trailingIcon}</span>
|
|
@@ -6,7 +6,7 @@ import{createMemo as u,mergeProps as f,useContext as p}from"solid-js";import{def
|
|
|
6
6
|
<span class="cw-ActionButton-leadingIcon">{t.leadingIcon}</span>
|
|
7
7
|
<span class="cw-ActionButton-label">{n.children}</span>
|
|
8
8
|
<span class="cw-ActionButton-trailingIcon">{t.trailingIcon}</span>
|
|
9
|
-
</button
|
|
9
|
+
</button>;}const m=/* @__PURE__ */A(()=>I,()=>class extends b{#t;#n;#e;constructor(n){const t=p(d);super(n,"cw-Button"),this.#t=t,this.#n=void 0,this.#e=void 0;}applyComponentProps(){super.applyComponentProps();const n=super.readProps(["shape","size","variant"]),t=B(n.size,this.#t),e=g(n.shape,this.#t);n.variantChanged&&super.setClass("variant",l(n.variant)),t!==this.#n&&(this.#n=t,super.setClass("size",t)),e!==this.#e&&(this.#e=e,super.setClass("_cw-Button-square",e));}render(n){const t=u(()=>this.props.href!==void 0),e=()=>this.props.leadingIcon,o=()=>this.props.trailingIcon;return u(()=>t()?<a class="cw-Button">
|
|
10
10
|
<span class="cw-ActionButton-leadingIcon">{e()}</span>
|
|
11
11
|
<span class="cw-ActionButton-label">{n}</span>
|
|
12
12
|
<span class="cw-ActionButton-trailingIcon">{o()}</span>
|
|
@@ -14,4 +14,4 @@ import{createMemo as u,mergeProps as f,useContext as p}from"solid-js";import{def
|
|
|
14
14
|
<span class="cw-ActionButton-leadingIcon">{e()}</span>
|
|
15
15
|
<span class="cw-ActionButton-label">{n}</span>
|
|
16
16
|
<span class="cw-ActionButton-trailingIcon">{o()}</span>
|
|
17
|
-
</button>)}}),E=m;function T(n){const t=f(n,h);return m(t)}export{E as Button,T as ToggleButton};
|
|
17
|
+
</button>);}}),E=m;function T(n){const t=f(n,h);return m(t);}export{E as Button,T as ToggleButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as e}from"solid-js";const n
|
|
1
|
+
import{createContext as e}from"solid-js";const n=/* @__PURE__ */e();export{n as FABMenuTriggerContext};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{createUniqueId as f,mergeProps as M,onMount as T,untrack as y}from"solid-js";import{defineDomComponent as v}from"..";import{deferAfterDelegatedCancellation as h}from"../util/event";import{mutationObserverOf as c}from"./base";import{FAB as g}from"./fab";import{FABMenuTriggerContext as E}from"./fab-menu-context";import"./action.css";const A="_cw-FABMenu-open",F="a[href], button, input, select, textarea, [role=button]",S=["aria-disabled","disabled","hidden","href","inert","role","tabindex"],B="a[href], button",w="a[href], button:not(:disabled)",C="--_CW-FABMENU-STAGGER",d=9.249,P=32,O={expanded:!0,extended:!0};function p(s){return typeof s=="object"&&s!==null&&typeof s.nodeType=="number"}function L(s){const e=[];let t=s.getRootNode();for(;t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t;)e.push(t),t=t.host.getRootNode();return e}function R(s,e,t){return t?Math.min(e-s,e-1)/e:s/e}function x(s){let e=0,t=d;for(let n=0;n<P;n++){const o=(e+t)/2;1-(1+o)*Math.exp(-o)<s?e=o:t=o}return e/d}function D(s){return s.tabIndex>=0&&!s.matches(":disabled")&&s.getAttribute("aria-disabled")!=="true"&&s.closest("[hidden], [inert]")===null}function _(s){const e=s.ownerDocument,t=e.activeElement,n=s.getRootNode(),o=n===e?t:n.activeElement;return t===null||t===e.body||o!==null&&s.contains(o)}class m{#t;#n;#s;#o;constructor(e){this.#t=e,this.#n=null,this.#s=null,this.#o=null}attach(e){this.restore(),this.#n=e,this.#s=e?.getAttribute(this.#t)??null,this.#o=this.#s}set(e){const t=this.#i();t===null||t.getAttribute(this.#t)===e||(t.setAttribute(this.#t,e),this.#o=e)}restore(){const e=this.#i();e!==null&&(this.#s===null?e.removeAttribute(this.#t):e.setAttribute(this.#t,this.#s)),this.#n=null}#i(){return this.#n!==null&&this.#n.getAttribute(this.#t)!==this.#o&&(this.#n=null),this.#n}}function I(s,e){const t="open"in e?e.open===!0:e.defaultOpen===!0,n=f(),o={itemsId:n,open:t};return<div{...s}classList={{...s.classList,"cw-FABMenu":!0,[A]:t}}>
|
|
1
|
+
import{createUniqueId as f,mergeProps as M,onMount as T,untrack as y}from"solid-js";import{defineDomComponent as v}from"..";import{deferAfterDelegatedCancellation as h}from"../util/event";import{mutationObserverOf as c}from"./base";import{FAB as g}from"./fab";import{FABMenuTriggerContext as E}from"./fab-menu-context";import"./action.css";const A="_cw-FABMenu-open",F="a[href], button, input, select, textarea, [role=button]",S=["aria-disabled","disabled","hidden","href","inert","role","tabindex"],B="a[href], button",w="a[href], button:not(:disabled)",C="--_CW-FABMENU-STAGGER",d=9.249,P=32,O={expanded:!0,extended:!0};function p(s){return typeof s=="object"&&s!==null&&typeof s.nodeType=="number";}function L(s){const e=[];let t=s.getRootNode();for(;t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t;)e.push(t),t=t.host.getRootNode();return e;}function R(s,e,t){return t?Math.min(e-s,e-1)/e:s/e;}function x(s){let e=0,t=d;for(let n=0;n<P;n++){const o=(e+t)/2;1-(1+o)*Math.exp(-o)<s?e=o:t=o;}return e/d;}function D(s){return s.tabIndex>=0&&!s.matches(":disabled")&&s.getAttribute("aria-disabled")!=="true"&&s.closest("[hidden], [inert]")===null;}function _(s){const e=s.ownerDocument,t=e.activeElement,n=s.getRootNode(),o=n===e?t:n.activeElement;return t===null||t===e.body||o!==null&&s.contains(o);}class m{#t;#n;#s;#o;constructor(e){this.#t=e,this.#n=null,this.#s=null,this.#o=null;}attach(e){this.restore(),this.#n=e,this.#s=e?.getAttribute(this.#t)??null,this.#o=this.#s;}set(e){const t=this.#i();t===null||t.getAttribute(this.#t)===e||(t.setAttribute(this.#t,e),this.#o=e);}restore(){const e=this.#i();e!==null&&(this.#s===null?e.removeAttribute(this.#t):e.setAttribute(this.#t,this.#s)),this.#n=null;}#i(){return this.#n!==null&&this.#n.getAttribute(this.#t)!==this.#o&&(this.#n=null),this.#n;}}function I(s,e){const t="open"in e?e.open===!0:e.defaultOpen===!0,n=f(),o={itemsId:n,open:t};return<div{...s}classList={{...s.classList,"cw-FABMenu":!0,[A]:t}}>
|
|
2
2
|
<span class="cw-FABMenu-trigger">
|
|
3
3
|
<E.Provider value={o}>
|
|
4
4
|
{e.trigger(o)}
|
|
5
5
|
</E.Provider>
|
|
6
6
|
</span>
|
|
7
7
|
<span class="cw-FABMenu-items"id={n}inert={!t}>{s.children}</span>
|
|
8
|
-
</div
|
|
8
|
+
</div>;}const U=/* @__PURE__ */v(()=>I,s=>class extends s{#t;#n;#s;#o;#i;#e;#r;#m;#g;#a;#l;#h;#u;#c;#E;constructor(e){const t="open"in e;super(e,{styleElementIsFunction:!0}),this.#t=t,this.#n=f(),this.#s=new m("aria-controls"),this.#o=new m("aria-expanded"),this.#i=/* @__PURE__ */new WeakSet(),this.#e=y(()=>(t?e.open:e.defaultOpen)===!0),this.#r=!1,this.#m=null,this.#g=null,this.#a=null,this.#l=null,this.#h=null,this.#u=null,this.#c=null,this.#E=0;}applyComponentProps(){const e=super.readProps(["open"]);e.openChanged&&this.#b(this.#t?e.open===!0:this.#e);}render(e){const t=this.#n,n=()=>this.props,o=()=>this.#e,r={itemsId:t,get open(){return o();}};let i,a;const l=<div class="cw-FABMenu">
|
|
9
9
|
<span class="cw-FABMenu-trigger"ref={i}>
|
|
10
10
|
<E.Provider value={r}>
|
|
11
11
|
{n().trigger(r)}
|
|
12
12
|
</E.Provider>
|
|
13
13
|
</span>
|
|
14
14
|
<span class="cw-FABMenu-items"id={t}ref={a}>{e}</span>
|
|
15
|
-
</div>,u=c(i);return this.#m=l,this.#g=i,this.#a=a,l.addEventListener("click",this.#M),l.addEventListener("keydown",this.#T),this.#h=new u(()=>this.#A()),this.#h.observe(i,{attributeFilter:S,attributes:!0,childList:!0,subtree:!0}),this.#A(),T(()=>this.#p(this.#e)),l}onControllerCleanup(){this.#p(!1),this.#r=!0,this.#h?.disconnect(),this.#h=null,this.#s.restore(),this.#o.restore(),this.#m?.removeEventListener("click",this.#M),this.#m?.removeEventListener("keydown",this.#T),super.onControllerCleanup()}#A(){const e=this.#g;if(this.#r||e===null)return;const t=Array.from(e.querySelectorAll(F)).filter(D),n=t.length===1?t[0]:null;n!==this.#l&&(this.#l=n,this.#s.attach(n),this.#o.attach(n),this.#s.set(this.#n),this.#o.set(String(this.#e)))}#b(e){const t=this.#e&&!e;this.#e=e,this.#y(),t?this.#v():this.#c=null}#y(){const e=this.#e,t=this.#a;if(super.setClass(A,e),t!==null){const n=Array.from(t.children);t.inert=!e,n.forEach((o,r)=>{const i=R(r,n.length,e);"style"in o&&o.style.setProperty(C,String(x(i)))})}this.#o.set(String(e)),this.#p(e)}#d(e,t){e!==this.#e&&(this.#c=e?null:t,this.#t||this.#b(e),this.props.onOpenChange?.(e))}#v(){const e=this.#c,t=this.#l,n=this.styleElement,o=++this.#E;this.#c=null,!(e==="outside"||t===null||n===null)&&queueMicrotask(()=>{this.#r||this.#e||o!==this.#E||t!==this.#l||!t.isConnected||!_(n)||t.focus()})}#p(e){const t=this.styleElement,n=this.#u,o=e&&!this.#r&&t!==null&&t.isConnected,r=o?t.ownerDocument:null,i=o?L(t):[];if(n!==null&&n.document===r&&n.roots.length===i.length&&n.roots.every((u,b)=>u===i[b]))return;if(n!==null){n.document.removeEventListener("pointerdown",this.#f,!0);for(const u of n.roots)u.removeEventListener("pointerdown",this.#f,!0);n.observer.disconnect(),this.#u=null}if(r===null)return;const a=c(r),l=new a(()=>{this.styleElement?.ownerDocument!==r&&this.#p(this.#e)});r.addEventListener("pointerdown",this.#f,!0);for(const u of i)u.addEventListener("pointerdown",this.#f,!0);l.observe(r,{childList:!0,subtree:!0}),this.#u={document:r,observer:l,roots:i}}#M=e=>{const t=e.target;e.defaultPrevented||!p(t)||(this.#A(),h(e,this.styleElement,()=>{this.#r||(this.#l?.contains(t)===!0?this.#d(!this.#e,"trigger"):this.#e&&this.#a?.contains(t)===!0&&t.nodeType===Node.ELEMENT_NODE&&t.closest(B)!==null&&this.#d(!1,"item"))},!1))};#T=e=>{const t=this.#l;e.defaultPrevented||(e.key==="ArrowDown"&&t!==null&&p(e.target)&&t.contains(e.target)?h(e,this.styleElement,()=>{this.#r||(this.#d(!0,"trigger"),queueMicrotask(()=>{this.#e&&!this.#r&&this.#a?.querySelector(w)?.focus()}))}):e.key==="Escape"&&this.#e&&h(e,this.styleElement,()=>{this.#r||this.#d(!1,"escape")}))};#f=e=>{const t=this.styleElement;this.#p(this.#e);const n=this.#u,o=e.composedPath();if(t===null||n===null)return;if(o.includes(t)){this.#i.add(e);return}const r=n.roots.some(i=>o.includes(i.host)&&!o.includes(i));r||this.#i.add(e),h(e,t,()=>{r&&this.#i.has(e)||!this.#r&&this.#e&&this.#u===n&&this.#d(!1,"outside")},!1)}});function V(s){const e=M(s,O);return g(e)}const W=g;export{U as FABMenu,V as FABMenuItem,W as FABMenuTrigger};
|
|
15
|
+
</div>,u=c(i);return this.#m=l,this.#g=i,this.#a=a,l.addEventListener("click",this.#M),l.addEventListener("keydown",this.#T),this.#h=new u(()=>this.#A()),this.#h.observe(i,{attributeFilter:S,attributes:!0,childList:!0,subtree:!0}),this.#A(),T(()=>this.#p(this.#e)),l;}onControllerCleanup(){this.#p(!1),this.#r=!0,this.#h?.disconnect(),this.#h=null,this.#s.restore(),this.#o.restore(),this.#m?.removeEventListener("click",this.#M),this.#m?.removeEventListener("keydown",this.#T),super.onControllerCleanup();}#A(){const e=this.#g;if(this.#r||e===null)return;const t=Array.from(e.querySelectorAll(F)).filter(D),n=t.length===1?t[0]:null;n!==this.#l&&(this.#l=n,this.#s.attach(n),this.#o.attach(n),this.#s.set(this.#n),this.#o.set(String(this.#e)));}#b(e){const t=this.#e&&!e;this.#e=e,this.#y(),t?this.#v():this.#c=null;}#y(){const e=this.#e,t=this.#a;if(super.setClass(A,e),t!==null){const n=Array.from(t.children);t.inert=!e,n.forEach((o,r)=>{const i=R(r,n.length,e);"style"in o&&o.style.setProperty(C,String(x(i)));});}this.#o.set(String(e)),this.#p(e);}#d(e,t){e!==this.#e&&(this.#c=e?null:t,this.#t||this.#b(e),this.props.onOpenChange?.(e));}#v(){const e=this.#c,t=this.#l,n=this.styleElement,o=++this.#E;this.#c=null,!(e==="outside"||t===null||n===null)&&queueMicrotask(()=>{this.#r||this.#e||o!==this.#E||t!==this.#l||!t.isConnected||!_(n)||t.focus();});}#p(e){const t=this.styleElement,n=this.#u,o=e&&!this.#r&&t!==null&&t.isConnected,r=o?t.ownerDocument:null,i=o?L(t):[];if(n!==null&&n.document===r&&n.roots.length===i.length&&n.roots.every((u,b)=>u===i[b]))return;if(n!==null){n.document.removeEventListener("pointerdown",this.#f,!0);for(const u of n.roots)u.removeEventListener("pointerdown",this.#f,!0);n.observer.disconnect(),this.#u=null;}if(r===null)return;const a=c(r),l=new a(()=>{this.styleElement?.ownerDocument!==r&&this.#p(this.#e);});r.addEventListener("pointerdown",this.#f,!0);for(const u of i)u.addEventListener("pointerdown",this.#f,!0);l.observe(r,{childList:!0,subtree:!0}),this.#u={document:r,observer:l,roots:i};}#M=e=>{const t=e.target;e.defaultPrevented||!p(t)||(this.#A(),h(e,this.styleElement,()=>{this.#r||(this.#l?.contains(t)===!0?this.#d(!this.#e,"trigger"):this.#e&&this.#a?.contains(t)===!0&&t.nodeType===Node.ELEMENT_NODE&&t.closest(B)!==null&&this.#d(!1,"item"));},!1));};#T=e=>{const t=this.#l;e.defaultPrevented||(e.key==="ArrowDown"&&t!==null&&p(e.target)&&t.contains(e.target)?h(e,this.styleElement,()=>{this.#r||(this.#d(!0,"trigger"),queueMicrotask(()=>{this.#e&&!this.#r&&this.#a?.querySelector(w)?.focus();}));}):e.key==="Escape"&&this.#e&&h(e,this.styleElement,()=>{this.#r||this.#d(!1,"escape");}));};#f=e=>{const t=this.styleElement;this.#p(this.#e);const n=this.#u,o=e.composedPath();if(t===null||n===null)return;if(o.includes(t)){this.#i.add(e);return;}const r=n.roots.some(i=>o.includes(i.host)&&!o.includes(i));r||this.#i.add(e),h(e,t,()=>{r&&this.#i.has(e)||!this.#r&&this.#e&&this.#u===n&&this.#d(!1,"outside");},!1);};});function V(s){const e=M(s,O);return g(e);}const W=g;export{U as FABMenu,V as FABMenuItem,W as FABMenuTrigger};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{useContext as c}from"solid-js";import{defineInteractableComponent as u}from"../state";import{ActionButtonController as l}from"./base";import{FABMenuTriggerContext as f}from"./fab-menu-context";function o(e){return`_cw-FAB-${e??"primary"}
|
|
1
|
+
import{useContext as c}from"solid-js";import{defineInteractableComponent as u}from"../state";import{ActionButtonController as l}from"./base";import{FABMenuTriggerContext as f}from"./fab-menu-context";function o(e){return`_cw-FAB-${e??"primary"}`;}function p(e){return e===void 0?void 0:`_cw-FAB-${e}`;}function B(e,n){const r=c(f),a=p(n.size),t=n.toggle===!0,s=t&&("checked"in n?n.checked===!0:n.defaultChecked===!0),d=n.disabled===!0,i=n.extended===!0;return<button aria-controls={r?.itemsId}aria-disabled={t&&n.readOnly===!0?"true":void 0}aria-expanded={r===void 0?void 0:r.open?"true":"false"}aria-pressed={t?s?"true":"false":void 0}{...e}classList={{...e.classList,"cw-FAB":!0,"cw-FAB-checked":s,"cw-FAB-disabled":d,"cw-FAB-toggle":t,"_cw-FAB-expanded":i&&n.expanded!==!1,"_cw-FAB-extended":i,"_cw-FAB-lowered":n.lowered===!0,...(a===void 0?{}:{[a]:!0}),[o(n.variant)]:!0}}disabled={d}tabindex={d?-1:n.tabIndex}type={n.type??"button"}>
|
|
2
2
|
<span class="cw-FAB-icon">{n.leadingIcon}</span>
|
|
3
3
|
<span class="cw-FAB-label">{e.children}</span>
|
|
4
|
-
</button
|
|
4
|
+
</button>;}const w=/* @__PURE__ */u(()=>B,()=>class extends l{constructor(e){super(e,"cw-FAB");}applyComponentProps(){super.applyComponentProps();const e=super.readProps(["expanded","extended","lowered","size","variant"]);e.variantChanged&&super.setClass("variant",o(e.variant)),e.sizeChanged&&super.setClass("size",p(e.size)),e.extendedChanged&&super.setClass("_cw-FAB-extended",e.extended===!0),(e.extendedChanged||e.expandedChanged)&&super.setClass("_cw-FAB-expanded",e.extended===!0&&e.expanded!==!1),e.loweredChanged&&super.setClass("_cw-FAB-lowered",e.lowered===!0);}render(e){return<button class="cw-FAB"type="button">
|
|
5
5
|
<span class="cw-FAB-icon">{this.props.leadingIcon}</span>
|
|
6
6
|
<span class="cw-FAB-label">{e}</span>
|
|
7
|
-
</button
|
|
7
|
+
</button>;}});export{w as FAB};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{createSignal as k,Index as A,onCleanup as z,onMount as R,Show as B}from"solid-js";import{defineDomComponent as V}from"..";import{PlainTooltip as N}from"../feedback/tooltip";import{Icon as H}from"../icon";import{SegmentedButtonGroup as X}from"../selection/segmented";import{Menu as F,MenuCheckboxItem as J,MenuItem as $}from"../surface/menu";import{ActionLayoutContext as I,mutationObserverOf as U}from"./base";import{Button as W,ToggleButton as Y}from"./button";import{IconButton as Z}from"./icon-button";import"./action.css";const P="sm",O="More options",K
|
|
1
|
+
import{createSignal as k,Index as A,onCleanup as z,onMount as R,Show as B}from"solid-js";import{defineDomComponent as V}from"..";import{PlainTooltip as N}from"../feedback/tooltip";import{Icon as H}from"../icon";import{SegmentedButtonGroup as X}from"../selection/segmented";import{Menu as F,MenuCheckboxItem as J,MenuItem as $}from"../surface/menu";import{ActionLayoutContext as I,mutationObserverOf as U}from"./base";import{Button as W,ToggleButton as Y}from"./button";import{IconButton as Z}from"./icon-button";import"./action.css";const P="sm",O="More options",K=0.15,Q=24,y="--_CW-BUTTONGROUP-DELTA",ee=["cw-Button-press","cw-IconButton-press","cw-SegmentedButton-press"],te=":is(.cw-Button, .cw-IconButton, .cw-SegmentedButton):not(._cw-ButtonGroup-overflowed)",x="_cw-ButtonGroup-overflow",E="_cw-ButtonGroup-overflowed",M="_cw-ButtonGroup-overflowIndicator";function L(e){return`_cw-ButtonGroup-${e??P}`;}function S(e){return`_cw-ButtonGroup-${e??"standard"}`;}function G(e){return`_cw-ButtonGroup-${e??"horizontal"}`;}function _(e){return{get size(){return e.size??P;},get shape(){return e.shape??"round";}};}function ne(e){return ee.some(t=>e.classList.contains(t));}function f(e){return e.icon===void 0?void 0:<H name={e.icon}/>;}function Be(e){return<B when={e.action.checked!==void 0}fallback={<W classList={{[E]:e.overflowed}}disabled={e.action.disabled}leadingIcon={f(e.action)}onClick={()=>e.action.onClick?.()}>{e.action.label}</W>}>
|
|
2
2
|
<Y checked={e.action.checked}classList={{[E]:e.overflowed}}disabled={e.action.disabled}leadingIcon={f(e.action)}onChange={t=>e.action.onCheckedChange?.(t)}>{e.action.label}</Y>
|
|
3
|
-
</B
|
|
3
|
+
</B>;}function Se(e){return<B when={e.action.checked!==void 0}fallback={<$ attr:hidden={e.shown}disabled={e.action.disabled}leading={f(e.action)}onSelect={()=>e.action.onClick?.()}>{e.action.label}</$>}>
|
|
4
4
|
<J attr:hidden={e.shown}checked={e.action.checked}closeOnSelect disabled={e.action.disabled}leading={f(e.action)}onCheckedChange={t=>e.action.onCheckedChange?.(t)}>{e.action.label}</J>
|
|
5
|
-
</B
|
|
5
|
+
</B>;}function D(e){return<>
|
|
6
6
|
<A each={e.actions}>{(t,n)=><Be action={t()}overflowed={n>=e.shown}/>}</A>
|
|
7
7
|
<B when={e.overflows&&e.actions.length!==0}>
|
|
8
8
|
<F classList={{[M]:!0,[E]:e.shown>=e.actions.length}}label={e.label}placement="bottom-end"trigger={t=><N content={e.label}disabled={t.open()}trigger={n=><Z attr:aria-controls={t.attrs["aria-controls"]}attr:aria-describedby={n["aria-describedby"]}attr:aria-expanded={t.attrs["aria-expanded"]}attr:aria-haspopup={t.attrs["aria-haspopup"]}attr:aria-label={e.label}name="more_vert"tabIndex={n.tabIndex}variant="filled"/>}/>}>
|
|
9
9
|
<A each={e.actions}>{(t,n)=><Se action={t()}shown={n<e.shown}/>}</A>
|
|
10
10
|
</F>
|
|
11
11
|
</B>
|
|
12
|
-
|
|
12
|
+
</>;}class T{#o;#t;#n;#e;constructor(t){const n=U(t);this.#o=t,this.#n=null,this.#e=[],this.#t=new n(()=>this.#a()),this.#t.observe(t,{attributeFilter:["class"],attributes:!0,subtree:!0});}dispose(){this.#t.disconnect(),this.#i();}#i(){for(const t of this.#e)t.style.removeProperty(y);this.#e=[],this.#n=null;}#a(){const t=this.#o,n=t.classList.contains(S("standard"))&&!t.classList.contains(G("vertical")),o=Array.from(n?t.children:[]).filter(h=>h.matches(te)),i=o.find(ne)??null;if(i===this.#n||(this.#i(),i===null))return;const u=o.indexOf(i),a=o[u-1],r=o[u+1],c=(a===void 0?0:1)+(r===void 0?0:1),C=Math.round(Math.min(K*i.getBoundingClientRect().width/Math.max(c,1),Q)),d=Math.min(C,a?.getBoundingClientRect().width??0),l=Math.min(C,r?.getBoundingClientRect().width??0);this.#n=i,this.#r(i,d+l),a!==void 0&&this.#r(a,-d),r!==void 0&&this.#r(r,-l);}#r(t,n){n===0||!("style"in t)||(t.style.setProperty(y,`${n}px`),this.#e.push(t));}}class Ge{#o;#t;#n;#e;constructor(t,n){const o=t.ownerDocument.defaultView?.ResizeObserver??ResizeObserver;this.#o=t,this.#t=n,this.#e=!1,this.#n=new o(()=>this.fit()),this.#n.observe(t),t.ownerDocument.fonts?.ready.then(()=>{this.#e||this.fit();});}dispose(){this.#e=!0,this.#n.disconnect();}fit(){const t=this.#o,n=t.ownerDocument.defaultView;if(this.#e||n===null)return;const o=Array.from(t.querySelectorAll(":scope > .cw-Button")),i=t.querySelector(`:scope > .${M}`);if(i===null){this.#t(o.length);return;}const u=Math.round(Number.parseFloat(n.getComputedStyle(t).columnGap)),a=Number.isNaN(u)?0:u,r=o.map(s=>{const m=Number.parseFloat(s.style.getPropertyValue(y));return Math.ceil(s.getBoundingClientRect().width-(Number.isNaN(m)?0:m));}),c=Math.floor(t.getBoundingClientRect().width);if(r.reduce((s,m)=>s+m,0)+a*Math.max(r.length-1,0)<=c){this.#t(r.length);return;}const d=c-Math.ceil(i.getBoundingClientRect().width);let l=0,h=0;for(const s of r){if(l+=s+a,l>d)break;h++;}this.#t(h);}}function Ce(e,t){const n="actions"in t;return<div role="group"{...e}classList={{...e.classList,"cw-ButtonGroup":!0,"_cw-ButtonGroup-square":t.shape==="square",[x]:n,[G(t.orientation)]:!0,[L(t.size)]:!0,[S(t.variant)]:!0}}>
|
|
13
13
|
<I.Provider value={_(t)}>
|
|
14
14
|
{n?<D actions={t.actions??[]}label={t.overflowLabel??O}overflows={t.orientation!=="vertical"}shown={Number.POSITIVE_INFINITY}/>:e.children}
|
|
15
15
|
</I.Provider>
|
|
16
|
-
</div
|
|
16
|
+
</div>;}const Ee=/* @__PURE__ */V(()=>Ce,e=>class extends e{#o;#t;#n;#e;#i;constructor(t){const n="actions"in t,[o,i]=k(Number.POSITIVE_INFINITY);super(t,{styleElementIsFunction:!0}),this.#o=n,this.#t=o,this.#n=i,this.#e=null,this.#i=null;}applyComponentProps(){const t=super.readProps(["actions","orientation","shape","size","variant"]);t.orientationChanged&&super.setClass("orientation",G(t.orientation)),t.shapeChanged&&super.setClass("_cw-ButtonGroup-square",t.shape==="square"),t.sizeChanged&&super.setClass("size",L(t.size)),t.variantChanged&&super.setClass("variant",S(t.variant)),(t.actionsChanged||t.orientationChanged||t.sizeChanged)&&(super.setClass(x,this.#o),queueMicrotask(()=>this.#i?.fit()));}onControllerCleanup(){this.#e?.dispose(),this.#e=null,this.#i?.dispose(),this.#i=null,super.onControllerCleanup();}render(t){const n=<div class="cw-ButtonGroup"role="group">
|
|
17
17
|
<I.Provider value={_(this.props)}>
|
|
18
18
|
{this.#o?<D actions={this.props.actions??[]}label={this.props.overflowLabel??O}overflows={this.props.orientation!=="vertical"}shown={this.#t()}/>:t}
|
|
19
19
|
</I.Provider>
|
|
20
|
-
</div>;return this.#e=new T(n),this.#o&&R(()=>this.#i=new Ge(n,this.#n)),n}}),ze=e=><B when={e.selection!==void 0}fallback={<Ee{...e}/>}>
|
|
20
|
+
</div>;return this.#e=new T(n),this.#o&&R(()=>this.#i=new Ge(n,this.#n)),n;}}),ze=e=><B when={e.selection!==void 0}fallback={<Ee{...e}/>}>
|
|
21
21
|
<Le{...e}/>
|
|
22
|
-
</B>;function Le(e){let t;return z(()=>t?.dispose()),<X{...e}classList={{...e.classList,"cw-ButtonGroup":!0,"_cw-ButtonGroup-selection":!0,"_cw-ButtonGroup-square":e.shape==="square",[G(e.orientation)]:!0,[L(e.size)]:!0,[S(e.variant)]:!0}}multiple={e.selection==="multiple"}onChange={e.onValueChange}ref={n=>{t?.dispose(),t=new T(n),e.ref?.(n)}}
|
|
22
|
+
</B>;function Le(e){let t;return z(()=>t?.dispose()),<X{...e}classList={{...e.classList,"cw-ButtonGroup":!0,"_cw-ButtonGroup-selection":!0,"_cw-ButtonGroup-square":e.shape==="square",[G(e.orientation)]:!0,[L(e.size)]:!0,[S(e.variant)]:!0}}multiple={e.selection==="multiple"}onChange={e.onValueChange}ref={n=>{t?.dispose(),t=new T(n),e.ref?.(n);}}/>;}export{ze as ButtonGroup};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{mergeProps as g,useContext as u}from"solid-js";import{Icon as I}from"../icon";import{defineInteractableComponent as y}from"../state";import{ActionButtonController as z,ActionLayoutContext as l}from"./base";import{FABMenuTriggerContext as b}from"./fab-menu-context";const w={toggle:!0};function B(e){return`_cw-IconButton-${e??"standard"}
|
|
1
|
+
import{mergeProps as g,useContext as u}from"solid-js";import{Icon as I}from"../icon";import{defineInteractableComponent as y}from"../state";import{ActionButtonController as z,ActionLayoutContext as l}from"./base";import{FABMenuTriggerContext as b}from"./fab-menu-context";const w={toggle:!0};function B(e){return`_cw-IconButton-${e??"standard"}`;}function m(e,t){const[n,o]=(e??"md").split("-");return{size:`_cw-IconButton-${t?.size??n}`,width:o===void 0?void 0:`_cw-IconButton-${o}`};}function h(e,t){return(t?.shape??e)==="square";}function C(e,t){const n=u(l),o=u(b),s=m(t.size,n),i=t.toggle===!0,d=i&&("checked"in t?t.checked===!0:t.defaultChecked===!0),r=t.disabled===!0;return<button aria-controls={o?.itemsId}aria-disabled={i&&t.readOnly===!0?"true":void 0}aria-expanded={o===void 0?void 0:o.open?"true":"false"}aria-pressed={i?d?"true":"false":void 0}{...e}classList={{...e.classList,"cw-IconButton":!0,"cw-IconButton-checked":d,"cw-IconButton-disabled":r,"cw-IconButton-toggle":i,"_cw-IconButton-square":h(t.shape,n),...(s.width===void 0?{}:{[s.width]:!0}),[s.size]:!0,[B(t.variant)]:!0}}disabled={r}tabindex={r?-1:t.tabIndex}type={t.type??"button"}>
|
|
2
2
|
<I attr:inert={!0}>{t.name??e.children}</I>
|
|
3
|
-
</button
|
|
3
|
+
</button>;}const S=/* @__PURE__ */y(()=>C,()=>class extends z{#t;#e;#n;#o;constructor(e){const t=u(l);super(e,"cw-IconButton"),this.#t=t,this.#e=void 0,this.#n=void 0,this.#o=void 0;}applyComponentProps(){super.applyComponentProps();const e=super.readProps(["shape","size","variant"]),t=m(e.size,this.#t),n=h(e.shape,this.#t);e.variantChanged&&super.setClass("variant",B(e.variant)),t.size!==this.#e&&(this.#e=t.size,super.setClass("size",t.size)),t.width!==this.#n&&(this.#n=t.width,super.setClass("width",t.width)),n!==this.#o&&(this.#o=n,super.setClass("_cw-IconButton-square",n));}render(e){return<button class="cw-IconButton"type="button">
|
|
4
4
|
<I attr:inert={!0}>{()=>this.props.name??e}</I>
|
|
5
|
-
</button
|
|
5
|
+
</button>;}});function k(e){const t=g(e,w);return S(t);}export{S as IconButton,k as IconToggleButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Button as n,ToggleButton as r}from"./button";import{IconButton as u,IconToggleButton as p}from"./icon-button";import{FAB as i}from"./fab";import{ButtonGroup as g}from"./group";import{SplitButton as m}from"./split-button";import{FABMenu as f,FABMenuItem as s,FABMenuTrigger as l}from"./fab-menu";export{n as Button,g as ButtonGroup,i as FAB,f as FABMenu,s as FABMenuItem,l as FABMenuTrigger,u as IconButton,p as IconToggleButton,m as SplitButton,r as ToggleButton};
|
|
1
|
+
import{Button as n,ToggleButton as r}from"./button";import{IconButton as u,IconToggleButton as p}from"./icon-button";import{FAB as i}from"./fab";import{ButtonGroup as g}from"./group";import{SplitButton as m}from"./split-button";import{FABMenu as f,FABMenuItem as s,FABMenuTrigger as l}from"./fab-menu";export{n as Button,g as ButtonGroup,i as FAB,f as FABMenu,s as FABMenuItem,l as FABMenuTrigger,u as IconButton,p as IconToggleButton,m as SplitButton,r as ToggleButton};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{children as f}from"solid-js";import{defineDomComponent as v}from"..";import{Icon as E}from"../icon";import{Menu as L}from"../surface/menu";import{ActionLayoutContext as o}from"./base";import{Button as A}from"./button";import"./action.css";const r="sm",i="More options";function a(n){return`_cw-SplitButton-${n??r}
|
|
1
|
+
import{children as f}from"solid-js";import{defineDomComponent as v}from"..";import{Icon as E}from"../icon";import{Menu as L}from"../surface/menu";import{ActionLayoutContext as o}from"./base";import{Button as A}from"./button";import"./action.css";const r="sm",i="More options";function a(n){return`_cw-SplitButton-${n??r}`;}function s(n){return{get size(){return n.size??r;},shape:void 0};}function S(n){return<L label={n.label}placement="bottom-end"trigger={t=><A attr:aria-controls={t.attrs["aria-controls"]}attr:aria-expanded={t.attrs["aria-expanded"]}attr:aria-haspopup={t.attrs["aria-haspopup"]}attr:aria-label={n.label}leadingIcon={<E name="keyboard_arrow_down"/>}variant={n.variant}/>}>{n.children}</L>;}function B(n){const t=f(()=>n.children);return<>
|
|
2
2
|
<span class="cw-SplitButton-primary">{n.primary??t.toArray()[0]}</span>
|
|
3
3
|
<span class="cw-SplitButton-secondary">{n.secondary??t.toArray()[1]}</span>
|
|
4
|
-
|
|
4
|
+
</>;}function b(n,t){return<div role="group"{...n}classList={{...n.classList,"cw-SplitButton":!0,[a(t.size)]:!0}}>
|
|
5
5
|
<o.Provider value={s(t)}>
|
|
6
6
|
<B primary={t.primary}secondary={"menu"in t?<S label={t.menuLabel??i}variant={t.variant}>{t.menu}</S>:t.secondary}>{n.children}</B>
|
|
7
7
|
</o.Provider>
|
|
8
|
-
</div
|
|
8
|
+
</div>;}const C=/* @__PURE__ */v(()=>b,n=>class extends n{#t;constructor(t){const e="menu"in t;super(t,{styleElementIsFunction:!0}),this.#t=e;}applyComponentProps(){const[t,e]=super.readProp("size");e&&super.setClass("size",a(t));}render(t){return<div class="cw-SplitButton"role="group">
|
|
9
9
|
<o.Provider value={s(this.props)}>
|
|
10
10
|
<B primary={this.props.primary}secondary={this.#t?<S label={this.props.menuLabel??i}variant={this.props.variant}>{this.props.menu}</S>:this.props.secondary}>{t}</B>
|
|
11
11
|
</o.Provider>
|
|
12
|
-
</div
|
|
12
|
+
</div>;}});export{C as SplitButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{clamp as b,lstarOfY as i,yOfLstar as f}from"./hct";const h
|
|
1
|
+
import{clamp as b,lstarOfY as i,yOfLstar as f}from"./hct";const h=0.04;function m(r,n){return r>n?(r+5)/(n+5):(n+5)/(r+5);}function a(r,n){return m(f(b(0,100,r)),f(b(0,100,n)));}function l(r,n){if(r<0||r>100)return-1;const u=f(r),o=n*(u+5)-5,t=m(o,u);if(t<n&&Math.abs(t-n)>h)return-1;const e=i(o)+0.4;return e<0||e>100?-1:e;}function O(r,n){if(r<0||r>100)return-1;const u=f(r),o=(u+5)/n-5,t=m(u,o);if(t<n&&Math.abs(t-n)>h)return-1;const e=i(o)-0.4;return e<0||e>100?-1:e;}function p(r){return Math.round(r)<60;}function T(r,n){const u=l(r,n),o=O(r,n),t=u<0?100:u,e=o<0?0:o,c=a(t,r),s=a(e,r);return p(r)?c>=n||c>=s||Math.abs(c-s)<0.1&&c<n&&s<n?t:e:s>=n||s>=c?e:t;}export{O as darkerToneOf,T as foregroundToneOf,l as lighterToneOf,p as prefersLighterTone,a as ratioOfTones};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{darkerToneOf as U,foregroundToneOf as K,lighterToneOf as j,prefersLighterTone as A,ratioOfTones as V}from"./contrast";import{argbOfHct as z,clamp as g,hctOfArgb as B,sanitizeDegrees as C,solveHct as P}from"./hct";import{argbOfPalette as N,fixDislikedColor as Y,isYellowHue as w}from"./palette";import{analogousColorOf as q,complementaryColorOf as G}from"./temperature";const E={error:["error","onError","errorContainer","onErrorContainer"],primary:["primary","onPrimary","primaryContainer","onPrimaryContainer","primaryFixed","primaryFixedDim","onPrimaryFixed","onPrimaryFixedVariant","inversePrimary"],secondary:["secondary","onSecondary","secondaryContainer","onSecondaryContainer","secondaryFixed","secondaryFixedDim","onSecondaryFixed","onSecondaryFixedVariant"],tertiary:["tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","tertiaryFixed","tertiaryFixedDim","onTertiaryFixed","onTertiaryFixedVariant"]},J=ce(),x=10,Q=[[0,18],[41,15],[61,10],[101,12],[131,15],[181,18],[251,15],[301,12]],W=[[0,35],[41,30],[61,20],[101,25],[131,30],[181,35],[251,30],[301,25]],Z=[[0,45],[21,95],[51,45],[121,20],[151,45],[191,90],[271,45],[321,45]],$=[[0,120],[21,120],[51,20],[121,45],[151,20],[191,15],[271,20],[321,120]],ee=[[0,-40],[20,48],[71,-32],[161,40],[333,-32]],re=[[0,-32],[38,26],[105,10],[161,-39],[204,24],[278,-15],[333,-32]],I=[[0,-14],[38,10],[105,-14],[140,10],[333,-14]],ne=[[0,-72],[38,35],[71,24],[105,-24],[140,62],[161,50],[253,62],[333,-72]],te=[[0,-160],[105,155],[140,-100],[204,96],[253,-96],[278,-156],[300,-165],[333,-160]],ae=[[0,-165],[105,160],[140,-105],[204,101],[253,-101],[278,-160],[300,-170],[333,-165]],oe=[[0,10],[71,0],[124,10],[253,0],[278,10],[300,0]],ie=[[0,12],[3,22],[13,32],[23,12],[33,22],[43,32],[153,22],[273,12]];function ce(){const e=new Map;for(const a of Object.keys(E))E[a].forEach((r,t)=>e.set(r,[a,t]));return e}function ue(e){return e>=170&&e<207}function L(e){return e>=250&&e<270}function X(e,a){let r=0;for(const[t,n]of e)a>=t&&(r=n);return C(r)}function S(e,a){return C(a+X(e,a))}function i(e,a){return{hue:e,chroma:a,lightTone:void 0,darkTone:void 0}}function se(e,a){const{hue:r,chroma:t}=e,n=i(25,84);switch(a){case"content":case"fidelity":{const o=Y(a==="content"?q(e):G(e));return{primary:i(r,t),secondary:i(r,Math.max(t-32,t*.5)),tertiary:i(o.hue,o.chroma),error:n,neutral:i(r,t/8),neutralVariant:i(r,t/8+4)}}case"expressive":return{primary:i(C(r+240),40),secondary:i(S(Z,r),24),tertiary:i(S($,r),32),error:n,neutral:i(C(r+15),8),neutralVariant:i(C(r+15),12)};case"fruitSalad":return{primary:i(C(r-50),48),secondary:i(C(r-50),36),tertiary:i(r,36),error:n,neutral:i(r,10),neutralVariant:i(r,16)};case"monochrome":return{primary:i(r,0),secondary:i(r,0),tertiary:i(r,0),error:n,neutral:i(r,0),neutralVariant:i(r,0)};case"neutral":return{primary:i(r,12),secondary:i(r,8),tertiary:i(r,16),error:n,neutral:i(r,2),neutralVariant:i(r,2)};case"rainbow":return{primary:i(r,48),secondary:i(r,16),tertiary:i(C(r+60),24),error:n,neutral:i(r,0),neutralVariant:i(r,0)};case"tonalSpot":return{primary:i(r,36),secondary:i(r,16),tertiary:i(C(r+60),24),error:n,neutral:i(r,6),neutralVariant:i(r,8)};case"vibrant":return{primary:i(r,200),secondary:i(S(Q,r),24),tertiary:i(S(W,r),32),error:n,neutral:i(r,10),neutralVariant:i(r,12)}}}function le(e,a,r){const t=X(ie,e);switch(a){case"expressive":{const n=S(oe,e);return{primary:i(e,r?36:48),secondary:i(S(te,e),r?16:24),tertiary:i(S(ae,e),48),error:i(t,64),neutral:i(n,r?w(n)?6:14:18)}}case"neutral":return{primary:i(e,L(e)?12:8),secondary:i(e,L(e)?6:4),tertiary:i(S(re,e),20),error:i(t,50),neutral:i(e,1.4)};case"tonalSpot":return{primary:i(e,r?26:32),secondary:i(e,16),tertiary:i(S(ee,e),28),error:i(t,60),neutral:i(e,5)};case"vibrant":return{primary:i(e,74),secondary:i(S(I,e),56),tertiary:i(S(ne,e),56),error:i(t,80),neutral:i(S(I,e),28)}}}function H(e,a,r){return(1-r)*e+r*a}function v(e,a){const[r,t,n,o]=e;return a<=-1?r:a<0?H(r,t,a+1):a<.5?H(t,n,a/.5):a<1?H(n,o,(a-.5)/.5):o}function _(e,a,r){const t=r?-1:1;let n=r?100:0,o=P(e,a,n).chroma,c=n;for(;o<a&&n>=0&&n<=100;){n+=t;const u=P(e,a,n).chroma;o<u&&(o=u,c=n)}return c}function d(e,a,r){return e.lightTone??=_(e.hue,e.chroma,!0),g(a,r,e.lightTone)}function D(e,a,r){return e.darkTone??=_(e.hue,e.chroma,!1),g(a,r,e.darkTone)}function de(e,a,r){const{hue:t,chroma:n}=a,o=e.isDark?1:-1;let c=P(t,n,r).chroma,u=c,s=r;for(;c<n;){s+=o;const l=P(t,n,s).chroma;if(u>l||Math.abs(l-n)<.4)break;Math.abs(l-n)<Math.abs(c-n)&&(c=l),u=Math.max(u,l)}return s}function fe(e){return e.fixed??=!e.isDark&&e.contrastLevel===0?e:{...e,isDark:!1,contrastLevel:0,definitions:new Map,tones:new Map,fixed:void 0},e.fixed}function p(e){return e.isDark?"surfaceBright":"surfaceDim"}function ye(e,a,r){const{isDark:t,palettes:n,source:o,variant:c}=e,u=c==="monochrome",s=c==="content"||c==="fidelity",l=n[a],y=E[a];switch(r){case 0:return u&&a==="primary"?t?100:0:u&&a==="tertiary"?t?90:25:t?80:40;case 1:return u&&a==="secondary"?t?10:100:u&&a!=="error"?t?10:90:t?20:100;case 2:return s&&a==="primary"?o.tone:s&&a==="secondary"?de(e,l,t?30:90):s&&a==="tertiary"?Y(B(N(l.hue,l.chroma,o.tone))).tone:u&&a==="primary"?t?85:25:u&&a==="secondary"?t?30:85:u&&a==="tertiary"?t?60:49:t?30:90;case 3:return s&&a!=="error"?K(F(e,y[2]).tone,4.5):u&&(a==="primary"||a==="tertiary")?t?0:100:u?t?90:10:t?90:30;case 4:return u?a==="secondary"?80:40:90;case 5:return u?a==="secondary"?70:30:80;case 6:return u&&a!=="secondary"?100:10;case 7:return u?a==="secondary"?25:90:30;case 8:return t?40:80}}function me(e,a,r){const t=E[a],n=e.palettes[a],o=ye(e,a,r);switch(r){case 0:case 2:return{palette:n,tone:o,background:p(e),curve:r===0?[3,4.5,7,7]:[1,1,3,4.5],pair:{nearer:t[2],farther:t[0],together:!1}};case 1:return{palette:n,tone:o,background:t[0],curve:[4.5,7,11,21]};case 3:return{palette:n,tone:o,background:t[2],curve:[3,4.5,7,11]};case 4:case 5:{const c=t[4],u=t[5];return{palette:n,tone:o,background:p(e),curve:[1,1,3,4.5],pair:{nearer:e.isDark?u:c,farther:e.isDark?c:u,together:!0}}}case 6:case 7:return{palette:n,tone:o,background:t[5],secondBackground:t[4],curve:r===6?[4.5,7,11,21]:[3,4.5,7,11]};case 8:return{palette:n,tone:o,background:"inverseSurface",curve:[3,4.5,7,7]}}}function be(e,a){const{contrastLevel:r,isDark:t}=e,{neutral:n,primary:o}=e.palettes,c=e.palettes.neutralVariant;switch(a){case"background":case"surface":return{palette:n,tone:t?6:98};case"surfaceDim":return{palette:n,tone:t?6:v([87,87,80,75],r)};case"surfaceBright":return{palette:n,tone:t?v([24,24,29,34],r):98};case"surfaceContainerLowest":return{palette:n,tone:t?v([4,4,2,0],r):100};case"surfaceContainerLow":return{palette:n,tone:v(t?[10,10,11,12]:[96,96,96,95],r)};case"surfaceContainer":return{palette:n,tone:v(t?[12,12,16,20]:[94,94,92,90],r)};case"surfaceContainerHigh":return{palette:n,tone:v(t?[17,17,21,25]:[92,92,88,85],r)};case"surfaceContainerHighest":return{palette:n,tone:v(t?[22,22,26,30]:[90,90,84,80],r)};case"surfaceVariant":return{palette:c,tone:t?30:90};case"inverseSurface":return{palette:n,tone:t?90:20};case"surfaceTint":return{palette:o,tone:t?80:40};case"onBackground":return{palette:n,tone:t?90:10,background:"background",curve:[3,3,4.5,7]};case"onSurface":return{palette:n,tone:t?90:10,background:p(e),curve:[4.5,7,11,21]};case"onSurfaceVariant":return{palette:c,tone:t?80:30,background:p(e),curve:[3,4.5,7,11]};case"inverseOnSurface":return{palette:n,tone:t?20:95,background:"inverseSurface",curve:[4.5,7,11,21]};case"outline":return{palette:c,tone:t?60:50,background:p(e),curve:[1.5,3,4.5,7]};case"outlineVariant":return{palette:c,tone:t?30:80,background:p(e),curve:[1,1,3,4.5]};default:return{palette:n,tone:0}}}function k(e,a,r,t,n){return e.variant==="neutral"?a:e.variant==="tonalSpot"?r:e.variant==="expressive"?t:n}function M(e,a,r){const{isDark:t,variant:n}=e,o=e.palettes[a],c=ue(o.hue);if(r===2)switch(a){case"error":return t?D(o,30,93):d(o,0,90);case"primary":return n==="neutral"?t?30:90:n==="tonalSpot"&&t?D(o,35,93):n==="tonalSpot"?d(o,0,90):n==="expressive"&&t?d(o,30,93):n==="expressive"?d(o,78,c?88:90):t?D(o,66,93):d(o,66,c?88:93);case"secondary":return n==="vibrant"&&t?D(o,30,40):n==="vibrant"?d(o,84,90):n==="expressive"?t?15:d(o,90,95):t?25:90;case"tertiary":return n==="neutral"?d(o,0,t?93:96):n==="tonalSpot"?d(o,0,t?93:100):n==="expressive"&&c?d(o,75,88):n==="expressive"?d(o,75,t?93:100):t?d(o,0,93):d(o,72,100)}switch(a){case"error":return t?D(o,0,98):d(o,0,100);case"primary":return n==="neutral"?t?80:40:n==="tonalSpot"?t?80:d(o,0,100):n==="expressive"&&w(o.hue)?d(o,0,25):d(o,0,c?88:98);case"secondary":return n==="neutral"&&t?D(o,0,98):n==="vibrant"?d(o,0,t?90:98):t?80:d(o,0,100);case"tertiary":return d(o,0,c&&(n==="expressive"||n==="vibrant")?88:t?98:100)}}function pe(e,a,r){const t=E[a],n=e.palettes[a],o=t[2],c=t[5];switch(r){case 0:{const u=M(e,a,0),s=b(e,o);return{palette:n,tone:e.isDark?g(s+5,100,u):g(0,s-5,u),background:p(e),curve:[4.5,4.5,7,11],isBackground:!0}}case 1:return{palette:n,tone:b(e,t[0]),background:t[0],curve:[6,6,7,11]};case 2:return{palette:n,tone:M(e,a,2),background:p(e),curve:e.contrastLevel>0?[1.5,1.5,3,5.5]:void 0,isBackground:!0};case 4:return{palette:n,tone:b(fe(e),o),background:p(e),curve:e.contrastLevel>0?[1.5,1.5,3,5.5]:void 0,isBackground:!0};case 3:return{palette:n,tone:b(e,o),background:o,curve:a==="error"?[4.5,4.5,7,11]:[6,6,7,11]};case 5:return{palette:n,tone:g(0,100,b(e,t[4])-5)};case 6:case 7:return{palette:n,tone:b(e,c),background:c,curve:r===6?[7,7,11,21]:[4.5,4.5,7,11]};case 8:return{palette:n,tone:d(n,0,100),background:"inverseSurface",curve:[6,6,7,11]}}}function Se(e,a){const{isDark:r,variant:t}=e,n=e.palettes.neutral,o=w(n.hue),c=t==="vibrant",u=k(e,2.2,1.7,o?r?3:2.3:1.6,1);switch(a){case"background":return F(e,"surface");case"surfaceVariant":return F(e,"surfaceContainerHighest");case"surfaceTint":return F(e,"primary");case"surface":return{palette:n,tone:r?4:o?99:c?97:98};case"surfaceDim":case"surfaceBright":{const s=k(e,2.5,1.7,o?2.7:1.75,1.36);return a==="surfaceDim"?{palette:n,chromaFactor:r?1:s,tone:r?4:o?90:c?85:87}:{palette:n,chromaFactor:r?s:1,tone:r?18:o?99:c?97:98}}case"surfaceContainerLowest":return{palette:n,tone:r?0:100};case"surfaceContainerLow":return{palette:n,chromaFactor:k(e,1.3,1.25,o?1.3:1.15,1.08),tone:r?6:o?98:c?95:96};case"surfaceContainer":return{palette:n,chromaFactor:k(e,1.6,1.4,o?1.6:1.3,1.15),tone:r?9:o?96:c?92:94};case"surfaceContainerHigh":return{palette:n,chromaFactor:k(e,1.9,1.5,o?1.95:1.45,1.22),tone:r?12:o?94:c?90:92};case"surfaceContainerHighest":return{palette:n,chromaFactor:k(e,2.2,1.7,o?2.3:1.6,1.29),tone:r?15:o?92:c?88:90};case"inverseSurface":return{palette:n,tone:r?98:4};case"onBackground":return{...F(e,"onSurface"),tone:b(e,"onSurface")};case"onSurface":{const s=c?g(0,100,_(n.hue,n.chroma*1.1,!0)):b(e,p(e));return{palette:n,chromaFactor:u,tone:s,background:p(e),curve:r?[11,11,21,21]:[9,9,11,21]}}case"onSurfaceVariant":case"outline":case"outlineVariant":return{palette:n,chromaFactor:u,tone:b(e,p(e)),background:p(e),curve:a==="outline"?[3,3,4.5,7]:a==="outlineVariant"?[1.5,1.5,3,5.5]:r?[6,6,7,11]:[4.5,4.5,7,11]};case"inverseOnSurface":return{palette:n,tone:b(e,"inverseSurface"),background:"inverseSurface",curve:[7,7,11,21]};default:return{palette:n,tone:0}}}function F(e,a){let r=e.definitions.get(a);if(r===void 0){const t=J.get(a),n=e.specVersion==="2021";r=t===void 0&&n?be(e,a):t===void 0?Se(e,a):n?me(e,...t):pe(e,...t),e.definitions.set(a,r)}return r}function ve(e,a,r,t){const{contrastLevel:n,isDark:o}=e,{nearer:c,farther:u,together:s}=t,l=o?1:-1,y=b(e,r.background),R=F(e,c),O=F(e,u),h=v(R.curve,n),T=v(O.curve,n);let f=R.tone,m=O.tone;return(n<0||V(y,f)<h)&&(f=K(y,h)),(n<0||V(y,m)<T)&&(m=K(y,T)),(m-f)*l<x&&(m=g(0,100,f+x*l),(m-f)*l<x&&(f=g(0,100,m-x*l))),f>=50&&f<60||s&&m>=50&&m<60?(f=o?60:49,m=o?Math.max(m,f+x):Math.min(m,f-x)):m>=50&&m<60&&(m=o?60:49),a===c?f:m}function ge(e,a){const r=F(e,a),{background:t,curve:n,pair:o,secondBackground:c}=r,u=e.contrastLevel;if(o!==void 0)return ve(e,a,r,o);if(t===void 0||n===void 0)return r.tone;const s=b(e,t),l=v(n,u);let y=u<0||V(s,r.tone)<l?K(s,l):r.tone;if(r.isBackground&&(y=y>=57?g(65,100,y):g(0,49,y)),c!==void 0){const R=b(e,c),O=Math.max(s,R),h=Math.min(s,R);if(V(O,y)<l||V(h,y)<l){const T=j(O,l),f=U(h,l);y=A(s)||A(R)?T<0?100:T:T<0!=f<0?T<0?f:T:f<0?0:f}}return y}function b(e,a){let r=e.tones.get(a);return r===void 0&&(r=ge(e,a),e.tones.set(a,r)),r}function xe(e,a,r,t,n){const o=B(e),c=n==="2025"?le(o.hue,a,r):void 0;return{specVersion:c!==void 0?"2025":"2021",variant:a,isDark:r,contrastLevel:t,source:o,palettes:c??se(o,a),definitions:new Map,tones:new Map,fixed:void 0}}function De(e,a){const{chromaFactor:r,palette:t}=F(e,a),n=b(e,a);return e.specVersion==="2021"?N(t.hue,t.chroma,n):z(t.hue,t.chroma*(r??1),n)}export{De as argbOfRole,xe as newDynamicScheme};
|
|
1
|
+
import{darkerToneOf as U,foregroundToneOf as K,lighterToneOf as j,prefersLighterTone as A,ratioOfTones as V}from"./contrast";import{argbOfHct as z,clamp as g,hctOfArgb as B,sanitizeDegrees as C,solveHct as P}from"./hct";import{argbOfPalette as N,fixDislikedColor as Y,isYellowHue as w}from"./palette";import{analogousColorOf as q,complementaryColorOf as G}from"./temperature";const E={error:["error","onError","errorContainer","onErrorContainer"],primary:["primary","onPrimary","primaryContainer","onPrimaryContainer","primaryFixed","primaryFixedDim","onPrimaryFixed","onPrimaryFixedVariant","inversePrimary"],secondary:["secondary","onSecondary","secondaryContainer","onSecondaryContainer","secondaryFixed","secondaryFixedDim","onSecondaryFixed","onSecondaryFixedVariant"],tertiary:["tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","tertiaryFixed","tertiaryFixedDim","onTertiaryFixed","onTertiaryFixedVariant"]},J=/* @__PURE__ */ce(),x=10,Q=[[0,18],[41,15],[61,10],[101,12],[131,15],[181,18],[251,15],[301,12]],W=[[0,35],[41,30],[61,20],[101,25],[131,30],[181,35],[251,30],[301,25]],Z=[[0,45],[21,95],[51,45],[121,20],[151,45],[191,90],[271,45],[321,45]],$=[[0,120],[21,120],[51,20],[121,45],[151,20],[191,15],[271,20],[321,120]],ee=[[0,-40],[20,48],[71,-32],[161,40],[333,-32]],re=[[0,-32],[38,26],[105,10],[161,-39],[204,24],[278,-15],[333,-32]],I=[[0,-14],[38,10],[105,-14],[140,10],[333,-14]],ne=[[0,-72],[38,35],[71,24],[105,-24],[140,62],[161,50],[253,62],[333,-72]],te=[[0,-160],[105,155],[140,-100],[204,96],[253,-96],[278,-156],[300,-165],[333,-160]],ae=[[0,-165],[105,160],[140,-105],[204,101],[253,-101],[278,-160],[300,-170],[333,-165]],oe=[[0,10],[71,0],[124,10],[253,0],[278,10],[300,0]],ie=[[0,12],[3,22],[13,32],[23,12],[33,22],[43,32],[153,22],[273,12]];function ce(){const e=/* @__PURE__ */new Map();for(const a of Object.keys(E))E[a].forEach((r,t)=>e.set(r,[a,t]));return e;}function ue(e){return e>=170&&e<207;}function L(e){return e>=250&&e<270;}function X(e,a){let r=0;for(const[t,n]of e)a>=t&&(r=n);return C(r);}function S(e,a){return C(a+X(e,a));}function i(e,a){return{hue:e,chroma:a,lightTone:void 0,darkTone:void 0};}function se(e,a){const{hue:r,chroma:t}=e,n=i(25,84);switch(a){case"content":case"fidelity":{const o=Y(a==="content"?q(e):G(e));return{primary:i(r,t),secondary:i(r,Math.max(t-32,t*0.5)),tertiary:i(o.hue,o.chroma),error:n,neutral:i(r,t/8),neutralVariant:i(r,t/8+4)};}case"expressive":return{primary:i(C(r+240),40),secondary:i(S(Z,r),24),tertiary:i(S($,r),32),error:n,neutral:i(C(r+15),8),neutralVariant:i(C(r+15),12)};case"fruitSalad":return{primary:i(C(r-50),48),secondary:i(C(r-50),36),tertiary:i(r,36),error:n,neutral:i(r,10),neutralVariant:i(r,16)};case"monochrome":return{primary:i(r,0),secondary:i(r,0),tertiary:i(r,0),error:n,neutral:i(r,0),neutralVariant:i(r,0)};case"neutral":return{primary:i(r,12),secondary:i(r,8),tertiary:i(r,16),error:n,neutral:i(r,2),neutralVariant:i(r,2)};case"rainbow":return{primary:i(r,48),secondary:i(r,16),tertiary:i(C(r+60),24),error:n,neutral:i(r,0),neutralVariant:i(r,0)};case"tonalSpot":return{primary:i(r,36),secondary:i(r,16),tertiary:i(C(r+60),24),error:n,neutral:i(r,6),neutralVariant:i(r,8)};case"vibrant":return{primary:i(r,200),secondary:i(S(Q,r),24),tertiary:i(S(W,r),32),error:n,neutral:i(r,10),neutralVariant:i(r,12)};}}function le(e,a,r){const t=X(ie,e);switch(a){case"expressive":{const n=S(oe,e);return{primary:i(e,r?36:48),secondary:i(S(te,e),r?16:24),tertiary:i(S(ae,e),48),error:i(t,64),neutral:i(n,r?w(n)?6:14:18)};}case"neutral":return{primary:i(e,L(e)?12:8),secondary:i(e,L(e)?6:4),tertiary:i(S(re,e),20),error:i(t,50),neutral:i(e,1.4)};case"tonalSpot":return{primary:i(e,r?26:32),secondary:i(e,16),tertiary:i(S(ee,e),28),error:i(t,60),neutral:i(e,5)};case"vibrant":return{primary:i(e,74),secondary:i(S(I,e),56),tertiary:i(S(ne,e),56),error:i(t,80),neutral:i(S(I,e),28)};}}function H(e,a,r){return(1-r)*e+r*a;}function v(e,a){const[r,t,n,o]=e;return a<=-1?r:a<0?H(r,t,a+1):a<0.5?H(t,n,a/0.5):a<1?H(n,o,(a-0.5)/0.5):o;}function _(e,a,r){const t=r?-1:1;let n=r?100:0,o=P(e,a,n).chroma,c=n;for(;o<a&&n>=0&&n<=100;){n+=t;const u=P(e,a,n).chroma;o<u&&(o=u,c=n);}return c;}function d(e,a,r){return e.lightTone??=_(e.hue,e.chroma,!0),g(a,r,e.lightTone);}function D(e,a,r){return e.darkTone??=_(e.hue,e.chroma,!1),g(a,r,e.darkTone);}function de(e,a,r){const{hue:t,chroma:n}=a,o=e.isDark?1:-1;let c=P(t,n,r).chroma,u=c,s=r;for(;c<n;){s+=o;const l=P(t,n,s).chroma;if(u>l||Math.abs(l-n)<0.4)break;Math.abs(l-n)<Math.abs(c-n)&&(c=l),u=Math.max(u,l);}return s;}function fe(e){return e.fixed??=!e.isDark&&e.contrastLevel===0?e:{...e,isDark:!1,contrastLevel:0,definitions:/* @__PURE__ */new Map(),tones:/* @__PURE__ */new Map(),fixed:void 0},e.fixed;}function p(e){return e.isDark?"surfaceBright":"surfaceDim";}function ye(e,a,r){const{isDark:t,palettes:n,source:o,variant:c}=e,u=c==="monochrome",s=c==="content"||c==="fidelity",l=n[a],y=E[a];switch(r){case 0:return u&&a==="primary"?t?100:0:u&&a==="tertiary"?t?90:25:t?80:40;case 1:return u&&a==="secondary"?t?10:100:u&&a!=="error"?t?10:90:t?20:100;case 2:return s&&a==="primary"?o.tone:s&&a==="secondary"?de(e,l,t?30:90):s&&a==="tertiary"?Y(B(N(l.hue,l.chroma,o.tone))).tone:u&&a==="primary"?t?85:25:u&&a==="secondary"?t?30:85:u&&a==="tertiary"?t?60:49:t?30:90;case 3:return s&&a!=="error"?K(F(e,y[2]).tone,4.5):u&&(a==="primary"||a==="tertiary")?t?0:100:u?t?90:10:t?90:30;case 4:return u?a==="secondary"?80:40:90;case 5:return u?a==="secondary"?70:30:80;case 6:return u&&a!=="secondary"?100:10;case 7:return u?a==="secondary"?25:90:30;case 8:return t?40:80;}}function me(e,a,r){const t=E[a],n=e.palettes[a],o=ye(e,a,r);switch(r){case 0:case 2:return{palette:n,tone:o,background:p(e),curve:r===0?[3,4.5,7,7]:[1,1,3,4.5],pair:{nearer:t[2],farther:t[0],together:!1}};case 1:return{palette:n,tone:o,background:t[0],curve:[4.5,7,11,21]};case 3:return{palette:n,tone:o,background:t[2],curve:[3,4.5,7,11]};case 4:case 5:{const c=t[4],u=t[5];return{palette:n,tone:o,background:p(e),curve:[1,1,3,4.5],pair:{nearer:e.isDark?u:c,farther:e.isDark?c:u,together:!0}};}case 6:case 7:return{palette:n,tone:o,background:t[5],secondBackground:t[4],curve:r===6?[4.5,7,11,21]:[3,4.5,7,11]};case 8:return{palette:n,tone:o,background:"inverseSurface",curve:[3,4.5,7,7]};}}function be(e,a){const{contrastLevel:r,isDark:t}=e,{neutral:n,primary:o}=e.palettes,c=e.palettes.neutralVariant;switch(a){case"background":case"surface":return{palette:n,tone:t?6:98};case"surfaceDim":return{palette:n,tone:t?6:v([87,87,80,75],r)};case"surfaceBright":return{palette:n,tone:t?v([24,24,29,34],r):98};case"surfaceContainerLowest":return{palette:n,tone:t?v([4,4,2,0],r):100};case"surfaceContainerLow":return{palette:n,tone:v(t?[10,10,11,12]:[96,96,96,95],r)};case"surfaceContainer":return{palette:n,tone:v(t?[12,12,16,20]:[94,94,92,90],r)};case"surfaceContainerHigh":return{palette:n,tone:v(t?[17,17,21,25]:[92,92,88,85],r)};case"surfaceContainerHighest":return{palette:n,tone:v(t?[22,22,26,30]:[90,90,84,80],r)};case"surfaceVariant":return{palette:c,tone:t?30:90};case"inverseSurface":return{palette:n,tone:t?90:20};case"surfaceTint":return{palette:o,tone:t?80:40};case"onBackground":return{palette:n,tone:t?90:10,background:"background",curve:[3,3,4.5,7]};case"onSurface":return{palette:n,tone:t?90:10,background:p(e),curve:[4.5,7,11,21]};case"onSurfaceVariant":return{palette:c,tone:t?80:30,background:p(e),curve:[3,4.5,7,11]};case"inverseOnSurface":return{palette:n,tone:t?20:95,background:"inverseSurface",curve:[4.5,7,11,21]};case"outline":return{palette:c,tone:t?60:50,background:p(e),curve:[1.5,3,4.5,7]};case"outlineVariant":return{palette:c,tone:t?30:80,background:p(e),curve:[1,1,3,4.5]};default:return{palette:n,tone:0};}}function k(e,a,r,t,n){return e.variant==="neutral"?a:e.variant==="tonalSpot"?r:e.variant==="expressive"?t:n;}function M(e,a,r){const{isDark:t,variant:n}=e,o=e.palettes[a],c=ue(o.hue);if(r===2)switch(a){case"error":return t?D(o,30,93):d(o,0,90);case"primary":return n==="neutral"?t?30:90:n==="tonalSpot"&&t?D(o,35,93):n==="tonalSpot"?d(o,0,90):n==="expressive"&&t?d(o,30,93):n==="expressive"?d(o,78,c?88:90):t?D(o,66,93):d(o,66,c?88:93);case"secondary":return n==="vibrant"&&t?D(o,30,40):n==="vibrant"?d(o,84,90):n==="expressive"?t?15:d(o,90,95):t?25:90;case"tertiary":return n==="neutral"?d(o,0,t?93:96):n==="tonalSpot"?d(o,0,t?93:100):n==="expressive"&&c?d(o,75,88):n==="expressive"?d(o,75,t?93:100):t?d(o,0,93):d(o,72,100);}switch(a){case"error":return t?D(o,0,98):d(o,0,100);case"primary":return n==="neutral"?t?80:40:n==="tonalSpot"?t?80:d(o,0,100):n==="expressive"&&w(o.hue)?d(o,0,25):d(o,0,c?88:98);case"secondary":return n==="neutral"&&t?D(o,0,98):n==="vibrant"?d(o,0,t?90:98):t?80:d(o,0,100);case"tertiary":return d(o,0,c&&(n==="expressive"||n==="vibrant")?88:t?98:100);}}function pe(e,a,r){const t=E[a],n=e.palettes[a],o=t[2],c=t[5];switch(r){case 0:{const u=M(e,a,0),s=b(e,o);return{palette:n,tone:e.isDark?g(s+5,100,u):g(0,s-5,u),background:p(e),curve:[4.5,4.5,7,11],isBackground:!0};}case 1:return{palette:n,tone:b(e,t[0]),background:t[0],curve:[6,6,7,11]};case 2:return{palette:n,tone:M(e,a,2),background:p(e),curve:e.contrastLevel>0?[1.5,1.5,3,5.5]:void 0,isBackground:!0};case 4:return{palette:n,tone:b(fe(e),o),background:p(e),curve:e.contrastLevel>0?[1.5,1.5,3,5.5]:void 0,isBackground:!0};case 3:return{palette:n,tone:b(e,o),background:o,curve:a==="error"?[4.5,4.5,7,11]:[6,6,7,11]};case 5:return{palette:n,tone:g(0,100,b(e,t[4])-5)};case 6:case 7:return{palette:n,tone:b(e,c),background:c,curve:r===6?[7,7,11,21]:[4.5,4.5,7,11]};case 8:return{palette:n,tone:d(n,0,100),background:"inverseSurface",curve:[6,6,7,11]};}}function Se(e,a){const{isDark:r,variant:t}=e,n=e.palettes.neutral,o=w(n.hue),c=t==="vibrant",u=k(e,2.2,1.7,o?r?3:2.3:1.6,1);switch(a){case"background":return F(e,"surface");case"surfaceVariant":return F(e,"surfaceContainerHighest");case"surfaceTint":return F(e,"primary");case"surface":return{palette:n,tone:r?4:o?99:c?97:98};case"surfaceDim":case"surfaceBright":{const s=k(e,2.5,1.7,o?2.7:1.75,1.36);return a==="surfaceDim"?{palette:n,chromaFactor:r?1:s,tone:r?4:o?90:c?85:87}:{palette:n,chromaFactor:r?s:1,tone:r?18:o?99:c?97:98};}case"surfaceContainerLowest":return{palette:n,tone:r?0:100};case"surfaceContainerLow":return{palette:n,chromaFactor:k(e,1.3,1.25,o?1.3:1.15,1.08),tone:r?6:o?98:c?95:96};case"surfaceContainer":return{palette:n,chromaFactor:k(e,1.6,1.4,o?1.6:1.3,1.15),tone:r?9:o?96:c?92:94};case"surfaceContainerHigh":return{palette:n,chromaFactor:k(e,1.9,1.5,o?1.95:1.45,1.22),tone:r?12:o?94:c?90:92};case"surfaceContainerHighest":return{palette:n,chromaFactor:k(e,2.2,1.7,o?2.3:1.6,1.29),tone:r?15:o?92:c?88:90};case"inverseSurface":return{palette:n,tone:r?98:4};case"onBackground":return{...F(e,"onSurface"),tone:b(e,"onSurface")};case"onSurface":{const s=c?g(0,100,_(n.hue,n.chroma*1.1,!0)):b(e,p(e));return{palette:n,chromaFactor:u,tone:s,background:p(e),curve:r?[11,11,21,21]:[9,9,11,21]};}case"onSurfaceVariant":case"outline":case"outlineVariant":return{palette:n,chromaFactor:u,tone:b(e,p(e)),background:p(e),curve:a==="outline"?[3,3,4.5,7]:a==="outlineVariant"?[1.5,1.5,3,5.5]:r?[6,6,7,11]:[4.5,4.5,7,11]};case"inverseOnSurface":return{palette:n,tone:b(e,"inverseSurface"),background:"inverseSurface",curve:[7,7,11,21]};default:return{palette:n,tone:0};}}function F(e,a){let r=e.definitions.get(a);if(r===void 0){const t=J.get(a),n=e.specVersion==="2021";r=t===void 0&&n?be(e,a):t===void 0?Se(e,a):n?me(e,...t):pe(e,...t),e.definitions.set(a,r);}return r;}function ve(e,a,r,t){const{contrastLevel:n,isDark:o}=e,{nearer:c,farther:u,together:s}=t,l=o?1:-1,y=b(e,r.background),R=F(e,c),O=F(e,u),h=v(R.curve,n),T=v(O.curve,n);let f=R.tone,m=O.tone;return(n<0||V(y,f)<h)&&(f=K(y,h)),(n<0||V(y,m)<T)&&(m=K(y,T)),(m-f)*l<x&&(m=g(0,100,f+x*l),(m-f)*l<x&&(f=g(0,100,m-x*l))),f>=50&&f<60||s&&m>=50&&m<60?(f=o?60:49,m=o?Math.max(m,f+x):Math.min(m,f-x)):m>=50&&m<60&&(m=o?60:49),a===c?f:m;}function ge(e,a){const r=F(e,a),{background:t,curve:n,pair:o,secondBackground:c}=r,u=e.contrastLevel;if(o!==void 0)return ve(e,a,r,o);if(t===void 0||n===void 0)return r.tone;const s=b(e,t),l=v(n,u);let y=u<0||V(s,r.tone)<l?K(s,l):r.tone;if(r.isBackground&&(y=y>=57?g(65,100,y):g(0,49,y)),c!==void 0){const R=b(e,c),O=Math.max(s,R),h=Math.min(s,R);if(V(O,y)<l||V(h,y)<l){const T=j(O,l),f=U(h,l);y=A(s)||A(R)?T<0?100:T:T<0!=f<0?T<0?f:T:f<0?0:f;}}return y;}function b(e,a){let r=e.tones.get(a);return r===void 0&&(r=ge(e,a),e.tones.set(a,r)),r;}function xe(e,a,r,t,n){const o=B(e),c=n==="2025"?le(o.hue,a,r):void 0;return{specVersion:c!==void 0?"2025":"2021",variant:a,isDark:r,contrastLevel:t,source:o,palettes:c??se(o,a),definitions:/* @__PURE__ */new Map(),tones:/* @__PURE__ */new Map(),fixed:void 0};}function De(e,a){const{chromaFactor:r,palette:t}=F(e,a),n=b(e,a);return e.specVersion==="2021"?N(t.hue,t.chroma,n):z(t.hue,t.chroma*(r??1),n);}export{De as argbOfRole,xe as newDynamicScheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const P
|
|
1
|
+
const P=0.008856451679035631,d=24389/27,B=1.02117770275752,V=0.9863077294280124,j=0.9339605082802299,R=0.3884814537800353,g=29.980997194447333,L=1.0169191804458755,X=1.3173270022537198,K=0.759112960023724,W=0.8834525670408592,Y=1.1319226830134397,$=5,k=8,A=/* @__PURE__ */z(0,256),J=/* @__PURE__ */z(0.5,255),Q=/* @__PURE__ */new Float64Array(3),Z=/* @__PURE__ */new Float64Array(3),D=/* @__PURE__ */new Float64Array(3);function v(n){const t=n/255;return t<=0.040449936?t/12.92*100:Math.pow((t+0.055)/1.055,2.4)*100;}function z(n,t){const r=new Float64Array(t);for(let e=0;e<t;e++)r[e]=v(n+e);return r;}function T(n){const t=n/100;return(t<=31308e-7?t*12.92:1.055*Math.pow(t,1/2.4)-0.055)*255;}function y(n){return o0(0,255,Math.round(T(n)));}function G(n,t,r){return(4278190080|y(n)<<16|y(t)<<8|y(r))>>>0;}function x(n){return n>P?Math.pow(n,1/3):(d*n+16)/116;}function n0(n){const t=n*n*n;return t>P?t:(116*n-16)/d;}function U(n){return n<0?-1:n===0?0:1;}function N(n){const t=Math.pow(Math.abs(n),0.42);return U(n)*400*t/(t+27.13);}function C(n){const t=Math.abs(n);return U(n)*Math.pow(Math.max(0,27.13*t/(400-t)),1/0.42);}function w(n,t,r){const e=N(0.001200833568784504*n+0.002389694492170889*t+2795742885861124e-19*r),o=N(5891086651375999e-19*n+0.0029785502573438758*t+3270666104008398e-19*r),u=N(10146692491640572e-20*n+5364214359186694e-19*t+0.0032979401770712076*r);return Math.atan2((e+o-2*u)/9,(11*e-12*o+u)/11);}function H(n){return(n+Math.PI*8)%(Math.PI*2);}function F(n,t,r){return H(t-n)<H(r-n);}function t0(n,t){const r=D,e=t%4<=1?0:100,o=t%2===0?0:100;let u;return t<4?(u=(n-e*0.7152-o*0.0722)/0.2126,r[0]=u,r[1]=e,r[2]=o):t<8?(u=(n-o*0.2126-e*0.0722)/0.7152,r[0]=o,r[1]=u,r[2]=e):(u=(n-e*0.2126-o*0.7152)/0.0722,r[0]=e,r[1]=o,r[2]=u),u>=0&&u<=100;}function r0(n,t,r){const e=3846.153846153846*(0.25*(Math.cos(n+2)+3.8))*L,o=Math.sin(n),u=Math.cos(n);let s=Math.sqrt(r)*11;for(let i=0;;i++){const l=s/100,a=t===0||s===0?0:t/Math.sqrt(l),c=Math.pow(a*Y,1/0.9),b=g*Math.pow(l,K)/L,f=23*(b+0.305)*c/(23*e+11*c*u+108*c*o),h=f*u,E=f*o,M=C((460*b+451*h+288*E)/1403),S=C((460*b-891*h-261*E)/1403),p=C((460*b-220*h-6300*E)/1403),m=1373.2198709594231*M-1100.4251190754821*S-7.278681089101213*p,I=-271.815969077903*M+559.6580465940733*S-32.46047482791194*p,O=1.9622899599665666*M-57.173814538844006*S+308.7233197812385*p;if(m<0||I<0||O<0)return 0;const _=0.2126*m+0.7152*I+0.0722*O;if(_<=0)return 0;if(i===$-1||Math.abs(_-r)<2e-3)return m>100.01||I>100.01||O>100.01?0:G(m,I,O);s-=(_-r)*s/(2*_);}}function e0(n,t){const r=Q,e=Z,o=D;let u=0,s=0,i=!1,l=!1;for(let a=0;a<12;a++){if(!t0(t,a))continue;const c=w(o[0],o[1],o[2]);i?(!l||F(u,c,s))&&(l=!0,F(u,n,c)?(e.set(o),s=c):(r.set(o),u=c)):(r.set(o),e.set(o),u=c,s=c,i=!0);}for(let a=0;a<3;a++){const c=r[a],b=e[a];if(c===b)continue;let f=c<b?Math.floor(T(c)-0.5):Math.ceil(T(c)-0.5),h=c<b?Math.ceil(T(b)-0.5):Math.floor(T(b)-0.5);for(let E=0;E<k&&Math.abs(h-f)>1;E++){const M=Math.floor((f+h)/2),S=(J[M]-r[a])/(e[a]-r[a]);for(let m=0;m<3;m++)o[m]=r[m]+(e[m]-r[m])*S;const p=w(o[0],o[1],o[2]);F(u,n,p)?(e.set(o),h=M):(r.set(o),u=p,f=M);}}return G((r[0]+e[0])/2,(r[1]+e[1])/2,(r[2]+e[2])/2);}function o0(n,t,r){return r<n?n:r>t?t:r;}function q(n){const t=n%360;return t<0?t+360:t;}function u0(n){return 100*n0((n+16)/116);}function a0(n){return x(n/100)*116-16;}function b0(n){const t=A[n>>16&255],r=A[n>>8&255],e=A[n&255],o=x((0.41233895*t+0.35762064*r+0.18051042*e)/95.047),u=x((0.2126*t+0.7152*r+0.0722*e)/100),s=x((0.01932141*t+0.11916382*r+0.95034478*e)/108.883);return[116*u-16,500*(o-u),200*(u-s)];}function c0(n){const t=A[n>>16&255],r=A[n>>8&255],e=A[n&255],o=0.41233895*t+0.35762064*r+0.18051042*e,u=0.2126*t+0.7152*r+0.0722*e,s=0.01932141*t+0.11916382*r+0.95034478*e,i=N(R*(B*(0.401288*o+0.650173*u-0.051461*s))/100),l=N(R*(V*(-0.250268*o+1.204414*u+0.045854*s))/100),a=N(R*(j*(-2079e-6*o+0.048952*u+0.953127*s))/100),c=(11*i-12*l+a)/11,b=(i+l-2*a)/9,f=q(Math.atan2(b,c)*180/Math.PI),h=100*Math.pow((40*i+20*l+a)/20*L/g,X),E=0.25*(Math.cos((f<20.14?f+360:f)*Math.PI/180+2)+3.8),M=5e4/13*E*L*Math.sqrt(c*c+b*b)/((20*i+20*l+21*a)/20+0.305);return{argb:n,hue:f,chroma:Math.pow(M,0.9)*W*Math.sqrt(h/100),tone:116*x(u/100)-16};}function s0(n,t,r){const e=u0(r);if(t<1e-4||r<1e-4||r>99.9999){const s=y(e);return(4278190080|s<<16|s<<8|s)>>>0;}const o=q(n)/180*Math.PI,u=r0(o,t,e);return u!==0?u:e0(o,e);}function f0(n,t,r){return c0(s0(n,t,r));}function m0(n){return`#${(n&16777215).toString(16).padStart(6,"0")}`;}export{s0 as argbOfHct,o0 as clamp,c0 as hctOfArgb,m0 as hexOfArgb,b0 as labOfArgb,a0 as lstarOfY,q as sanitizeDegrees,f0 as solveHct,u0 as yOfLstar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COLOR_SCHEME_CSS_ROLES as r,COLOR_SCHEME_ROLE_MAPPINGS as l,applyColorScheme as C,createColorScheme as S,removeColorScheme as c}from"./scheme";export{r as COLOR_SCHEME_CSS_ROLES,l as COLOR_SCHEME_ROLE_MAPPINGS,C as applyColorScheme,S as createColorScheme,c as removeColorScheme};
|
|
1
|
+
import{COLOR_SCHEME_CSS_ROLES as r,COLOR_SCHEME_ROLE_MAPPINGS as l,applyColorScheme as C,createColorScheme as S,removeColorScheme as c}from"./scheme";export{r as COLOR_SCHEME_CSS_ROLES,l as COLOR_SCHEME_ROLE_MAPPINGS,C as applyColorScheme,S as createColorScheme,c as removeColorScheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{argbOfHct as e,solveHct as a}from"./hct";function c(t){return t>=105&&t<125}function m(t,r,f){if(f!==99||!c(t))return e(t,r,f);const u=e(t,r,98),i=e(t,r,100);let o=4278190080;for(const n of[16,8,0])o|=Math.round(((u>>n&255)+(i>>n&255))/2)<<n;return o>>>0}function s(t){const r=Math.round(t.hue);return r>=90&&r<=111&&Math.round(t.chroma)>16&&Math.round(t.tone)<65}function d(t){return s(t)?a(t.hue,t.chroma,70):t}export{m as argbOfPalette,d as fixDislikedColor,c as isYellowHue};
|
|
1
|
+
import{argbOfHct as e,solveHct as a}from"./hct";function c(t){return t>=105&&t<125;}function m(t,r,f){if(f!==99||!c(t))return e(t,r,f);const u=e(t,r,98),i=e(t,r,100);let o=4278190080;for(const n of[16,8,0])o|=Math.round(((u>>n&255)+(i>>n&255))/2)<<n;return o>>>0;}function s(t){const r=Math.round(t.hue);return r>=90&&r<=111&&Math.round(t.chroma)>16&&Math.round(t.tone)<65;}function d(t){return s(t)?a(t.hue,t.chroma,70):t;}export{m as argbOfPalette,d as fixDislikedColor,c as isYellowHue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{argbOfRole as R,newDynamicScheme as x}from"./dynamic";import{hexOfArgb as S}from"./hct";const h=Object.freeze([{role:"primary",cssRole:"primary-fill"},{role:"onPrimary",cssRole:"primary-onFill"},{role:"primaryContainer",cssRole:"primary-container"},{role:"onPrimaryContainer",cssRole:"primary-onContainer"},{role:"inversePrimary",cssRole:"primary-inverseFill"},{role:"primaryFixed",cssRole:"primary-fixedFill"},{role:"primaryFixedDim",cssRole:"primary-fixedFillDim"},{role:"onPrimaryFixed",cssRole:"primary-onFixedFill"},{role:"onPrimaryFixedVariant",cssRole:"primary-onFixedFillVariant"},{role:"secondary",cssRole:"secondary-fill"},{role:"onSecondary",cssRole:"secondary-onFill"},{role:"secondaryContainer",cssRole:"secondary-container"},{role:"onSecondaryContainer",cssRole:"secondary-onContainer"},{role:"secondaryFixed",cssRole:"secondary-fixedFill"},{role:"secondaryFixedDim",cssRole:"secondary-fixedFillDim"},{role:"onSecondaryFixed",cssRole:"secondary-onFixedFill"},{role:"onSecondaryFixedVariant",cssRole:"secondary-onFixedFillVariant"},{role:"tertiary",cssRole:"tertiary-fill"},{role:"onTertiary",cssRole:"tertiary-onFill"},{role:"tertiaryContainer",cssRole:"tertiary-container"},{role:"onTertiaryContainer",cssRole:"tertiary-onContainer"},{role:"tertiaryFixed",cssRole:"tertiary-fixedFill"},{role:"tertiaryFixedDim",cssRole:"tertiary-fixedFillDim"},{role:"onTertiaryFixed",cssRole:"tertiary-onFixedFill"},{role:"onTertiaryFixedVariant",cssRole:"tertiary-onFixedFillVariant"},{role:"error",cssRole:"error-fill"},{role:"onError",cssRole:"error-onFill"},{role:"errorContainer",cssRole:"error-container"},{role:"onErrorContainer",cssRole:"error-onContainer"},{role:"background",cssRole:"background"},{role:"onBackground",cssRole:"onBackground"},{role:"surface",cssRole:"surface-fill"},{role:"onSurface",cssRole:"surface-onFill"},{role:"surfaceVariant",cssRole:"surface-fillVariant"},{role:"onSurfaceVariant",cssRole:"surface-onFillVariant"},{role:"surfaceTint",cssRole:"surface-tint"},{role:"inverseSurface",cssRole:"surface-inverseFill"},{role:"inverseOnSurface",cssRole:"surface-inverseOnFill"},{role:"surfaceBright",cssRole:"surface-fillBright"},{role:"surfaceDim",cssRole:"surface-fillDim"},{role:"surfaceContainer",cssRole:"surface-container"},{role:"surfaceContainerHigh",cssRole:"surface-containerHigh"},{role:"surfaceContainerHighest",cssRole:"surface-containerHighest"},{role:"surfaceContainerLow",cssRole:"surface-containerLow"},{role:"surfaceContainerLowest",cssRole:"surface-containerLowest"},{role:"outline",cssRole:"outline"},{role:"outlineVariant",cssRole:"outlineVariant"},{role:"scrim",cssRole:"scrim"},{role:"shadow",cssRole:"shadow"}].map(e=>Object.freeze(e))),T=Object.freeze(h.map(({cssRole:e})=>e)),F
|
|
1
|
+
import{argbOfRole as R,newDynamicScheme as x}from"./dynamic";import{hexOfArgb as S}from"./hct";const h=Object.freeze([{role:"primary",cssRole:"primary-fill"},{role:"onPrimary",cssRole:"primary-onFill"},{role:"primaryContainer",cssRole:"primary-container"},{role:"onPrimaryContainer",cssRole:"primary-onContainer"},{role:"inversePrimary",cssRole:"primary-inverseFill"},{role:"primaryFixed",cssRole:"primary-fixedFill"},{role:"primaryFixedDim",cssRole:"primary-fixedFillDim"},{role:"onPrimaryFixed",cssRole:"primary-onFixedFill"},{role:"onPrimaryFixedVariant",cssRole:"primary-onFixedFillVariant"},{role:"secondary",cssRole:"secondary-fill"},{role:"onSecondary",cssRole:"secondary-onFill"},{role:"secondaryContainer",cssRole:"secondary-container"},{role:"onSecondaryContainer",cssRole:"secondary-onContainer"},{role:"secondaryFixed",cssRole:"secondary-fixedFill"},{role:"secondaryFixedDim",cssRole:"secondary-fixedFillDim"},{role:"onSecondaryFixed",cssRole:"secondary-onFixedFill"},{role:"onSecondaryFixedVariant",cssRole:"secondary-onFixedFillVariant"},{role:"tertiary",cssRole:"tertiary-fill"},{role:"onTertiary",cssRole:"tertiary-onFill"},{role:"tertiaryContainer",cssRole:"tertiary-container"},{role:"onTertiaryContainer",cssRole:"tertiary-onContainer"},{role:"tertiaryFixed",cssRole:"tertiary-fixedFill"},{role:"tertiaryFixedDim",cssRole:"tertiary-fixedFillDim"},{role:"onTertiaryFixed",cssRole:"tertiary-onFixedFill"},{role:"onTertiaryFixedVariant",cssRole:"tertiary-onFixedFillVariant"},{role:"error",cssRole:"error-fill"},{role:"onError",cssRole:"error-onFill"},{role:"errorContainer",cssRole:"error-container"},{role:"onErrorContainer",cssRole:"error-onContainer"},{role:"background",cssRole:"background"},{role:"onBackground",cssRole:"onBackground"},{role:"surface",cssRole:"surface-fill"},{role:"onSurface",cssRole:"surface-onFill"},{role:"surfaceVariant",cssRole:"surface-fillVariant"},{role:"onSurfaceVariant",cssRole:"surface-onFillVariant"},{role:"surfaceTint",cssRole:"surface-tint"},{role:"inverseSurface",cssRole:"surface-inverseFill"},{role:"inverseOnSurface",cssRole:"surface-inverseOnFill"},{role:"surfaceBright",cssRole:"surface-fillBright"},{role:"surfaceDim",cssRole:"surface-fillDim"},{role:"surfaceContainer",cssRole:"surface-container"},{role:"surfaceContainerHigh",cssRole:"surface-containerHigh"},{role:"surfaceContainerHighest",cssRole:"surface-containerHighest"},{role:"surfaceContainerLow",cssRole:"surface-containerLow"},{role:"surfaceContainerLowest",cssRole:"surface-containerLowest"},{role:"outline",cssRole:"outline"},{role:"outlineVariant",cssRole:"outlineVariant"},{role:"scrim",cssRole:"scrim"},{role:"shadow",cssRole:"shadow"}].map(e=>Object.freeze(e))),T=Object.freeze(h.map(({cssRole:e})=>e)),F=/* @__PURE__ */new Set(["tonalSpot","expressive","vibrant","fidelity","content","monochrome","neutral","rainbow","fruitSalad"]),g=/^(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,y=/* @__PURE__ */new WeakMap();function b(e){if(typeof e=="number"){if(!Number.isFinite(e))throw new TypeError("sourceColor must be a CSS hexadecimal color or ARGB number");if(!Number.isInteger(e)||e<0||e>4294967295)throw new RangeError("sourceColor ARGB number must be an integer in [0, 0xffffffff]");return e>>>0;}const o=typeof e=="string"?e.trim().replace(/^#/,""):"";if(!g.test(o))throw new TypeError("sourceColor must be a CSS hexadecimal color or ARGB number");const a=o.length<=4?o.replace(/./g,"$&$&"):o;return((a.length===8?parseInt(a.slice(6),16):255)<<24|parseInt(a.slice(0,6),16))>>>0;}function v(e,o,a){const r=e===void 0?{}:typeof e=="string"?{mode:e}:typeof e=="boolean"?{isDark:e}:e;if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError("color-scheme options must be an object");if(r.isDark!==void 0&&typeof r.isDark!="boolean")throw new TypeError("isDark must be a boolean");const l=r.isDark===void 0?r.mode??"light":r.isDark?"dark":"light",n=o??r.contrastLevel??0,t=a??r.variant??"tonalSpot",i=r.specVersion??"2025";if(r.mode!==void 0&&r.mode!==l)throw new RangeError("mode and isDark select different color-scheme modes");if(l!=="light"&&l!=="dark")throw new TypeError("mode must be 'light' or 'dark'");if(!Number.isFinite(n)||n<-1||n>1)throw new RangeError("contrastLevel must be a finite number in [-1, 1]");if(!F.has(t))throw new TypeError("variant is not a supported Material 3 color style");if(i!=="2021"&&i!=="2025")throw new TypeError("specVersion must be '2021' or '2025'");return{mode:l,contrastLevel:n,variant:t,specVersion:i};}function D(e,o,a,r){const l=b(e),n=v(o,a,r),t=x(l,n.variant,n.mode==="dark",n.contrastLevel,n.specVersion),i={},c={},s={},d={};let C="";for(const{role:m,cssRole:f}of h){const p=R(t,m),u=S(p);i[m]=p,c[m]=u,s[f]=u,d[`--cw-Color-${f}`]=u,C+=`--cw-Color-${f}:${u};`;}return Object.freeze({...c,specVersion:t.specVersion,sourceColor:S(l),sourceColorArgb:l,mode:n.mode,isDark:n.mode==="dark",contrastLevel:n.contrastLevel,variant:n.variant,argb:Object.freeze(i),values:Object.freeze(s),variables:Object.freeze(d),cssText:`${C}color-scheme:${n.mode}`});}function V(e,o){const{style:a}=e;for(const[r,l]of o.properties)a.getPropertyValue(r)!==l.applied||a.getPropertyPriority(r)!==""||(l.value===""?a.removeProperty(r):a.setProperty(r,l.value,l.priority));y.delete(e);}function E(e,o){if(typeof e?.style?.setProperty!="function")throw new TypeError("target must be an Element with inline CSS styles");if(typeof o?.variables!="object"||typeof o.cssText!="string")throw new TypeError("scheme must be a color scheme created by createColorScheme");const{style:a}=e,r=y.get(e),l=/* @__PURE__ */new Map(),n={properties:l},t=[...Object.entries(o.variables),["color-scheme",o.mode]];for(const[i,c]of t){const s=r?.properties.get(i),d=s!==void 0&&a.getPropertyValue(i)===s.applied&&a.getPropertyPriority(i)==="";l.set(i,{value:d?s.value:a.getPropertyValue(i),priority:d?s.priority:a.getPropertyPriority(i),applied:c}),a.setProperty(i,c);}return y.set(e,n),()=>{y.get(e)===n&&V(e,n);};}function k(e){const o=y.get(e);o!==void 0&&V(e,o);}export{T as COLOR_SCHEME_CSS_ROLES,h as COLOR_SCHEME_ROLE_MAPPINGS,E as applyColorScheme,D as createColorScheme,k as removeColorScheme};
|