@scalar/components 0.35.0 → 0.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCardSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"names":[],"mappings":"AAsDA;;;;;;;;;;;GAWG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;cA0BJ,CAAC,KAAK,IAAgB,KAAK,GAAG;EAQxC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarCardSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"names":[],"mappings":"AAuEA;;;;;;;;;;;GAWG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;cA0BJ,CAAC,KAAK,IAAgB,KAAK,GAAG;EAQxC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCardSection.vue.js","names":["_sfc_main"],"sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card section component\n *\n * A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter\n *\n * @example\n * <ScalarCard>\n * ...\n * <ScalarCardSection>Content</ScalarCardSection>\n * ...\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('scalar-card-content flex overflow-auto')\">\n <slot />\n </div>\n</template>\n<style>\n/**\n * A plain section is a surface lifted off the card. The header and footer are sections too, but\n * they sit on the card itself, so they are left out here with `:where()` to keep every selector at\n * a single class: a theme or `customCss` rule on `.scalar-card-content` still wins.\n */\n.scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {\n background: var(--scalar-card-surface);\n /* The card's corner less its padding, so the two curves stay concentric. */\n border-radius: var(--scalar-radius-xl);\n box-shadow: var(--scalar-card-surface-shadow);\n}\n/* Two surfaces in a row keep the card's padding between them. */\n:where(.scalar-card-content:not(.scalar-card-header, .scalar-card-footer))\n + .scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {\n margin-top: 4px;\n}\n/* A theme that paints the header or footer gets corners that follow the surface between them. */\n:where(.scalar-card-header, .scalar-card-footer) {\n border-radius: var(--scalar-radius-xl);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarCardSection.vue.js","names":["_sfc_main"],"sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card section component\n *\n * A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter\n *\n * @example\n * <ScalarCard>\n * ...\n * <ScalarCardSection>Content</ScalarCardSection>\n * ...\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('scalar-card-content flex overflow-auto')\">\n <slot />\n </div>\n</template>\n<style>\n/**\n * A plain section is a surface lifted off the card. The header and footer are sections too, but\n * they sit on the card itself, so they are left out here with `:where()` to keep every selector at\n * a single class: a theme or `customCss` rule on `.scalar-card-content` still wins.\n */\n.scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {\n background: var(--scalar-card-surface);\n /* The card's corner less its padding, so the two curves stay concentric. */\n border-radius: var(--scalar-radius-xl);\n box-shadow: var(--scalar-card-surface-shadow);\n}\n/* Two surfaces in a row keep the card's padding between them. */\n:where(.scalar-card-content:not(.scalar-card-header, .scalar-card-footer))\n + .scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {\n margin-top: 4px;\n}\n/* A theme that paints the header or footer gets corners that follow the surface between them. */\n:where(.scalar-card-header, .scalar-card-footer) {\n border-radius: var(--scalar-radius-xl);\n}\n/*\n * A header or footer has the card's padding on its outer side only, so on its own its contents sit\n * 2px off center, toward the surface beside it. Moving it toward the card's edge by half that\n * padding centers it between the two, and the opposite margin keeps the card's height.\n *\n * The shift assumes the card's default 4px padding, so it is keyed on ScalarCard's p-1 class. A card\n * given p-0 loses that class in the class merge and its header and footer stay put. A card that only\n * overrides its vertical padding (py-*, pt-*, pb-*, or p-* behind a breakpoint or important\n * modifier) keeps p-1 and still shifts, so give its header and footer margin-block: 0. A header or\n * footer that is the card's only child has padding on both sides and is already centered.\n */\n:where(.scalar-card.p-1 > .scalar-card-header:first-child:not(:last-child)) {\n margin-block: -2px 2px;\n}\n:where(.scalar-card.p-1 > .scalar-card-footer:last-child:not(:first-child)) {\n margin-block: 2px -2px;\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCardSection.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_unref","_renderSlot"],"sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card section component\n *\n * A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter\n *\n * @example\n * <ScalarCard>\n * ...\n * <ScalarCardSection>Content</ScalarCardSection>\n * ...\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('scalar-card-content flex overflow-auto')\">\n <slot />\n </div>\n</template>\n<style>\n/**\n * A plain section is a surface lifted off the card. The header and footer are sections too, but\n * they sit on the card itself, so they are left out here with `:where()` to keep every selector at\n * a single class: a theme or `customCss` rule on `.scalar-card-content` still wins.\n */\n.scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {\n background: var(--scalar-card-surface);\n /* The card's corner less its padding, so the two curves stay concentric. */\n border-radius: var(--scalar-radius-xl);\n box-shadow: var(--scalar-card-surface-shadow);\n}\n/* Two surfaces in a row keep the card's padding between them. */\n:where(.scalar-card-content:not(.scalar-card-header, .scalar-card-footer))\n + .scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {\n margin-top: 4px;\n}\n/* A theme that paints the header or footer gets corners that follow the surface between them. */\n:where(.scalar-card-header, .scalar-card-footer) {\n border-radius: var(--scalar-radius-xl);\n}\n</style>\n"],"mappings":";;;;;;EAmBA,MAAM,EAAE,OAAO,UAAU;;GAGvB,OAAAA,UAAA,GAAAC,mBAEM,OAAAC,eAAAC,mBAFOC,MAAA,EAAA,CAAE,CAAA,wCAAA,CAAA,CAAA,GAAA,CACbC,WAAQ,KAAA,QAAA,SAAA,C"}
1
+ {"version":3,"file":"ScalarCardSection.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_unref","_renderSlot"],"sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card section component\n *\n * A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter\n *\n * @example\n * <ScalarCard>\n * ...\n * <ScalarCardSection>Content</ScalarCardSection>\n * ...\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('scalar-card-content flex overflow-auto')\">\n <slot />\n </div>\n</template>\n<style>\n/**\n * A plain section is a surface lifted off the card. The header and footer are sections too, but\n * they sit on the card itself, so they are left out here with `:where()` to keep every selector at\n * a single class: a theme or `customCss` rule on `.scalar-card-content` still wins.\n */\n.scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {\n background: var(--scalar-card-surface);\n /* The card's corner less its padding, so the two curves stay concentric. */\n border-radius: var(--scalar-radius-xl);\n box-shadow: var(--scalar-card-surface-shadow);\n}\n/* Two surfaces in a row keep the card's padding between them. */\n:where(.scalar-card-content:not(.scalar-card-header, .scalar-card-footer))\n + .scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {\n margin-top: 4px;\n}\n/* A theme that paints the header or footer gets corners that follow the surface between them. */\n:where(.scalar-card-header, .scalar-card-footer) {\n border-radius: var(--scalar-radius-xl);\n}\n/*\n * A header or footer has the card's padding on its outer side only, so on its own its contents sit\n * 2px off center, toward the surface beside it. Moving it toward the card's edge by half that\n * padding centers it between the two, and the opposite margin keeps the card's height.\n *\n * The shift assumes the card's default 4px padding, so it is keyed on ScalarCard's p-1 class. A card\n * given p-0 loses that class in the class merge and its header and footer stay put. A card that only\n * overrides its vertical padding (py-*, pt-*, pb-*, or p-* behind a breakpoint or important\n * modifier) keeps p-1 and still shifts, so give its header and footer margin-block: 0. A header or\n * footer that is the card's only child has padding on both sides and is already centered.\n */\n:where(.scalar-card.p-1 > .scalar-card-header:first-child:not(:last-child)) {\n margin-block: -2px 2px;\n}\n:where(.scalar-card.p-1 > .scalar-card-footer:last-child:not(:first-child)) {\n margin-block: 2px -2px;\n}\n</style>\n"],"mappings":";;;;;;EAmBA,MAAM,EAAE,OAAO,UAAU;;GAGvB,OAAAA,UAAA,GAAAC,mBAEM,OAAAC,eAAAC,mBAFOC,MAAA,EAAA,CAAE,CAAA,wCAAA,CAAA,CAAA,GAAA,CACbC,WAAQ,KAAA,QAAA,SAAA,C"}
package/dist/style.css CHANGED
@@ -3738,6 +3738,23 @@ to {
3738
3738
  :where(.scalar-card-header, .scalar-card-footer) {
3739
3739
  border-radius: var(--scalar-radius-xl);
3740
3740
  }
3741
+ /*
3742
+ * A header or footer has the card's padding on its outer side only, so on its own its contents sit
3743
+ * 2px off center, toward the surface beside it. Moving it toward the card's edge by half that
3744
+ * padding centers it between the two, and the opposite margin keeps the card's height.
3745
+ *
3746
+ * The shift assumes the card's default 4px padding, so it is keyed on ScalarCard's p-1 class. A card
3747
+ * given p-0 loses that class in the class merge and its header and footer stay put. A card that only
3748
+ * overrides its vertical padding (py-*, pt-*, pb-*, or p-* behind a breakpoint or important
3749
+ * modifier) keeps p-1 and still shifts, so give its header and footer margin-block: 0. A header or
3750
+ * footer that is the card's only child has padding on both sides and is already centered.
3751
+ */
3752
+ :where(.scalar-card.p-1 > .scalar-card-header:first-child:not(:last-child)) {
3753
+ margin-block: -2px 2px;
3754
+ }
3755
+ :where(.scalar-card.p-1 > .scalar-card-footer:last-child:not(:first-child)) {
3756
+ margin-block: 2px -2px;
3757
+ }
3741
3758
  /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
3742
3759
  :where(pre:has( > code.hljs)) {
3743
3760
  line-height: var(--scalar-code-line-height, 1.4);
@@ -147,6 +147,23 @@ to {
147
147
  :where(.scalar-card-header, .scalar-card-footer) {
148
148
  border-radius: var(--scalar-radius-xl);
149
149
  }
150
+ /*
151
+ * A header or footer has the card's padding on its outer side only, so on its own its contents sit
152
+ * 2px off center, toward the surface beside it. Moving it toward the card's edge by half that
153
+ * padding centers it between the two, and the opposite margin keeps the card's height.
154
+ *
155
+ * The shift assumes the card's default 4px padding, so it is keyed on ScalarCard's p-1 class. A card
156
+ * given p-0 loses that class in the class merge and its header and footer stay put. A card that only
157
+ * overrides its vertical padding (py-*, pt-*, pb-*, or p-* behind a breakpoint or important
158
+ * modifier) keeps p-1 and still shifts, so give its header and footer margin-block: 0. A header or
159
+ * footer that is the card's only child has padding on both sides and is already centered.
160
+ */
161
+ :where(.scalar-card.p-1 > .scalar-card-header:first-child:not(:last-child)) {
162
+ margin-block: -2px 2px;
163
+ }
164
+ :where(.scalar-card.p-1 > .scalar-card-footer:last-child:not(:first-child)) {
165
+ margin-block: 2px -2px;
166
+ }
150
167
  /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
151
168
  :where(pre:has( > code.hljs)) {
152
169
  line-height: var(--scalar-code-line-height, 1.4);
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/components"
12
12
  },
13
- "version": "0.35.0",
13
+ "version": "0.35.1",
14
14
  "engines": {
15
15
  "node": ">=22"
16
16
  },
@@ -216,12 +216,12 @@
216
216
  "@floating-ui/vue": "2.0.1",
217
217
  "@headlessui/tailwindcss": "^0.2.2",
218
218
  "@headlessui/vue": "1.7.23",
219
- "@scalar/code-highlight": "0.4.14",
220
- "@scalar/helpers": "0.18.0",
221
- "@scalar/highlight": "0.6.0",
222
- "@scalar/icons": "0.7.9",
223
- "@scalar/themes": "0.20.1",
224
- "@scalar/use-hooks": "0.4.26",
219
+ "@scalar/code-highlight": "0.4.15",
220
+ "@scalar/helpers": "0.18.1",
221
+ "@scalar/highlight": "0.6.1",
222
+ "@scalar/icons": "0.7.10",
223
+ "@scalar/themes": "0.20.2",
224
+ "@scalar/use-hooks": "0.4.27",
225
225
  "@vueuse/core": "15.0.0",
226
226
  "cva": "1.0.0-beta.4",
227
227
  "radix-vue": "^1.9.17",
@@ -244,7 +244,7 @@
244
244
  "storybook": "10.6.2",
245
245
  "svglint": "^4.2.1",
246
246
  "tailwindcss": "^4.3.3",
247
- "typescript": "^5.9.3",
247
+ "typescript": "6.0.3",
248
248
  "vite": "8.3.4",
249
249
  "vite-svg-loader": "5.1.3",
250
250
  "vitest": "5.0.5"