@yamada-ui/react 2.3.2-dev-20261104075618 → 2.3.2-dev-20261104093107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/checkbox/checkbox.style.cjs +1 -0
- package/dist/cjs/components/checkbox/checkbox.style.cjs.map +1 -1
- package/dist/cjs/components/radio/radio.style.cjs +1 -0
- package/dist/cjs/components/radio/radio.style.cjs.map +1 -1
- package/dist/cjs/components/switch/switch.style.cjs +1 -0
- package/dist/cjs/components/switch/switch.style.cjs.map +1 -1
- package/dist/cjs/core/css/css.cjs +8 -1
- package/dist/cjs/core/css/css.cjs.map +1 -1
- package/dist/esm/components/checkbox/checkbox.style.js +1 -0
- package/dist/esm/components/checkbox/checkbox.style.js.map +1 -1
- package/dist/esm/components/radio/radio.style.js +1 -0
- package/dist/esm/components/radio/radio.style.js.map +1 -1
- package/dist/esm/components/switch/switch.style.js +1 -0
- package/dist/esm/components/switch/switch.style.js.map +1 -1
- package/dist/esm/core/css/css.js +8 -1
- package/dist/esm/core/css/css.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.style.cjs","names":["defineComponentSlotStyle","focusRingStyle"],"sources":["../../../../src/components/checkbox/checkbox.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const checkboxStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n bg: \"{indicator-bg}\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-bg\": \"transparent\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'rounded'\n */\n shape: {\n rounded: {\n indicator: { rounded: \"l1\" },\n },\n square: {\n indicator: { rounded: \"0\" },\n },\n },\n },\n\n variants: {\n outline: {\n indicator: { color: \"colorScheme.outline\" },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.outline\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.outline\" },\n },\n },\n solid: {\n indicator: {\n color: \"colorScheme.contrast\",\n _checked: { bg: \"colorScheme.solid\" },\n _indeterminate: { bg: \"colorScheme.solid\" },\n },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.solid\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.solid\" },\n },\n },\n subtle: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { fontSize: \"xs\" },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { fontSize: \"sm\" },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { fontSize: \"md\" },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"rounded\",\n },\n})\n\nexport type CheckboxStyle = typeof checkboxStyle\n"],"mappings":";;;AAEA,MAAa,gBAAgBA,eAAAA,yBAAyB;CACpD,MAAM;EACJ,OAAO,CAAC;EACR,WAAW;GACT,YAAY;GACZ,IAAI;GACJ,aAAa;GACb,aAAa;GACb,SAAS;GACT,SAAS;GACT,gBAAgB;GAChB,2BAA2BC,mBAAAA,eAAe;GAC1C,gBAAgB;GAChB,YAAY;IACV;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAgC;IAC5D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAsC;GACpE;GACA,UAAU;IACR,aAAa;IACb,gBAAgB;GAClB;EACF;EACA,OAAO,CAAC;EACR,MAAM;GACJ,wBAAwB;GACxB,wBAAwB;GACxB,kBAAkB;GAClB,4BAA4B;GAC5B,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,YAAY;GACZ,WAAW,EAAE,YAAY,WAAW;GACpC,WAAW,EAAE,YAAY,WAAW;EACtC;CACF;CAEA,OAAO;;;;;;AAML,OAAO;EACL,SAAS,EACP,WAAW,EAAE,SAAS,KAAK,EAC7B;EACA,QAAQ,EACN,WAAW,EAAE,SAAS,IAAI,EAC5B;CACF,EACF;CAEA,UAAU;EACR,SAAS;GACP,WAAW,EAAE,OAAO,sBAAsB;GAC1C,MAAM;IACJ,UAAU,EAAE,4BAA4B,sBAAsB;IAC9D,gBAAgB,EAAE,4BAA4B,sBAAsB;GACtE;EACF;EACA,OAAO;GACL,WAAW;IACT,OAAO;IACP,UAAU,EAAE,IAAI,oBAAoB;IACpC,gBAAgB,EAAE,IAAI,oBAAoB;GAC5C;GACA,MAAM;IACJ,UAAU,EAAE,4BAA4B,oBAAoB;IAC5D,gBAAgB,EAAE,4BAA4B,oBAAoB;GACpE;EACF;EACA,QAAQ;GACN,WAAW;IAAE,IAAI;IAAsB,OAAO;GAAiB;GAC/D,MAAM,EAAE,4BAA4B,cAAc;EACpD;EACA,SAAS;GACP,WAAW;IAAE,IAAI;IAAsB,OAAO;GAAiB;GAC/D,MAAM,EAAE,4BAA4B,oBAAoB;EAC1D;CACF;CAEA,OAAO;EACL,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAa,gBAAgB;GAAe;EAC1E;EACA,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;EACA,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"checkbox.style.cjs","names":["defineComponentSlotStyle","focusRingStyle"],"sources":["../../../../src/components/checkbox/checkbox.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const checkboxStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n bg: \"{indicator-bg}\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-bg\": \"transparent\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n position: \"relative\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'rounded'\n */\n shape: {\n rounded: {\n indicator: { rounded: \"l1\" },\n },\n square: {\n indicator: { rounded: \"0\" },\n },\n },\n },\n\n variants: {\n outline: {\n indicator: { color: \"colorScheme.outline\" },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.outline\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.outline\" },\n },\n },\n solid: {\n indicator: {\n color: \"colorScheme.contrast\",\n _checked: { bg: \"colorScheme.solid\" },\n _indeterminate: { bg: \"colorScheme.solid\" },\n },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.solid\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.solid\" },\n },\n },\n subtle: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { fontSize: \"xs\" },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { fontSize: \"sm\" },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { fontSize: \"md\" },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"rounded\",\n },\n})\n\nexport type CheckboxStyle = typeof checkboxStyle\n"],"mappings":";;;AAEA,MAAa,gBAAgBA,eAAAA,yBAAyB;CACpD,MAAM;EACJ,OAAO,CAAC;EACR,WAAW;GACT,YAAY;GACZ,IAAI;GACJ,aAAa;GACb,aAAa;GACb,SAAS;GACT,SAAS;GACT,gBAAgB;GAChB,2BAA2BC,mBAAAA,eAAe;GAC1C,gBAAgB;GAChB,YAAY;IACV;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAgC;IAC5D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAsC;GACpE;GACA,UAAU;IACR,aAAa;IACb,gBAAgB;GAClB;EACF;EACA,OAAO,CAAC;EACR,MAAM;GACJ,wBAAwB;GACxB,wBAAwB;GACxB,kBAAkB;GAClB,4BAA4B;GAC5B,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,UAAU;GACV,YAAY;GACZ,WAAW,EAAE,YAAY,WAAW;GACpC,WAAW,EAAE,YAAY,WAAW;EACtC;CACF;CAEA,OAAO;;;;;;AAML,OAAO;EACL,SAAS,EACP,WAAW,EAAE,SAAS,KAAK,EAC7B;EACA,QAAQ,EACN,WAAW,EAAE,SAAS,IAAI,EAC5B;CACF,EACF;CAEA,UAAU;EACR,SAAS;GACP,WAAW,EAAE,OAAO,sBAAsB;GAC1C,MAAM;IACJ,UAAU,EAAE,4BAA4B,sBAAsB;IAC9D,gBAAgB,EAAE,4BAA4B,sBAAsB;GACtE;EACF;EACA,OAAO;GACL,WAAW;IACT,OAAO;IACP,UAAU,EAAE,IAAI,oBAAoB;IACpC,gBAAgB,EAAE,IAAI,oBAAoB;GAC5C;GACA,MAAM;IACJ,UAAU,EAAE,4BAA4B,oBAAoB;IAC5D,gBAAgB,EAAE,4BAA4B,oBAAoB;GACpE;EACF;EACA,QAAQ;GACN,WAAW;IAAE,IAAI;IAAsB,OAAO;GAAiB;GAC/D,MAAM,EAAE,4BAA4B,cAAc;EACpD;EACA,SAAS;GACP,WAAW;IAAE,IAAI;IAAsB,OAAO;GAAiB;GAC/D,MAAM,EAAE,4BAA4B,oBAAoB;EAC1D;CACF;CAEA,OAAO;EACL,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAa,gBAAgB;GAAe;EAC1E;EACA,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;EACA,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.style.cjs","names":["defineComponentSlotStyle","focusRingStyle"],"sources":["../../../../src/components/radio/radio.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const radioStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n bg: \"{indicator-bg}\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _before: { display: \"block\" },\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-bg\": \"transparent\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'circle'\n */\n shape: {\n circle: { indicator: { rounded: \"full\", _before: { rounded: \"full\" } } },\n rounded: {\n indicator: {\n rounded: \"l1\",\n _before: { rounded: \"calc({radii.l1} / 2)\" },\n },\n },\n square: {\n indicator: { rounded: \"0\", _before: { rounded: \"0\" } },\n },\n },\n },\n\n variants: {\n base: {\n indicator: { _checked: { _before: { bg: \"colorScheme.solid\" } } },\n },\n outline: {\n indicator: { _checked: { _before: { bg: \"colorScheme.outline\" } } },\n root: { _checked: { \"--indicator-border-color\": \"colorScheme.outline\" } },\n },\n solid: {},\n subtle: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { _before: { boxSize: \"1.5\" } },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { _before: { boxSize: \"2\" } },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { _before: { boxSize: \"3\" } },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"circle\",\n },\n})\n\nexport type RadioStyle = typeof radioStyle\n"],"mappings":";;;AAEA,MAAa,aAAaA,eAAAA,yBAAyB;CACjD,MAAM;EACJ,OAAO,CAAC;EACR,WAAW;GACT,YAAY;GACZ,IAAI;GACJ,aAAa;GACb,aAAa;GACb,SAAS;GACT,SAAS;GACT,gBAAgB;GAChB,2BAA2BC,mBAAAA,eAAe;GAC1C,gBAAgB;GAChB,SAAS,EAAE,SAAS,QAAQ;GAC5B,YAAY;IACV;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAgC;IAC5D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAsC;GACpE;GACA,UAAU;IACR,aAAa;IACb,gBAAgB;GAClB;EACF;EACA,OAAO,CAAC;EACR,MAAM;GACJ,wBAAwB;GACxB,wBAAwB;GACxB,kBAAkB;GAClB,4BAA4B;GAC5B,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,YAAY;GACZ,WAAW,EAAE,YAAY,WAAW;GACpC,WAAW,EAAE,YAAY,WAAW;EACtC;CACF;CAEA,OAAO;;;;;;AAML,OAAO;EACL,QAAQ,EAAE,WAAW;GAAE,SAAS;GAAQ,SAAS,EAAE,SAAS,OAAO;EAAE,EAAE;EACvE,SAAS,EACP,WAAW;GACT,SAAS;GACT,SAAS,EAAE,SAAS,uBAAuB;EAC7C,EACF;EACA,QAAQ,EACN,WAAW;GAAE,SAAS;GAAK,SAAS,EAAE,SAAS,IAAI;EAAE,EACvD;CACF,EACF;CAEA,UAAU;EACR,MAAM,EACJ,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,oBAAoB,EAAE,EAAE,EAClE;EACA,SAAS;GACP,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,sBAAsB,EAAE,EAAE;GAClE,MAAM,EAAE,UAAU,EAAE,4BAA4B,sBAAsB,EAAE;EAC1E;EACA,OAAO,CAAC;EACR,QAAQ;GACN,WAAW,EAAE,IAAI,qBAAqB;GACtC,MAAM,EAAE,4BAA4B,cAAc;EACpD;EACA,SAAS;GACP,WAAW,EAAE,IAAI,qBAAqB;GACtC,MAAM,EAAE,4BAA4B,oBAAoB;EAC1D;CACF;CAEA,OAAO;EACL,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE;GACzC,MAAM;IAAE,oBAAoB;IAAa,gBAAgB;GAAe;EAC1E;EACA,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE;GACvC,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;EACA,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE;GACvC,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"radio.style.cjs","names":["defineComponentSlotStyle","focusRingStyle"],"sources":["../../../../src/components/radio/radio.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const radioStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n bg: \"{indicator-bg}\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _before: { display: \"block\" },\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-bg\": \"transparent\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n position: \"relative\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'circle'\n */\n shape: {\n circle: { indicator: { rounded: \"full\", _before: { rounded: \"full\" } } },\n rounded: {\n indicator: {\n rounded: \"l1\",\n _before: { rounded: \"calc({radii.l1} / 2)\" },\n },\n },\n square: {\n indicator: { rounded: \"0\", _before: { rounded: \"0\" } },\n },\n },\n },\n\n variants: {\n base: {\n indicator: { _checked: { _before: { bg: \"colorScheme.solid\" } } },\n },\n outline: {\n indicator: { _checked: { _before: { bg: \"colorScheme.outline\" } } },\n root: { _checked: { \"--indicator-border-color\": \"colorScheme.outline\" } },\n },\n solid: {},\n subtle: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { _before: { boxSize: \"1.5\" } },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { _before: { boxSize: \"2\" } },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { _before: { boxSize: \"3\" } },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"circle\",\n },\n})\n\nexport type RadioStyle = typeof radioStyle\n"],"mappings":";;;AAEA,MAAa,aAAaA,eAAAA,yBAAyB;CACjD,MAAM;EACJ,OAAO,CAAC;EACR,WAAW;GACT,YAAY;GACZ,IAAI;GACJ,aAAa;GACb,aAAa;GACb,SAAS;GACT,SAAS;GACT,gBAAgB;GAChB,2BAA2BC,mBAAAA,eAAe;GAC1C,gBAAgB;GAChB,SAAS,EAAE,SAAS,QAAQ;GAC5B,YAAY;IACV;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAgC;IAC5D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAsC;GACpE;GACA,UAAU;IACR,aAAa;IACb,gBAAgB;GAClB;EACF;EACA,OAAO,CAAC;EACR,MAAM;GACJ,wBAAwB;GACxB,wBAAwB;GACxB,kBAAkB;GAClB,4BAA4B;GAC5B,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,UAAU;GACV,YAAY;GACZ,WAAW,EAAE,YAAY,WAAW;GACpC,WAAW,EAAE,YAAY,WAAW;EACtC;CACF;CAEA,OAAO;;;;;;AAML,OAAO;EACL,QAAQ,EAAE,WAAW;GAAE,SAAS;GAAQ,SAAS,EAAE,SAAS,OAAO;EAAE,EAAE;EACvE,SAAS,EACP,WAAW;GACT,SAAS;GACT,SAAS,EAAE,SAAS,uBAAuB;EAC7C,EACF;EACA,QAAQ,EACN,WAAW;GAAE,SAAS;GAAK,SAAS,EAAE,SAAS,IAAI;EAAE,EACvD;CACF,EACF;CAEA,UAAU;EACR,MAAM,EACJ,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,oBAAoB,EAAE,EAAE,EAClE;EACA,SAAS;GACP,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,sBAAsB,EAAE,EAAE;GAClE,MAAM,EAAE,UAAU,EAAE,4BAA4B,sBAAsB,EAAE;EAC1E;EACA,OAAO,CAAC;EACR,QAAQ;GACN,WAAW,EAAE,IAAI,qBAAqB;GACtC,MAAM,EAAE,4BAA4B,cAAc;EACpD;EACA,SAAS;GACP,WAAW,EAAE,IAAI,qBAAqB;GACtC,MAAM,EAAE,4BAA4B,oBAAoB;EAC1D;CACF;CAEA,OAAO;EACL,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE;GACzC,MAAM;IAAE,oBAAoB;IAAa,gBAAgB;GAAe;EAC1E;EACA,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE;GACvC,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;EACA,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE;GACvC,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.style.cjs","names":["defineComponentSlotStyle","focusRingStyle"],"sources":["../../../../src/components/switch/switch.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const switchStyle = defineComponentSlotStyle({\n base: {\n label: {\n userSelect: \"none\",\n },\n root: {\n alignItems: \"center\",\n cursor: \"pointer\",\n display: \"inline-flex\",\n gap: \"2\",\n _readOnly: {\n layerStyle: \"readOnly\",\n pointerEvents: \"none\",\n },\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n thumb: {\n alignItems: \"center\",\n bg: \"white\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n position: \"absolute\",\n rounded: \"inherit\",\n transitionDuration: \"fast\",\n transitionProperty: \"background, transform\",\n _checked: {\n transform: \"translateX(100%)\",\n },\n },\n track: {\n \"--focus-ring-color\": \"{colorScheme.outline}\",\n alignItems: \"center\",\n bg: \"bg.muted\",\n boxSizing: \"content-box\",\n display: \"inline-flex\",\n flexShrink: 0,\n position: \"relative\",\n rounded: \"full\",\n transitionDuration: \"fast\",\n transitionProperty: \"background\",\n _peerFocusVisible: {\n ...focusRingStyle.outline,\n },\n },\n },\n\n variants: {\n thin: {\n thumb: {\n boxShadow: \"2xl\",\n _checked: {\n bg: \"colorScheme.solid\",\n },\n },\n track: {\n \"--focus-ring-offset\": \"4px\",\n _checked: {\n bg: [\"colorScheme.muted\", \"colorScheme.subtle\"],\n },\n },\n },\n thick: {\n thumb: {\n _checked: {\n bg: \"colorScheme.contrast\",\n },\n },\n track: {\n p: \"1\",\n _checked: {\n bg: \"colorScheme.solid\",\n },\n },\n },\n },\n\n sizes: {\n sm: {\n label: { fontSize: \"sm\" },\n thumb: { boxSize: \"3\" },\n track: { w: \"6\" },\n },\n md: {\n label: { fontSize: \"md\" },\n thumb: { boxSize: \"4\" },\n track: { w: \"8\" },\n },\n lg: {\n label: { fontSize: \"lg\" },\n thumb: { boxSize: \"5\" },\n track: { w: \"10\" },\n },\n },\n\n props: {\n /**\n * Change switch label from right to left.\n *\n * @default false\n */\n reverse: {\n false: {\n root: { flexDirection: \"row\" },\n },\n true: {\n root: { flexDirection: \"row-reverse\" },\n },\n },\n /**\n * The shape of the switch.\n *\n * @default circle\n */\n shape: {\n circle: {\n track: { rounded: \"full\" },\n },\n rounded: {\n thumb: { rounded: \"l1\" },\n track: { rounded: \"l2\" },\n },\n square: {\n track: { rounded: \"0\" },\n },\n },\n },\n\n compounds: [\n {\n css: {\n track: { h: \"3\" },\n },\n size: \"sm\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"4\" },\n },\n size: \"md\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"5\" },\n },\n size: \"lg\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"2\" },\n },\n size: \"sm\",\n variant: \"thin\",\n },\n {\n css: {\n track: { h: \"3\" },\n },\n size: \"md\",\n variant: \"thin\",\n },\n {\n css: {\n track: { h: \"4\" },\n },\n size: \"lg\",\n variant: \"thin\",\n },\n ],\n\n defaultProps: {\n size: \"md\",\n variant: \"thick\",\n shape: \"circle\",\n },\n})\n\nexport type SwitchStyle = typeof switchStyle\n"],"mappings":";;;AAEA,MAAa,cAAcA,eAAAA,yBAAyB;CAClD,MAAM;EACJ,OAAO,EACL,YAAY,OACd;EACA,MAAM;GACJ,YAAY;GACZ,QAAQ;GACR,SAAS;GACT,KAAK;GACL,WAAW;IACT,YAAY;IACZ,eAAe;GACjB;GACA,WAAW,EACT,YAAY,WACd;EACF;EACA,OAAO;GACL,YAAY;GACZ,IAAI;GACJ,SAAS;GACT,gBAAgB;GAChB,UAAU;GACV,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,UAAU,EACR,WAAW,mBACb;EACF;EACA,OAAO;GACL,sBAAsB;GACtB,YAAY;GACZ,IAAI;GACJ,WAAW;GACX,SAAS;GACT,YAAY;GACZ,UAAU;GACV,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,mBAAmB,EACjB,GAAGC,mBAAAA,eAAe,QACpB;EACF;CACF;CAEA,UAAU;EACR,MAAM;GACJ,OAAO;IACL,WAAW;IACX,UAAU,EACR,IAAI,oBACN;GACF;GACA,OAAO;IACL,uBAAuB;IACvB,UAAU,EACR,IAAI,CAAC,qBAAqB,oBAAoB,EAChD;GACF;EACF;EACA,OAAO;GACL,OAAO,EACL,UAAU,EACR,IAAI,uBACN,EACF;GACA,OAAO;IACL,GAAG;IACH,UAAU,EACR,IAAI,oBACN;GACF;EACF;CACF;CAEA,OAAO;EACL,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,IAAI;EAClB;EACA,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,IAAI;EAClB;EACA,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,KAAK;EACnB;CACF;CAEA,OAAO;;;;;;EAML,SAAS;GACP,OAAO,EACL,MAAM,EAAE,eAAe,MAAM,EAC/B;GACA,MAAM,EACJ,MAAM,EAAE,eAAe,cAAc,EACvC;EACF;;;;;;EAMA,OAAO;GACL,QAAQ,EACN,OAAO,EAAE,SAAS,OAAO,EAC3B;GACA,SAAS;IACP,OAAO,EAAE,SAAS,KAAK;IACvB,OAAO,EAAE,SAAS,KAAK;GACzB;GACA,QAAQ,EACN,OAAO,EAAE,SAAS,IAAI,EACxB;EACF;CACF;CAEA,WAAW;EACT;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"switch.style.cjs","names":["defineComponentSlotStyle","focusRingStyle"],"sources":["../../../../src/components/switch/switch.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const switchStyle = defineComponentSlotStyle({\n base: {\n label: {\n userSelect: \"none\",\n },\n root: {\n alignItems: \"center\",\n cursor: \"pointer\",\n display: \"inline-flex\",\n gap: \"2\",\n position: \"relative\",\n _readOnly: {\n layerStyle: \"readOnly\",\n pointerEvents: \"none\",\n },\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n thumb: {\n alignItems: \"center\",\n bg: \"white\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n position: \"absolute\",\n rounded: \"inherit\",\n transitionDuration: \"fast\",\n transitionProperty: \"background, transform\",\n _checked: {\n transform: \"translateX(100%)\",\n },\n },\n track: {\n \"--focus-ring-color\": \"{colorScheme.outline}\",\n alignItems: \"center\",\n bg: \"bg.muted\",\n boxSizing: \"content-box\",\n display: \"inline-flex\",\n flexShrink: 0,\n position: \"relative\",\n rounded: \"full\",\n transitionDuration: \"fast\",\n transitionProperty: \"background\",\n _peerFocusVisible: {\n ...focusRingStyle.outline,\n },\n },\n },\n\n variants: {\n thin: {\n thumb: {\n boxShadow: \"2xl\",\n _checked: {\n bg: \"colorScheme.solid\",\n },\n },\n track: {\n \"--focus-ring-offset\": \"4px\",\n _checked: {\n bg: [\"colorScheme.muted\", \"colorScheme.subtle\"],\n },\n },\n },\n thick: {\n thumb: {\n _checked: {\n bg: \"colorScheme.contrast\",\n },\n },\n track: {\n p: \"1\",\n _checked: {\n bg: \"colorScheme.solid\",\n },\n },\n },\n },\n\n sizes: {\n sm: {\n label: { fontSize: \"sm\" },\n thumb: { boxSize: \"3\" },\n track: { w: \"6\" },\n },\n md: {\n label: { fontSize: \"md\" },\n thumb: { boxSize: \"4\" },\n track: { w: \"8\" },\n },\n lg: {\n label: { fontSize: \"lg\" },\n thumb: { boxSize: \"5\" },\n track: { w: \"10\" },\n },\n },\n\n props: {\n /**\n * Change switch label from right to left.\n *\n * @default false\n */\n reverse: {\n false: {\n root: { flexDirection: \"row\" },\n },\n true: {\n root: { flexDirection: \"row-reverse\" },\n },\n },\n /**\n * The shape of the switch.\n *\n * @default circle\n */\n shape: {\n circle: {\n track: { rounded: \"full\" },\n },\n rounded: {\n thumb: { rounded: \"l1\" },\n track: { rounded: \"l2\" },\n },\n square: {\n track: { rounded: \"0\" },\n },\n },\n },\n\n compounds: [\n {\n css: {\n track: { h: \"3\" },\n },\n size: \"sm\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"4\" },\n },\n size: \"md\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"5\" },\n },\n size: \"lg\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"2\" },\n },\n size: \"sm\",\n variant: \"thin\",\n },\n {\n css: {\n track: { h: \"3\" },\n },\n size: \"md\",\n variant: \"thin\",\n },\n {\n css: {\n track: { h: \"4\" },\n },\n size: \"lg\",\n variant: \"thin\",\n },\n ],\n\n defaultProps: {\n size: \"md\",\n variant: \"thick\",\n shape: \"circle\",\n },\n})\n\nexport type SwitchStyle = typeof switchStyle\n"],"mappings":";;;AAEA,MAAa,cAAcA,eAAAA,yBAAyB;CAClD,MAAM;EACJ,OAAO,EACL,YAAY,OACd;EACA,MAAM;GACJ,YAAY;GACZ,QAAQ;GACR,SAAS;GACT,KAAK;GACL,UAAU;GACV,WAAW;IACT,YAAY;IACZ,eAAe;GACjB;GACA,WAAW,EACT,YAAY,WACd;EACF;EACA,OAAO;GACL,YAAY;GACZ,IAAI;GACJ,SAAS;GACT,gBAAgB;GAChB,UAAU;GACV,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,UAAU,EACR,WAAW,mBACb;EACF;EACA,OAAO;GACL,sBAAsB;GACtB,YAAY;GACZ,IAAI;GACJ,WAAW;GACX,SAAS;GACT,YAAY;GACZ,UAAU;GACV,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,mBAAmB,EACjB,GAAGC,mBAAAA,eAAe,QACpB;EACF;CACF;CAEA,UAAU;EACR,MAAM;GACJ,OAAO;IACL,WAAW;IACX,UAAU,EACR,IAAI,oBACN;GACF;GACA,OAAO;IACL,uBAAuB;IACvB,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ACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
@@ -58,6 +58,13 @@ function transformConditionalValue({ breakpoints }) {
|
|
|
58
58
|
else return { [key]: value };
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
+
function sortBreakpointQueries({ queries }) {
|
|
62
|
+
return function(css) {
|
|
63
|
+
const queryMap = new Map(queries.flatMap(({ query }) => !(0, require_utils_index.utils_exports.isUndefined)(query) && query in css ? [[query, css[query]]] : []));
|
|
64
|
+
const entries = queryMap.entries();
|
|
65
|
+
return Object.fromEntries(Object.entries(css).map(([key, value]) => queryMap.has(key) ? entries.next().value : [key, value]));
|
|
66
|
+
};
|
|
67
|
+
}
|
|
61
68
|
function expandCSS(system) {
|
|
62
69
|
return function(css) {
|
|
63
70
|
let computedCSS = {};
|
|
@@ -66,7 +73,7 @@ function expandCSS(system) {
|
|
|
66
73
|
if (!isVariableLength(key)) computedCSS = (0, require_utils_index.utils_exports.merge)(computedCSS, transformConditionalValue(system)(key, value));
|
|
67
74
|
else computedCSS = (0, require_utils_index.utils_exports.merge)(computedCSS, { [key]: value });
|
|
68
75
|
}
|
|
69
|
-
return computedCSS;
|
|
76
|
+
return sortBreakpointQueries(system.breakpoints)(computedCSS);
|
|
70
77
|
};
|
|
71
78
|
}
|
|
72
79
|
function valueToVar(system) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.cjs","names":["variableLengthProperties","conditions","getCondition","transformInterpolation","getColorSchemeVar","colorMix","isCSSToken","getVar","styles","isImportant","omitImportant","insertImportant"],"sources":["../../../../src/core/css/css.ts"],"sourcesContent":["import type { Dict } from \"../../utils\"\nimport type { Breakpoints, System, UsageTheme } from \"../system\"\nimport type { StyleConfig } from \"./config\"\nimport type { CSSObjectOrFunction } from \"./index.type\"\nimport type { StyleProperty, VariableLengthProperty } from \"./styles\"\nimport type { TransformOptions } from \"./utils\"\nimport {\n isArray,\n isObject,\n isString,\n isUndefined,\n merge,\n runIfFn,\n} from \"../../utils\"\nimport { getColorSchemeVar, getVar, transformInterpolation } from \"../system\"\nimport { colorMix } from \"./color-mix\"\nimport { conditions, getCondition } from \"./conditions\"\nimport { styles, variableLengthProperties } from \"./styles\"\nimport {\n insertImportant,\n isCSSToken,\n isImportant,\n omitImportant,\n} from \"./utils\"\n\nfunction isVariableLength(key: string): boolean {\n return variableLengthProperties.includes(key as VariableLengthProperty)\n}\n\nfunction isConditionalObject(breakpoints: Breakpoints) {\n return function (value: any): boolean {\n if (!isObject(value)) return false\n\n const keys = Object.keys(value)\n\n if (!keys.length) return false\n\n if (!keys.includes(\"base\")) return false\n\n return keys.every((key) => {\n return (\n breakpoints.isResponsiveKey(key) ||\n key.startsWith(\"@\") ||\n key.startsWith(\"_\")\n )\n })\n }\n}\n\nfunction transformColorModeArray(breakpoints: Breakpoints) {\n return function (key: string, [lightValue, darkValue]: any[]): Dict {\n let computedCSS: Dict = {}\n\n if (isConditionalObject(breakpoints)(lightValue))\n computedCSS = transformConditionalObject(breakpoints)(key, lightValue)\n else computedCSS[key] = lightValue\n\n if (isConditionalObject(breakpoints)(darkValue))\n computedCSS[conditions._dark] = transformConditionalObject(breakpoints)(\n key,\n darkValue,\n )\n else computedCSS[conditions._dark] = { [key]: darkValue }\n\n return computedCSS\n }\n}\n\nfunction transformConditionalObject(breakpoints: Breakpoints) {\n return function (key: string, value: Dict) {\n const conditionalKeys = Object.keys(value).filter(\n (key) => !breakpoints.isResponsiveKey(key),\n )\n\n const breakpointObj = breakpoints.queries.reduce<Dict>(\n (prev, { breakpoint, query }) => {\n const breakpointValue = value[breakpoint]\n\n if (!isUndefined(breakpointValue))\n if (isArray(breakpointValue)) {\n const colorModeValue = transformColorModeArray(breakpoints)(\n key,\n breakpointValue,\n )\n\n prev = merge(\n prev,\n query ? { [query]: colorModeValue } : colorModeValue,\n )\n } else if (isConditionalObject(breakpoints)(breakpointValue)) {\n const conditionalValue = transformConditionalObject(breakpoints)(\n key,\n breakpointValue,\n )\n\n prev = merge(\n prev,\n query ? { [query]: conditionalValue } : conditionalValue,\n )\n } else {\n prev = merge(\n prev,\n query\n ? { [query]: { [key]: breakpointValue } }\n : { [key]: breakpointValue },\n )\n }\n\n return prev\n },\n {},\n )\n\n const additionalObj = conditionalKeys.reduce<Dict>(\n (prev, conditionalKey) => {\n const query = getCondition(conditionalKey)\n\n prev[query] = { [key]: value[conditionalKey] }\n\n return prev\n },\n {},\n )\n\n return merge(breakpointObj, additionalObj)\n }\n}\n\nexport function transformConditionalValue({ breakpoints }: System) {\n return function (key: string, value: any) {\n if (isArray(value)) return transformColorModeArray(breakpoints)(key, value)\n else if (isConditionalObject(breakpoints)(value))\n return transformConditionalObject(breakpoints)(key, value)\n else return { [key]: value }\n }\n}\n\nfunction expandCSS(system: System) {\n return function (css: Dict): Dict {\n let computedCSS: Dict = {}\n\n for (let [key, value] of Object.entries(css)) {\n if (value == null) continue\n\n if (!isVariableLength(key))\n computedCSS = merge(\n computedCSS,\n transformConditionalValue(system)(key, value),\n )\n else computedCSS = merge(computedCSS, { [key]: value })\n }\n\n return computedCSS\n }\n}\n\nfunction valueToVar(system: System) {\n return function (prop: string, value: any) {\n const result = transformInterpolation(\n value,\n function (value: string, fallbackValue?: string) {\n if (value.includes(\"colorScheme.\")) {\n return getColorSchemeVar(system)(value)\n } else if (value.includes(\"colors.\")) {\n return colorMix(value, { fallback: fallbackValue, system })\n } else if (isCSSToken(system)(value)) {\n return system.cssMap[value]!.ref\n } else if (fallbackValue) {\n fallbackValue = isCSSToken(system)(fallbackValue)\n ? system.cssMap[fallbackValue]!.ref\n : fallbackValue\n\n return getVar(value, fallbackValue)\n } else {\n return getVar(value)\n }\n },\n )\n\n if (prop.startsWith(\"--\") && isString(result))\n if (result.includes(\"colorScheme.\"))\n return getColorSchemeVar(system)(result)\n else if (result.includes(\"colors.\")) return colorMix(result, { system })\n else if (isCSSToken(system)(result)) return system.cssMap[result]!.ref\n else return result\n else return result\n }\n}\n\nfunction mergeCSS(prev: Dict, value: any, prop: string, properties?: string[]) {\n if (properties) {\n for (const property of properties) {\n prev[property] = prev[property] ?? {}\n prev[property] = merge(prev[property], value)\n }\n } else {\n prev[prop] = prev[prop] ?? {}\n prev[prop] = merge(prev[prop], value)\n }\n\n return prev\n}\n\nfunction insertCSS(\n prev: Dict,\n value: any,\n prop: string,\n properties?: string[],\n) {\n if (properties) for (const property of properties) prev[property] = value\n else prev[prop] = value\n\n return prev\n}\n\nexport function getStyle(prop: string) {\n const style = styles[prop as StyleProperty] as StyleConfig | true | undefined\n\n return style === true ? { properties: [prop] } : style\n}\n\nexport function css(system: System, theme: UsageTheme = {}) {\n return function (cssOrFn: CSSObjectOrFunction) {\n function createCSS(cssOrFn: CSSObjectOrFunction): Dict {\n const cssObj = runIfFn(cssOrFn, system)\n const computedCSS = expandCSS(system)(cssObj)\n\n let prev: Dict = {}\n\n for (let [prop, value] of Object.entries(computedCSS)) {\n value = valueToVar(system)(prop, value)\n\n if (value == null) continue\n\n prop = getCondition(prop)\n\n const style = getStyle(prop)\n const options: TransformOptions = {\n css,\n prev,\n properties: style?.properties,\n system,\n theme,\n }\n\n if (isObject(value)) {\n value = style?.transform?.(value, options) ?? value\n\n if (isObject(value))\n prev = mergeCSS(prev, createCSS(value), prop, style?.properties)\n else prev = insertCSS(prev, value, prop, style?.properties)\n\n continue\n }\n\n const important = isImportant(value)\n\n value = omitImportant(value)\n value = style?.transform?.(value, options) ?? value\n\n if (important) value = insertImportant(value, style)\n\n if (style?.static) prev = merge(prev, style.static)\n\n if (isObject(value)) {\n prev = merge(prev, createCSS(value))\n\n continue\n }\n\n prev = insertCSS(prev, value, prop, style?.properties)\n }\n\n return prev\n }\n\n return createCSS(cssOrFn)\n }\n}\n"],"mappings":";;;;;;;AAyBA,SAAS,iBAAiB,KAAsB;CAC9C,OAAOA,eAAAA,yB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KAAK;IAEnC,QAAQC,cAAAA,cAAc,KAAK;IAC3B,QAAQ,OAAO,YAAY,OAAO,OAAO,KAAK;IAE9C,IAAI,WAAW,QAAQC,cAAAA,gBAAgB,OAAO,KAAK;IAEnD,IAAI,OAAO,QAAQ,QAAA,GAAA,oBAAA,cAAO,MAAA,CAAM,MAAM,MAAM,MAAM;IAElD,KAAA,GAAA,oBAAA,cAAI,SAAA,CAAS,KAAK,GAAG;KACnB,QAAA,GAAA,oBAAA,cAAO,MAAA,CAAM,MAAM,UAAU,KAAK,CAAC;KAEnC;IACF;IAEA,OAAO,UAAU,MAAM,OAAO,MAAM,OAAO,UAAU;GACvD;GAEA,OAAO;EACT;EAEA,OAAO,UAAU,OAAO;CAC1B;AACF"}
|
|
1
|
+
{"version":3,"file":"css.cjs","names":["variableLengthProperties","conditions","getCondition","transformInterpolation","getColorSchemeVar","colorMix","isCSSToken","getVar","styles","isImportant","omitImportant","insertImportant"],"sources":["../../../../src/core/css/css.ts"],"sourcesContent":["import type { Dict } from \"../../utils\"\nimport type { Breakpoints, System, UsageTheme } from \"../system\"\nimport type { StyleConfig } from \"./config\"\nimport type { CSSObjectOrFunction } from \"./index.type\"\nimport type { StyleProperty, VariableLengthProperty } from \"./styles\"\nimport type { TransformOptions } from \"./utils\"\nimport {\n isArray,\n isObject,\n isString,\n isUndefined,\n merge,\n runIfFn,\n} from \"../../utils\"\nimport { getColorSchemeVar, getVar, transformInterpolation } from \"../system\"\nimport { colorMix } from \"./color-mix\"\nimport { conditions, getCondition } from \"./conditions\"\nimport { styles, variableLengthProperties } from \"./styles\"\nimport {\n insertImportant,\n isCSSToken,\n isImportant,\n omitImportant,\n} from \"./utils\"\n\nfunction isVariableLength(key: string): boolean {\n return variableLengthProperties.includes(key as VariableLengthProperty)\n}\n\nfunction isConditionalObject(breakpoints: Breakpoints) {\n return function (value: any): boolean {\n if (!isObject(value)) return false\n\n const keys = Object.keys(value)\n\n if (!keys.length) return false\n\n if (!keys.includes(\"base\")) return false\n\n return keys.every((key) => {\n return (\n breakpoints.isResponsiveKey(key) ||\n key.startsWith(\"@\") ||\n key.startsWith(\"_\")\n )\n })\n }\n}\n\nfunction transformColorModeArray(breakpoints: Breakpoints) {\n return function (key: string, [lightValue, darkValue]: any[]): Dict {\n let computedCSS: Dict = {}\n\n if (isConditionalObject(breakpoints)(lightValue))\n computedCSS = transformConditionalObject(breakpoints)(key, lightValue)\n else computedCSS[key] = lightValue\n\n if (isConditionalObject(breakpoints)(darkValue))\n computedCSS[conditions._dark] = transformConditionalObject(breakpoints)(\n key,\n darkValue,\n )\n else computedCSS[conditions._dark] = { [key]: darkValue }\n\n return computedCSS\n }\n}\n\nfunction transformConditionalObject(breakpoints: Breakpoints) {\n return function (key: string, value: Dict) {\n const conditionalKeys = Object.keys(value).filter(\n (key) => !breakpoints.isResponsiveKey(key),\n )\n\n const breakpointObj = breakpoints.queries.reduce<Dict>(\n (prev, { breakpoint, query }) => {\n const breakpointValue = value[breakpoint]\n\n if (!isUndefined(breakpointValue))\n if (isArray(breakpointValue)) {\n const colorModeValue = transformColorModeArray(breakpoints)(\n key,\n breakpointValue,\n )\n\n prev = merge(\n prev,\n query ? { [query]: colorModeValue } : colorModeValue,\n )\n } else if (isConditionalObject(breakpoints)(breakpointValue)) {\n const conditionalValue = transformConditionalObject(breakpoints)(\n key,\n breakpointValue,\n )\n\n prev = merge(\n prev,\n query ? { [query]: conditionalValue } : conditionalValue,\n )\n } else {\n prev = merge(\n prev,\n query\n ? { [query]: { [key]: breakpointValue } }\n : { [key]: breakpointValue },\n )\n }\n\n return prev\n },\n {},\n )\n\n const additionalObj = conditionalKeys.reduce<Dict>(\n (prev, conditionalKey) => {\n const query = getCondition(conditionalKey)\n\n prev[query] = { [key]: value[conditionalKey] }\n\n return prev\n },\n {},\n )\n\n return merge(breakpointObj, additionalObj)\n }\n}\n\nexport function transformConditionalValue({ breakpoints }: System) {\n return function (key: string, value: any) {\n if (isArray(value)) return transformColorModeArray(breakpoints)(key, value)\n else if (isConditionalObject(breakpoints)(value))\n return transformConditionalObject(breakpoints)(key, value)\n else return { [key]: value }\n }\n}\n\nfunction sortBreakpointQueries({ queries }: Breakpoints) {\n return function (css: Dict): Dict {\n const queryMap = new Map(\n queries.flatMap(({ query }) =>\n !isUndefined(query) && query in css ? [[query, css[query]]] : [],\n ),\n )\n const entries = queryMap.entries()\n\n return Object.fromEntries(\n Object.entries(css).map(([key, value]) =>\n queryMap.has(key) ? entries.next().value! : [key, value],\n ),\n )\n }\n}\n\nfunction expandCSS(system: System) {\n return function (css: Dict): Dict {\n let computedCSS: Dict = {}\n\n for (let [key, value] of Object.entries(css)) {\n if (value == null) continue\n\n if (!isVariableLength(key))\n computedCSS = merge(\n computedCSS,\n transformConditionalValue(system)(key, value),\n )\n else computedCSS = merge(computedCSS, { [key]: value })\n }\n\n return sortBreakpointQueries(system.breakpoints)(computedCSS)\n }\n}\n\nfunction valueToVar(system: System) {\n return function (prop: string, value: any) {\n const result = transformInterpolation(\n value,\n function (value: string, fallbackValue?: string) {\n if (value.includes(\"colorScheme.\")) {\n return getColorSchemeVar(system)(value)\n } else if (value.includes(\"colors.\")) {\n return colorMix(value, { fallback: fallbackValue, system })\n } else if (isCSSToken(system)(value)) {\n return system.cssMap[value]!.ref\n } else if (fallbackValue) {\n fallbackValue = isCSSToken(system)(fallbackValue)\n ? system.cssMap[fallbackValue]!.ref\n : fallbackValue\n\n return getVar(value, fallbackValue)\n } else {\n return getVar(value)\n }\n },\n )\n\n if (prop.startsWith(\"--\") && isString(result))\n if (result.includes(\"colorScheme.\"))\n return getColorSchemeVar(system)(result)\n else if (result.includes(\"colors.\")) return colorMix(result, { system })\n else if (isCSSToken(system)(result)) return system.cssMap[result]!.ref\n else return result\n else return result\n }\n}\n\nfunction mergeCSS(prev: Dict, value: any, prop: string, properties?: string[]) {\n if (properties) {\n for (const property of properties) {\n prev[property] = prev[property] ?? {}\n prev[property] = merge(prev[property], value)\n }\n } else {\n prev[prop] = prev[prop] ?? {}\n prev[prop] = merge(prev[prop], value)\n }\n\n return prev\n}\n\nfunction insertCSS(\n prev: Dict,\n value: any,\n prop: string,\n properties?: string[],\n) {\n if (properties) for (const property of properties) prev[property] = value\n else prev[prop] = value\n\n return prev\n}\n\nexport function getStyle(prop: string) {\n const style = styles[prop as StyleProperty] as StyleConfig | true | undefined\n\n return style === true ? { properties: [prop] } : style\n}\n\nexport function css(system: System, theme: UsageTheme = {}) {\n return function (cssOrFn: CSSObjectOrFunction) {\n function createCSS(cssOrFn: CSSObjectOrFunction): Dict {\n const cssObj = runIfFn(cssOrFn, system)\n const computedCSS = expandCSS(system)(cssObj)\n\n let prev: Dict = {}\n\n for (let [prop, value] of Object.entries(computedCSS)) {\n value = valueToVar(system)(prop, value)\n\n if (value == null) continue\n\n prop = getCondition(prop)\n\n const style = getStyle(prop)\n const options: TransformOptions = {\n css,\n prev,\n properties: style?.properties,\n system,\n theme,\n }\n\n if (isObject(value)) {\n value = style?.transform?.(value, options) ?? value\n\n if (isObject(value))\n prev = mergeCSS(prev, createCSS(value), prop, style?.properties)\n else prev = insertCSS(prev, value, prop, style?.properties)\n\n continue\n }\n\n const important = isImportant(value)\n\n value = omitImportant(value)\n value = style?.transform?.(value, options) ?? value\n\n if (important) value = insertImportant(value, style)\n\n if (style?.static) prev = merge(prev, style.static)\n\n if (isObject(value)) {\n prev = merge(prev, createCSS(value))\n\n continue\n }\n\n prev = insertCSS(prev, value, prop, style?.properties)\n }\n\n return prev\n }\n\n return createCSS(cssOrFn)\n }\n}\n"],"mappings":";;;;;;;AAyBA,SAAS,iBAAiB,KAAsB;CAC9C,OAAOA,eAAAA,yBAAyB,SAAS,GAA6B;AACxE;AAEA,SAAS,oBAAoB,aAA0B;CACrD,OAAO,SAAU,OAAqB;EACpC,IAAI,EAAA,GAAA,oBAAA,cAAC,SAAA,CAAS,KAAK,GAAG,OAAO;EAE7B,MAAM,OAAO,OAAO,KAAK,KAAK;EAE9B,IAAI,CAAC,KAAK,QAAQ,O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AAS,KAAK,GAAG;KACnB,QAAQ,OAAO,YAAY,OAAO,OAAO,KAAK;KAE9C,KAAA,GAAA,oBAAA,cAAI,SAAA,CAAS,KAAK,GAChB,OAAO,SAAS,MAAM,UAAU,KAAK,GAAG,MAAM,OAAO,UAAU;UAC5D,OAAO,UAAU,MAAM,OAAO,MAAM,OAAO,UAAU;KAE1D;IACF;IAEA,MAAM,YAAYO,cAAAA,YAAY,KAAK;IAEnC,QAAQC,cAAAA,cAAc,KAAK;IAC3B,QAAQ,OAAO,YAAY,OAAO,OAAO,KAAK;IAE9C,IAAI,WAAW,QAAQC,cAAAA,gBAAgB,OAAO,KAAK;IAEnD,IAAI,OAAO,QAAQ,QAAA,GAAA,oBAAA,cAAO,MAAA,CAAM,MAAM,MAAM,MAAM;IAElD,KAAA,GAAA,oBAAA,cAAI,SAAA,CAAS,KAAK,GAAG;KACnB,QAAA,GAAA,oBAAA,cAAO,MAAA,CAAM,MAAM,UAAU,KAAK,CAAC;KAEnC;IACF;IAEA,OAAO,UAAU,MAAM,OAAO,MAAM,OAAO,UAAU;GACvD;GAEA,OAAO;EACT;EAEA,OAAO,UAAU,OAAO;CAC1B;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.style.js","names":[],"sources":["../../../../src/components/checkbox/checkbox.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const checkboxStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n bg: \"{indicator-bg}\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-bg\": \"transparent\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'rounded'\n */\n shape: {\n rounded: {\n indicator: { rounded: \"l1\" },\n },\n square: {\n indicator: { rounded: \"0\" },\n },\n },\n },\n\n variants: {\n outline: {\n indicator: { color: \"colorScheme.outline\" },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.outline\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.outline\" },\n },\n },\n solid: {\n indicator: {\n color: \"colorScheme.contrast\",\n _checked: { bg: \"colorScheme.solid\" },\n _indeterminate: { bg: \"colorScheme.solid\" },\n },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.solid\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.solid\" },\n },\n },\n subtle: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { fontSize: \"xs\" },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { fontSize: \"sm\" },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { fontSize: \"md\" },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"rounded\",\n },\n})\n\nexport type CheckboxStyle = typeof checkboxStyle\n"],"mappings":";;;AAEA,MAAa,gBAAgB,yBAAyB;CACpD,MAAM;EACJ,OAAO,CAAC;EACR,WAAW;GACT,YAAY;GACZ,IAAI;GACJ,aAAa;GACb,aAAa;GACb,SAAS;GACT,SAAS;GACT,gBAAgB;GAChB,2BAA2B,eAAe;GAC1C,gBAAgB;GAChB,YAAY;IACV;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAgC;IAC5D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAsC;GACpE;GACA,UAAU;IACR,aAAa;IACb,gBAAgB;GAClB;EACF;EACA,OAAO,CAAC;EACR,MAAM;GACJ,wBAAwB;GACxB,wBAAwB;GACxB,kBAAkB;GAClB,4BAA4B;GAC5B,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,YAAY;GACZ,WAAW,EAAE,YAAY,WAAW;GACpC,WAAW,EAAE,YAAY,WAAW;EACtC;CACF;CAEA,OAAO;;;;;;AAML,OAAO;EACL,SAAS,EACP,WAAW,EAAE,SAAS,KAAK,EAC7B;EACA,QAAQ,EACN,WAAW,EAAE,SAAS,IAAI,EAC5B;CACF,EACF;CAEA,UAAU;EACR,SAAS;GACP,WAAW,EAAE,OAAO,sBAAsB;GAC1C,MAAM;IACJ,UAAU,EAAE,4BAA4B,sBAAsB;IAC9D,gBAAgB,EAAE,4BAA4B,sBAAsB;GACtE;EACF;EACA,OAAO;GACL,WAAW;IACT,OAAO;IACP,UAAU,EAAE,IAAI,oBAAoB;IACpC,gBAAgB,EAAE,IAAI,oBAAoB;GAC5C;GACA,MAAM;IACJ,UAAU,EAAE,4BAA4B,oBAAoB;IAC5D,gBAAgB,EAAE,4BAA4B,oBAAoB;GACpE;EACF;EACA,QAAQ;GACN,WAAW;IAAE,IAAI;IAAsB,OAAO;GAAiB;GAC/D,MAAM,EAAE,4BAA4B,cAAc;EACpD;EACA,SAAS;GACP,WAAW;IAAE,IAAI;IAAsB,OAAO;GAAiB;GAC/D,MAAM,EAAE,4BAA4B,oBAAoB;EAC1D;CACF;CAEA,OAAO;EACL,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAa,gBAAgB;GAAe;EAC1E;EACA,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;EACA,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"checkbox.style.js","names":[],"sources":["../../../../src/components/checkbox/checkbox.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const checkboxStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n bg: \"{indicator-bg}\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-bg\": \"transparent\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n position: \"relative\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'rounded'\n */\n shape: {\n rounded: {\n indicator: { rounded: \"l1\" },\n },\n square: {\n indicator: { rounded: \"0\" },\n },\n },\n },\n\n variants: {\n outline: {\n indicator: { color: \"colorScheme.outline\" },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.outline\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.outline\" },\n },\n },\n solid: {\n indicator: {\n color: \"colorScheme.contrast\",\n _checked: { bg: \"colorScheme.solid\" },\n _indeterminate: { bg: \"colorScheme.solid\" },\n },\n root: {\n _checked: { \"--indicator-border-color\": \"colorScheme.solid\" },\n _indeterminate: { \"--indicator-border-color\": \"colorScheme.solid\" },\n },\n },\n subtle: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\", color: \"colorScheme.fg\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { fontSize: \"xs\" },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { fontSize: \"sm\" },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { fontSize: \"md\" },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"rounded\",\n },\n})\n\nexport type CheckboxStyle = typeof checkboxStyle\n"],"mappings":";;;AAEA,MAAa,gBAAgB,yBAAyB;CACpD,MAAM;EACJ,OAAO,CAAC;EACR,WAAW;GACT,YAAY;GACZ,IAAI;GACJ,aAAa;GACb,aAAa;GACb,SAAS;GACT,SAAS;GACT,gBAAgB;GAChB,2BAA2B,eAAe;GAC1C,gBAAgB;GAChB,YAAY;IACV;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAgC;IAC5D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAmC;IAC/D;KAAE,KAAK,EAAE,IAAI,KAAK;KAAG,OAAO;IAAsC;GACpE;GACA,UAAU;IACR,aAAa;IACb,gBAAgB;GAClB;EACF;EACA,OAAO,CAAC;EACR,MAAM;GACJ,wBAAwB;GACxB,wBAAwB;GACxB,kBAAkB;GAClB,4BAA4B;GAC5B,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,UAAU;GACV,YAAY;GACZ,WAAW,EAAE,YAAY,WAAW;GACpC,WAAW,EAAE,YAAY,WAAW;EACtC;CACF;CAEA,OAAO;;;;;;AAML,OAAO;EACL,SAAS,EACP,WAAW,EAAE,SAAS,KAAK,EAC7B;EACA,QAAQ,EACN,WAAW,EAAE,SAAS,IAAI,EAC5B;CACF,EACF;CAEA,UAAU;EACR,SAAS;GACP,WAAW,EAAE,OAAO,sBAAsB;GAC1C,MAAM;IACJ,UAAU,EAAE,4BAA4B,sBAAsB;IAC9D,gBAAgB,EAAE,4BAA4B,sBAAsB;GACtE;EACF;EACA,OAAO;GACL,WAAW;IACT,OAAO;IACP,UAAU,EAAE,IAAI,oBAAoB;IACpC,gBAAgB,EAAE,IAAI,oBAAoB;GAC5C;GACA,MAAM;IACJ,UAAU,EAAE,4BAA4B,oBAAoB;IAC5D,gBAAgB,EAAE,4BAA4B,oBAAoB;GACpE;EACF;EACA,QAAQ;GACN,WAAW;IAAE,IAAI;IAAsB,OAAO;GAAiB;GAC/D,MAAM,EAAE,4BAA4B,cAAc;EACpD;EACA,SAAS;GACP,WAAW;IAAE,IAAI;IAAsB,OAAO;GAAiB;GAC/D,MAAM,EAAE,4BAA4B,oBAAoB;EAC1D;CACF;CAEA,OAAO;EACL,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAa,gBAAgB;GAAe;EAC1E;EACA,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;EACA,IAAI;GACF,WAAW,EAAE,UAAU,KAAK;GAC5B,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.style.js","names":[],"sources":["../../../../src/components/radio/radio.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const radioStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n bg: \"{indicator-bg}\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _before: { display: \"block\" },\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-bg\": \"transparent\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'circle'\n */\n shape: {\n circle: { indicator: { rounded: \"full\", _before: { rounded: \"full\" } } },\n rounded: {\n indicator: {\n rounded: \"l1\",\n _before: { rounded: \"calc({radii.l1} / 2)\" },\n },\n },\n square: {\n indicator: { rounded: \"0\", _before: { rounded: \"0\" } },\n },\n },\n },\n\n variants: {\n base: {\n indicator: { _checked: { _before: { bg: \"colorScheme.solid\" } } },\n },\n outline: {\n indicator: { _checked: { _before: { bg: \"colorScheme.outline\" } } },\n root: { _checked: { \"--indicator-border-color\": \"colorScheme.outline\" } },\n },\n solid: {},\n subtle: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { _before: { boxSize: \"1.5\" } },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { _before: { boxSize: \"2\" } },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { _before: { boxSize: \"3\" } },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"circle\",\n },\n})\n\nexport type RadioStyle = typeof radio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AAE;EAC1E;EACA,OAAO,CAAC;EACR,QAAQ;GACN,WAAW,EAAE,IAAI,qBAAqB;GACtC,MAAM,EAAE,4BAA4B,cAAc;EACpD;EACA,SAAS;GACP,WAAW,EAAE,IAAI,qBAAqB;GACtC,MAAM,EAAE,4BAA4B,oBAAoB;EAC1D;CACF;CAEA,OAAO;EACL,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE;GACzC,MAAM;IAAE,oBAAoB;IAAa,gBAAgB;GAAe;EAC1E;EACA,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE;GACvC,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;EACA,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE;GACvC,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"radio.style.js","names":[],"sources":["../../../../src/components/radio/radio.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const radioStyle = defineComponentSlotStyle({\n base: {\n group: {},\n indicator: {\n alignItems: \"center\",\n bg: \"{indicator-bg}\",\n borderColor: \"{indicator-border-color}\",\n borderWidth: \"2px\",\n boxSize: \"{indicator-size}\",\n display: \"inline-flex\",\n focusRingColor: \"{focus-border-color}\",\n \"input:focus-visible + &\": focusRingStyle.outline,\n justifyContent: \"center\",\n _before: { display: \"block\" },\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n label: {},\n root: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n \"--indicator-bg\": \"transparent\",\n \"--indicator-border-color\": \"colors.border.emphasized\",\n alignItems: \"center\",\n display: \"flex\",\n fontSize: \"{label-size}\",\n gap: \"2\",\n position: \"relative\",\n userSelect: \"none\",\n _readOnly: { layerStyle: \"readOnly\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n },\n\n props: {\n /**\n * The shape of the component\n *\n * @default 'circle'\n */\n shape: {\n circle: { indicator: { rounded: \"full\", _before: { rounded: \"full\" } } },\n rounded: {\n indicator: {\n rounded: \"l1\",\n _before: { rounded: \"calc({radii.l1} / 2)\" },\n },\n },\n square: {\n indicator: { rounded: \"0\", _before: { rounded: \"0\" } },\n },\n },\n },\n\n variants: {\n base: {\n indicator: { _checked: { _before: { bg: \"colorScheme.solid\" } } },\n },\n outline: {\n indicator: { _checked: { _before: { bg: \"colorScheme.outline\" } } },\n root: { _checked: { \"--indicator-border-color\": \"colorScheme.outline\" } },\n },\n solid: {},\n subtle: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"transparent\" },\n },\n surface: {\n indicator: { bg: \"colorScheme.subtle\" },\n root: { \"--indicator-border-color\": \"colorScheme.muted\" },\n },\n },\n\n sizes: {\n sm: {\n indicator: { _before: { boxSize: \"1.5\" } },\n root: { \"--indicator-size\": \"sizes.3.5\", \"--label-size\": \"fontSizes.sm\" },\n },\n md: {\n indicator: { _before: { boxSize: \"2\" } },\n root: { \"--indicator-size\": \"sizes.4\", \"--label-size\": \"fontSizes.md\" },\n },\n lg: {\n indicator: { _before: { boxSize: \"3\" } },\n root: { \"--indicator-size\": \"sizes.5\", \"--label-size\": \"fontSizes.lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"solid\",\n shape: \"circle\",\n },\n})\n\nexport type RadioStyle = typeof radioStyle\n"],"mappings":";;;AAEA,MAAa,aAAa,yBAAy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R,QAAQ;GACN,WAAW,EAAE,IAAI,qBAAqB;GACtC,MAAM,EAAE,4BAA4B,cAAc;EACpD;EACA,SAAS;GACP,WAAW,EAAE,IAAI,qBAAqB;GACtC,MAAM,EAAE,4BAA4B,oBAAoB;EAC1D;CACF;CAEA,OAAO;EACL,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE;GACzC,MAAM;IAAE,oBAAoB;IAAa,gBAAgB;GAAe;EAC1E;EACA,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE;GACvC,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;EACA,IAAI;GACF,WAAW,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE;GACvC,MAAM;IAAE,oBAAoB;IAAW,gBAAgB;GAAe;EACxE;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.style.js","names":[],"sources":["../../../../src/components/switch/switch.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const switchStyle = defineComponentSlotStyle({\n base: {\n label: {\n userSelect: \"none\",\n },\n root: {\n alignItems: \"center\",\n cursor: \"pointer\",\n display: \"inline-flex\",\n gap: \"2\",\n _readOnly: {\n layerStyle: \"readOnly\",\n pointerEvents: \"none\",\n },\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n thumb: {\n alignItems: \"center\",\n bg: \"white\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n position: \"absolute\",\n rounded: \"inherit\",\n transitionDuration: \"fast\",\n transitionProperty: \"background, transform\",\n _checked: {\n transform: \"translateX(100%)\",\n },\n },\n track: {\n \"--focus-ring-color\": \"{colorScheme.outline}\",\n alignItems: \"center\",\n bg: \"bg.muted\",\n boxSizing: \"content-box\",\n display: \"inline-flex\",\n flexShrink: 0,\n position: \"relative\",\n rounded: \"full\",\n transitionDuration: \"fast\",\n transitionProperty: \"background\",\n _peerFocusVisible: {\n ...focusRingStyle.outline,\n },\n },\n },\n\n variants: {\n thin: {\n thumb: {\n boxShadow: \"2xl\",\n _checked: {\n bg: \"colorScheme.solid\",\n },\n },\n track: {\n \"--focus-ring-offset\": \"4px\",\n _checked: {\n bg: [\"colorScheme.muted\", \"colorScheme.subtle\"],\n },\n },\n },\n thick: {\n thumb: {\n _checked: {\n bg: \"colorScheme.contrast\",\n },\n },\n track: {\n p: \"1\",\n _checked: {\n bg: \"colorScheme.solid\",\n },\n },\n },\n },\n\n sizes: {\n sm: {\n label: { fontSize: \"sm\" },\n thumb: { boxSize: \"3\" },\n track: { w: \"6\" },\n },\n md: {\n label: { fontSize: \"md\" },\n thumb: { boxSize: \"4\" },\n track: { w: \"8\" },\n },\n lg: {\n label: { fontSize: \"lg\" },\n thumb: { boxSize: \"5\" },\n track: { w: \"10\" },\n },\n },\n\n props: {\n /**\n * Change switch label from right to left.\n *\n * @default false\n */\n reverse: {\n false: {\n root: { flexDirection: \"row\" },\n },\n true: {\n root: { flexDirection: \"row-reverse\" },\n },\n },\n /**\n * The shape of the switch.\n *\n * @default circle\n */\n shape: {\n circle: {\n track: { rounded: \"full\" },\n },\n rounded: {\n thumb: { rounded: \"l1\" },\n track: { rounded: \"l2\" },\n },\n square: {\n track: { rounded: \"0\" },\n },\n },\n },\n\n compounds: [\n {\n css: {\n track: { h: \"3\" },\n },\n size: \"sm\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"4\" },\n },\n size: \"md\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"5\" },\n },\n size: \"lg\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"2\" },\n },\n size: \"sm\",\n variant: \"thin\",\n },\n {\n css: {\n track: { h: \"3\" },\n },\n size: \"md\",\n variant: \"thin\",\n },\n {\n css: {\n track: { h: \"4\" },\n },\n size: \"lg\",\n variant: \"thin\",\n },\n ],\n\n defaultProps: {\n size: \"md\",\n variant: \"thick\",\n shape: \"circle\",\n },\n})\n\nexport type SwitchStyle = typeof switchStyle\n"],"mappings":";;;AAEA,MAAa,cAAc,yBAAyB;CAClD,MAAM;EACJ,OAAO,EACL,YAAY,OACd;EACA,MAAM;GACJ,YAAY;GACZ,QAAQ;GACR,SAAS;GACT,KAAK;GACL,WAAW;IACT,YAAY;IACZ,eAAe;GACjB;GACA,WAAW,EACT,YAAY,WACd;EACF;EACA,OAAO;GACL,YAAY;GACZ,IAAI;GACJ,SAAS;GACT,gBAAgB;GAChB,UAAU;GACV,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,UAAU,EACR,WAAW,mBACb;EACF;EACA,OAAO;GACL,sBAAsB;GACtB,YAAY;GACZ,IAAI;GACJ,WAAW;GACX,SAAS;GACT,YAAY;GACZ,UAAU;GACV,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,mBAAmB,EACjB,GAAG,eAAe,QACpB;EACF;CACF;CAEA,UAAU;EACR,MAAM;GACJ,OAAO;IACL,WAAW;IACX,UAAU,EACR,IAAI,oBACN;GACF;GACA,OAAO;IACL,uBAAuB;IACvB,UAAU,EACR,IAAI,CAAC,qBAAqB,oBAAoB,EAChD;GACF;EACF;EACA,OAAO;GACL,OAAO,EACL,UAAU,EACR,IAAI,uBACN,EACF;GACA,OAAO;IACL,GAAG;IACH,UAAU,EACR,IAAI,oBACN;GACF;EACF;CACF;CAEA,OAAO;EACL,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,IAAI;EAClB;EACA,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,IAAI;EAClB;EACA,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,KAAK;EACnB;CACF;CAEA,OAAO;;;;;;EAML,SAAS;GACP,OAAO,EACL,MAAM,EAAE,eAAe,MAAM,EAC/B;GACA,MAAM,EACJ,MAAM,EAAE,eAAe,cAAc,EACvC;EACF;;;;;;EAMA,OAAO;GACL,QAAQ,EACN,OAAO,EAAE,SAAS,OAAO,EAC3B;GACA,SAAS;IACP,OAAO,EAAE,SAAS,KAAK;IACvB,OAAO,EAAE,SAAS,KAAK;GACzB;GACA,QAAQ,EACN,OAAO,EAAE,SAAS,IAAI,EACxB;EACF;CACF;CAEA,WAAW;EACT;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"switch.style.js","names":[],"sources":["../../../../src/components/switch/switch.style.ts"],"sourcesContent":["import { defineComponentSlotStyle, focusRingStyle } from \"../../core\"\n\nexport const switchStyle = defineComponentSlotStyle({\n base: {\n label: {\n userSelect: \"none\",\n },\n root: {\n alignItems: \"center\",\n cursor: \"pointer\",\n display: \"inline-flex\",\n gap: \"2\",\n position: \"relative\",\n _readOnly: {\n layerStyle: \"readOnly\",\n pointerEvents: \"none\",\n },\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n thumb: {\n alignItems: \"center\",\n bg: \"white\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n position: \"absolute\",\n rounded: \"inherit\",\n transitionDuration: \"fast\",\n transitionProperty: \"background, transform\",\n _checked: {\n transform: \"translateX(100%)\",\n },\n },\n track: {\n \"--focus-ring-color\": \"{colorScheme.outline}\",\n alignItems: \"center\",\n bg: \"bg.muted\",\n boxSizing: \"content-box\",\n display: \"inline-flex\",\n flexShrink: 0,\n position: \"relative\",\n rounded: \"full\",\n transitionDuration: \"fast\",\n transitionProperty: \"background\",\n _peerFocusVisible: {\n ...focusRingStyle.outline,\n },\n },\n },\n\n variants: {\n thin: {\n thumb: {\n boxShadow: \"2xl\",\n _checked: {\n bg: \"colorScheme.solid\",\n },\n },\n track: {\n \"--focus-ring-offset\": \"4px\",\n _checked: {\n bg: [\"colorScheme.muted\", \"colorScheme.subtle\"],\n },\n },\n },\n thick: {\n thumb: {\n _checked: {\n bg: \"colorScheme.contrast\",\n },\n },\n track: {\n p: \"1\",\n _checked: {\n bg: \"colorScheme.solid\",\n },\n },\n },\n },\n\n sizes: {\n sm: {\n label: { fontSize: \"sm\" },\n thumb: { boxSize: \"3\" },\n track: { w: \"6\" },\n },\n md: {\n label: { fontSize: \"md\" },\n thumb: { boxSize: \"4\" },\n track: { w: \"8\" },\n },\n lg: {\n label: { fontSize: \"lg\" },\n thumb: { boxSize: \"5\" },\n track: { w: \"10\" },\n },\n },\n\n props: {\n /**\n * Change switch label from right to left.\n *\n * @default false\n */\n reverse: {\n false: {\n root: { flexDirection: \"row\" },\n },\n true: {\n root: { flexDirection: \"row-reverse\" },\n },\n },\n /**\n * The shape of the switch.\n *\n * @default circle\n */\n shape: {\n circle: {\n track: { rounded: \"full\" },\n },\n rounded: {\n thumb: { rounded: \"l1\" },\n track: { rounded: \"l2\" },\n },\n square: {\n track: { rounded: \"0\" },\n },\n },\n },\n\n compounds: [\n {\n css: {\n track: { h: \"3\" },\n },\n size: \"sm\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"4\" },\n },\n size: \"md\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"5\" },\n },\n size: \"lg\",\n variant: \"thick\",\n },\n {\n css: {\n track: { h: \"2\" },\n },\n size: \"sm\",\n variant: \"thin\",\n },\n {\n css: {\n track: { h: \"3\" },\n },\n size: \"md\",\n variant: \"thin\",\n },\n {\n css: {\n track: { h: \"4\" },\n },\n size: \"lg\",\n variant: \"thin\",\n },\n ],\n\n defaultProps: {\n size: \"md\",\n variant: \"thick\",\n shape: \"circle\",\n },\n})\n\nexport type SwitchStyle = typeof switchStyle\n"],"mappings":";;;AAEA,MAAa,cAAc,yBAAyB;CAClD,MAAM;EACJ,OAAO,EACL,YAAY,OACd;EACA,MAAM;GACJ,YAAY;GACZ,QAAQ;GACR,SAAS;GACT,KAAK;GACL,UAAU;GACV,WAAW;IACT,YAAY;IACZ,eAAe;GACjB;GACA,WAAW,EACT,YAAY,WACd;EACF;EACA,OAAO;GACL,YAAY;GACZ,IAAI;GACJ,SAAS;GACT,gBAAgB;GAChB,UAAU;GACV,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,UAAU,EACR,WAAW,mBACb;EACF;EACA,OAAO;GACL,sBAAsB;GACtB,YAAY;GACZ,IAAI;GACJ,WAAW;GACX,SAAS;GACT,YAAY;GACZ,UAAU;GACV,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,mBAAmB,EACjB,GAAG,eAAe,QACpB;EACF;CACF;CAEA,UAAU;EACR,MAAM;GACJ,OAAO;IACL,WAAW;IACX,UAAU,EACR,IAAI,oBACN;GACF;GACA,OAAO;IACL,uBAAuB;IACvB,UAAU,EACR,IAAI,CAAC,qBAAqB,oBAAoB,EAChD;GACF;EACF;EACA,OAAO;GACL,OAAO,EACL,UAAU,EACR,IAAI,uBACN,EACF;GACA,OAAO;IACL,GAAG;IACH,UAAU,EACR,IAAI,oBACN;GACF;EACF;CACF;CAEA,OAAO;EACL,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,IAAI;EAClB;EACA,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,IAAI;EAClB;EACA,IAAI;GACF,OAAO,EAAE,UAAU,KAAK;GACxB,OAAO,EAAE,SAAS,IAAI;GACtB,OAAO,EAAE,GAAG,KAAK;EACnB;CACF;CAEA,OAAO;;;;;;EAML,SAAS;GACP,OAAO,EACL,MAAM,EAAE,eAAe,MAAM,EAC/B;GACA,MAAM,EACJ,MAAM,EAAE,eAAe,cAAc,EACvC;EACF;;;;;;EAMA,OAAO;GACL,QAAQ,EACN,OAAO,EAAE,SAAS,OAAO,EAC3B;GACA,SAAS;IACP,OAAO,EAAE,SAAS,KAAK;IACvB,OAAO,EAAE,SAAS,KAAK;GACzB;GACA,QAAQ,EACN,OAAO,EAAE,SAAS,IAAI,EACxB;EACF;CACF;CAEA,WAAW;EACT;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;EACA;GACE,KAAK,EACH,OAAO,EAAE,GAAG,IAAI,EAClB;GACA,MAAM;GACN,SAAS;EACX;CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;EACT,OAAO;CACT;AACF,CAAC"}
|
package/dist/esm/core/css/css.js
CHANGED
|
@@ -58,6 +58,13 @@ function transformConditionalValue({ breakpoints }) {
|
|
|
58
58
|
else return { [key]: value };
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
+
function sortBreakpointQueries({ queries }) {
|
|
62
|
+
return function(css) {
|
|
63
|
+
const queryMap = new Map(queries.flatMap(({ query }) => !(0, utils_exports.isUndefined)(query) && query in css ? [[query, css[query]]] : []));
|
|
64
|
+
const entries = queryMap.entries();
|
|
65
|
+
return Object.fromEntries(Object.entries(css).map(([key, value]) => queryMap.has(key) ? entries.next().value : [key, value]));
|
|
66
|
+
};
|
|
67
|
+
}
|
|
61
68
|
function expandCSS(system) {
|
|
62
69
|
return function(css) {
|
|
63
70
|
let computedCSS = {};
|
|
@@ -66,7 +73,7 @@ function expandCSS(system) {
|
|
|
66
73
|
if (!isVariableLength(key)) computedCSS = (0, utils_exports.merge)(computedCSS, transformConditionalValue(system)(key, value));
|
|
67
74
|
else computedCSS = (0, utils_exports.merge)(computedCSS, { [key]: value });
|
|
68
75
|
}
|
|
69
|
-
return computedCSS;
|
|
76
|
+
return sortBreakpointQueries(system.breakpoints)(computedCSS);
|
|
70
77
|
};
|
|
71
78
|
}
|
|
72
79
|
function valueToVar(system) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":["isObject","isUndefined","isArray","merge","isString","runIfFn"],"sources":["../../../../src/core/css/css.ts"],"sourcesContent":["import type { Dict } from \"../../utils\"\nimport type { Breakpoints, System, UsageTheme } from \"../system\"\nimport type { StyleConfig } from \"./config\"\nimport type { CSSObjectOrFunction } from \"./index.type\"\nimport type { StyleProperty, VariableLengthProperty } from \"./styles\"\nimport type { TransformOptions } from \"./utils\"\nimport {\n isArray,\n isObject,\n isString,\n isUndefined,\n merge,\n runIfFn,\n} from \"../../utils\"\nimport { getColorSchemeVar, getVar, transformInterpolation } from \"../system\"\nimport { colorMix } from \"./color-mix\"\nimport { conditions, getCondition } from \"./conditions\"\nimport { styles, variableLengthProperties } from \"./styles\"\nimport {\n insertImportant,\n isCSSToken,\n isImportant,\n omitImportant,\n} from \"./utils\"\n\nfunction isVariableLength(key: string): boolean {\n return variableLengthProperties.includes(key as VariableLengthProperty)\n}\n\nfunction isConditionalObject(breakpoints: Breakpoints) {\n return function (value: any): boolean {\n if (!isObject(value)) return false\n\n const keys = Object.keys(value)\n\n if (!keys.length) return false\n\n if (!keys.includes(\"base\")) return false\n\n return keys.every((key) => {\n return (\n breakpoints.isResponsiveKey(key) ||\n key.startsWith(\"@\") ||\n key.startsWith(\"_\")\n )\n })\n }\n}\n\nfunction transformColorModeArray(breakpoints: Breakpoints) {\n return function (key: string, [lightValue, darkValue]: any[]): Dict {\n let computedCSS: Dict = {}\n\n if (isConditionalObject(breakpoints)(lightValue))\n computedCSS = transformConditionalObject(breakpoints)(key, lightValue)\n else computedCSS[key] = lightValue\n\n if (isConditionalObject(breakpoints)(darkValue))\n computedCSS[conditions._dark] = transformConditionalObject(breakpoints)(\n key,\n darkValue,\n )\n else computedCSS[conditions._dark] = { [key]: darkValue }\n\n return computedCSS\n }\n}\n\nfunction transformConditionalObject(breakpoints: Breakpoints) {\n return function (key: string, value: Dict) {\n const conditionalKeys = Object.keys(value).filter(\n (key) => !breakpoints.isResponsiveKey(key),\n )\n\n const breakpointObj = breakpoints.queries.reduce<Dict>(\n (prev, { breakpoint, query }) => {\n const breakpointValue = value[breakpoint]\n\n if (!isUndefined(breakpointValue))\n if (isArray(breakpointValue)) {\n const colorModeValue = transformColorModeArray(breakpoints)(\n key,\n breakpointValue,\n )\n\n prev = merge(\n prev,\n query ? { [query]: colorModeValue } : colorModeValue,\n )\n } else if (isConditionalObject(breakpoints)(breakpointValue)) {\n const conditionalValue = transformConditionalObject(breakpoints)(\n key,\n breakpointValue,\n )\n\n prev = merge(\n prev,\n query ? { [query]: conditionalValue } : conditionalValue,\n )\n } else {\n prev = merge(\n prev,\n query\n ? { [query]: { [key]: breakpointValue } }\n : { [key]: breakpointValue },\n )\n }\n\n return prev\n },\n {},\n )\n\n const additionalObj = conditionalKeys.reduce<Dict>(\n (prev, conditionalKey) => {\n const query = getCondition(conditionalKey)\n\n prev[query] = { [key]: value[conditionalKey] }\n\n return prev\n },\n {},\n )\n\n return merge(breakpointObj, additionalObj)\n }\n}\n\nexport function transformConditionalValue({ breakpoints }: System) {\n return function (key: string, value: any) {\n if (isArray(value)) return transformColorModeArray(breakpoints)(key, value)\n else if (isConditionalObject(breakpoints)(value))\n return transformConditionalObject(breakpoints)(key, value)\n else return { [key]: value }\n }\n}\n\nfunction expandCSS(system: System) {\n return function (css: Dict): Dict {\n let computedCSS: Dict = {}\n\n for (let [key, value] of Object.entries(css)) {\n if (value == null) continue\n\n if (!isVariableLength(key))\n computedCSS = merge(\n computedCSS,\n transformConditionalValue(system)(key, value),\n )\n else computedCSS = merge(computedCSS, { [key]: value })\n }\n\n return computedCSS\n }\n}\n\nfunction valueToVar(system: System) {\n return function (prop: string, value: any) {\n const result = transformInterpolation(\n value,\n function (value: string, fallbackValue?: string) {\n if (value.includes(\"colorScheme.\")) {\n return getColorSchemeVar(system)(value)\n } else if (value.includes(\"colors.\")) {\n return colorMix(value, { fallback: fallbackValue, system })\n } else if (isCSSToken(system)(value)) {\n return system.cssMap[value]!.ref\n } else if (fallbackValue) {\n fallbackValue = isCSSToken(system)(fallbackValue)\n ? system.cssMap[fallbackValue]!.ref\n : fallbackValue\n\n return getVar(value, fallbackValue)\n } else {\n return getVar(value)\n }\n },\n )\n\n if (prop.startsWith(\"--\") && isString(result))\n if (result.includes(\"colorScheme.\"))\n return getColorSchemeVar(system)(result)\n else if (result.includes(\"colors.\")) return colorMix(result, { system })\n else if (isCSSToken(system)(result)) return system.cssMap[result]!.ref\n else return result\n else return result\n }\n}\n\nfunction mergeCSS(prev: Dict, value: any, prop: string, properties?: string[]) {\n if (properties) {\n for (const property of properties) {\n prev[property] = prev[property] ?? {}\n prev[property] = merge(prev[property], value)\n }\n } else {\n prev[prop] = prev[prop] ?? {}\n prev[prop] = merge(prev[prop], value)\n }\n\n return prev\n}\n\nfunction insertCSS(\n prev: Dict,\n value: any,\n prop: string,\n properties?: string[],\n) {\n if (properties) for (const property of properties) prev[property] = value\n else prev[prop] = value\n\n return prev\n}\n\nexport function getStyle(prop: string) {\n const style = styles[prop as StyleProperty] as StyleConfig | true | undefined\n\n return style === true ? { properties: [prop] } : style\n}\n\nexport function css(system: System, theme: UsageTheme = {}) {\n return function (cssOrFn: CSSObjectOrFunction) {\n function createCSS(cssOrFn: CSSObjectOrFunction): Dict {\n const cssObj = runIfFn(cssOrFn, system)\n const computedCSS = expandCSS(system)(cssObj)\n\n let prev: Dict = {}\n\n for (let [prop, value] of Object.entries(computedCSS)) {\n value = valueToVar(system)(prop, value)\n\n if (value == null) continue\n\n prop = getCondition(prop)\n\n const style = getStyle(prop)\n const options: TransformOptions = {\n css,\n prev,\n properties: style?.properties,\n system,\n theme,\n }\n\n if (isObject(value)) {\n value = style?.transform?.(value, options) ?? value\n\n if (isObject(value))\n prev = mergeCSS(prev, createCSS(value), prop, style?.properties)\n else prev = insertCSS(prev, value, prop, style?.properties)\n\n continue\n }\n\n const important = isImportant(value)\n\n value = omitImportant(value)\n value = style?.transform?.(value, options) ?? value\n\n if (important) value = insertImportant(value, style)\n\n if (style?.static) prev = merge(prev, style.static)\n\n if (isObject(value)) {\n prev = merge(prev, createCSS(value))\n\n continue\n }\n\n prev = insertCSS(prev, value, prop, style?.properties)\n }\n\n return prev\n }\n\n return createCSS(cssOrFn)\n }\n}\n"],"mappings":";;;;;;;AAyBA,SAAS,iBAAiB,KAAsB;CAC9C,OAAO,yBAAyB,SAAS,GAA6B;AACxE;AAEA,SAAS,oBAAoB,aAA0B;CACrD,OAAO,SAAU,OAAqB;EACpC,IAAI,EAAA,GAACA,cAAAA,SAAAA,CAAS,KAAK,GAAG,OAAO;EAE7B,MAAM,OAAO,OAAO,KAAK,KAAK;EAE9B,IAAI,CAAC,KAAK,QAAQ,OAAO;EAEzB,IAAI,CAAC,KAAK,SAAS,MAAM,GAAG,OAAO;EAEnC,OAAO,KAAK,OAAO,QAAQ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fFn"],"sources":["../../../../src/core/css/css.ts"],"sourcesContent":["import type { Dict } from \"../../utils\"\nimport type { Breakpoints, System, UsageTheme } from \"../system\"\nimport type { StyleConfig } from \"./config\"\nimport type { CSSObjectOrFunction } from \"./index.type\"\nimport type { StyleProperty, VariableLengthProperty } from \"./styles\"\nimport type { TransformOptions } from \"./utils\"\nimport {\n isArray,\n isObject,\n isString,\n isUndefined,\n merge,\n runIfFn,\n} from \"../../utils\"\nimport { getColorSchemeVar, getVar, transformInterpolation } from \"../system\"\nimport { colorMix } from \"./color-mix\"\nimport { conditions, getCondition } from \"./conditions\"\nimport { styles, variableLengthProperties } from \"./styles\"\nimport {\n insertImportant,\n isCSSToken,\n isImportant,\n omitImportant,\n} from \"./utils\"\n\nfunction isVariableLength(key: string): boolean {\n return variableLengthProperties.includes(key as VariableLengthProperty)\n}\n\nfunction isConditionalObject(breakpoints: Breakpoints) {\n return function (value: any): boolean {\n if (!isObject(value)) return false\n\n const keys = Object.keys(value)\n\n if (!keys.length) return false\n\n if (!keys.includes(\"base\")) return false\n\n return keys.every((key) => {\n return (\n breakpoints.isResponsiveKey(key) ||\n key.startsWith(\"@\") ||\n key.startsWith(\"_\")\n )\n })\n }\n}\n\nfunction transformColorModeArray(breakpoints: Breakpoints) {\n return function (key: string, [lightValue, darkValue]: any[]): Dict {\n let computedCSS: Dict = {}\n\n if (isConditionalObject(breakpoints)(lightValue))\n computedCSS = transformConditionalObject(breakpoints)(key, lightValue)\n else computedCSS[key] = lightValue\n\n if (isConditionalObject(breakpoints)(darkValue))\n computedCSS[conditions._dark] = transformConditionalObject(breakpoints)(\n key,\n darkValue,\n )\n else computedCSS[conditions._dark] = { [key]: darkValue }\n\n return computedCSS\n }\n}\n\nfunction transformConditionalObject(breakpoints: Breakpoints) {\n return function (key: string, value: Dict) {\n const conditionalKeys = Object.keys(value).filter(\n (key) => !breakpoints.isResponsiveKey(key),\n )\n\n const breakpointObj = breakpoints.queries.reduce<Dict>(\n (prev, { breakpoint, query }) => {\n const breakpointValue = value[breakpoint]\n\n if (!isUndefined(breakpointValue))\n if (isArray(breakpointValue)) {\n const colorModeValue = transformColorModeArray(breakpoints)(\n key,\n breakpointValue,\n )\n\n prev = merge(\n prev,\n query ? { [query]: colorModeValue } : colorModeValue,\n )\n } else if (isConditionalObject(breakpoints)(breakpointValue)) {\n const conditionalValue = transformConditionalObject(breakpoints)(\n key,\n breakpointValue,\n )\n\n prev = merge(\n prev,\n query ? { [query]: conditionalValue } : conditionalValue,\n )\n } else {\n prev = merge(\n prev,\n query\n ? { [query]: { [key]: breakpointValue } }\n : { [key]: breakpointValue },\n )\n }\n\n return prev\n },\n {},\n )\n\n const additionalObj = conditionalKeys.reduce<Dict>(\n (prev, conditionalKey) => {\n const query = getCondition(conditionalKey)\n\n prev[query] = { [key]: value[conditionalKey] }\n\n return prev\n },\n {},\n )\n\n return merge(breakpointObj, additionalObj)\n }\n}\n\nexport function transformConditionalValue({ breakpoints }: System) {\n return function (key: string, value: any) {\n if (isArray(value)) return transformColorModeArray(breakpoints)(key, value)\n else if (isConditionalObject(breakpoints)(value))\n return transformConditionalObject(breakpoints)(key, value)\n else return { [key]: value }\n }\n}\n\nfunction sortBreakpointQueries({ queries }: Breakpoints) {\n return function (css: Dict): Dict {\n const queryMap = new Map(\n queries.flatMap(({ query }) =>\n !isUndefined(query) && query in css ? [[query, css[query]]] : [],\n ),\n )\n const entries = queryMap.entries()\n\n return Object.fromEntries(\n Object.entries(css).map(([key, value]) =>\n queryMap.has(key) ? entries.next().value! : [key, value],\n ),\n )\n }\n}\n\nfunction expandCSS(system: System) {\n return function (css: Dict): Dict {\n let computedCSS: Dict = {}\n\n for (let [key, value] of Object.entries(css)) {\n if (value == null) continue\n\n if (!isVariableLength(key))\n computedCSS = merge(\n computedCSS,\n transformConditionalValue(system)(key, value),\n )\n else computedCSS = merge(computedCSS, { [key]: value })\n }\n\n return sortBreakpointQueries(system.breakpoints)(computedCSS)\n }\n}\n\nfunction valueToVar(system: System) {\n return function (prop: string, value: any) {\n const result = transformInterpolation(\n value,\n function (value: string, fallbackValue?: string) {\n if (value.includes(\"colorScheme.\")) {\n return getColorSchemeVar(system)(value)\n } else if (value.includes(\"colors.\")) {\n return colorMix(value, { fallback: fallbackValue, system })\n } else if (isCSSToken(system)(value)) {\n return system.cssMap[value]!.ref\n } else if (fallbackValue) {\n fallbackValue = isCSSToken(system)(fallbackValue)\n ? system.cssMap[fallbackValue]!.ref\n : fallbackValue\n\n return getVar(value, fallbackValue)\n } else {\n return getVar(value)\n }\n },\n )\n\n if (prop.startsWith(\"--\") && isString(result))\n if (result.includes(\"colorScheme.\"))\n return getColorSchemeVar(system)(result)\n else if (result.includes(\"colors.\")) return colorMix(result, { system })\n else if (isCSSToken(system)(result)) return system.cssMap[result]!.ref\n else return result\n else return result\n }\n}\n\nfunction mergeCSS(prev: Dict, value: any, prop: string, properties?: string[]) {\n if (properties) {\n for (const property of properties) {\n prev[property] = prev[property] ?? {}\n prev[property] = merge(prev[property], value)\n }\n } else {\n prev[prop] = prev[prop] ?? {}\n prev[prop] = merge(prev[prop], value)\n }\n\n return prev\n}\n\nfunction insertCSS(\n prev: Dict,\n value: any,\n prop: string,\n properties?: string[],\n) {\n if (properties) for (const property of properties) prev[property] = value\n else prev[prop] = value\n\n return prev\n}\n\nexport function getStyle(prop: string) {\n const style = styles[prop as StyleProperty] as StyleConfig | true | undefined\n\n return style === true ? { properties: [prop] } : style\n}\n\nexport function css(system: System, theme: UsageTheme = {}) {\n return function (cssOrFn: CSSObjectOrFunction) {\n function createCSS(cssOrFn: CSSObjectOrFunction): Dict {\n const cssObj = runIfFn(cssOrFn, system)\n const computedCSS = expandCSS(system)(cssObj)\n\n let prev: Dict = {}\n\n for (let [prop, value] of Object.entries(computedCSS)) {\n value = valueToVar(system)(prop, value)\n\n if (value == null) continue\n\n prop = getCondition(prop)\n\n const style = getStyle(prop)\n const options: TransformOptions = {\n css,\n prev,\n properties: style?.properties,\n system,\n theme,\n }\n\n if (isObject(value)) {\n value = style?.transform?.(value, options) ?? value\n\n if (isObject(value))\n prev = mergeCSS(prev, createCSS(value), prop, style?.properties)\n else prev = insertCSS(prev, value, prop, style?.properties)\n\n continue\n }\n\n const important = isImportant(value)\n\n value = omitImportant(value)\n value = style?.transform?.(value, options) ?? value\n\n if (important) value = insertImportant(value, style)\n\n if (style?.static) prev = merge(prev, style.static)\n\n if (isObject(value)) {\n prev = merge(prev, createCSS(value))\n\n continue\n }\n\n prev = insertCSS(prev, value, prop, style?.properties)\n }\n\n return prev\n }\n\n return createCSS(cssOrFn)\n }\n}\n"],"mappings":";;;;;;;AAyBA,SAAS,iBAAiB,KAAsB;CAC9C,OAAO,yBAAyB,SAAS,GAA6B;AACxE;AAEA,SAAS,oBAAoB,aAA0B;CACrD,OAAO,SAAU,OAAqB;EACpC,IAAI,EAAA,GAACA,cAAAA,SAAAA,CAAS,KAAK,GAAG,OAAO;EAE7B,MAAM,OAAO,OAAO,KAAK,KAAK;EAE9B,IAAI,CAAC,KAAK,QAAQ,OAAO;EAEzB,IAAI,CAAC,KAAK,SAAS,MAAM,GAAG,OAAO;EAEnC,OAAO,KAAK,OAAO,QAAQ;GACzB,OACE,YAAY,gBAAgB,GAAG,KAC/B,IAAI,WAAW,GAAG,KAClB,IAAI,WAAW,GAAG;EAEtB,CAAC;CACH;AACF;AAEA,SAAS,wBAAwB,aAA0B;CACzD,OAAO,SAAU,KAAa,CAAC,YAAY,YAAyB;EAClE,IAAI,cAAoB,CAAC;EAEzB,IAAI,oBAAoB,WAAW,CAAC,CAAC,UAAU,GAC7C,cAAc,2BAA2B,WAAW,CAAC,CAAC,KAAK,UAAU;OAClE,YAAY,OAAO;EAExB,IAAI,oBAAoB,WAAW,CAAC,CAAC,SAAS,GAC5C,YAAY,WAAW,SAAS,2BAA2B,WAAW,CAAC,CACrE,KACA,SACF;OACG,YAAY,WAAW,SAAS,GAAG,MAAM,UAAU;EAExD,OAAO;CACT;AACF;AAEA,SAAS,2BAA2B,aAA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
3
|
"type": "module",
|
|
4
|
-
"version": "2.3.2-dev-
|
|
4
|
+
"version": "2.3.2-dev-20261104093107",
|
|
5
5
|
"description": "React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"yamada",
|