@youcan/celeste 0.6.9 → 0.6.11

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/celeste.css CHANGED
@@ -1843,7 +1843,7 @@ to {
1843
1843
  }
1844
1844
  .celeste-dropdown-item .celeste-dropdown-item-header-lg .celeste-dropdown-item-label[data-v-a0a634ce] {
1845
1845
  font-weight: var(--font-weights-display-0);
1846
- }.celeste-text-input-wrapper[data-v-a28be4ca] {
1846
+ }.celeste-text-input-wrapper[data-v-113c4db9] {
1847
1847
  display: flex;
1848
1848
  box-sizing: border-box;
1849
1849
  align-items: center;
@@ -1862,28 +1862,28 @@ to {
1862
1862
  font: var(--paragraph-sm);
1863
1863
  gap: var(--input-gap);
1864
1864
  }
1865
- .celeste-text-input-wrapper[size=xs][data-v-a28be4ca] {
1865
+ .celeste-text-input-wrapper[size=xs][data-v-113c4db9] {
1866
1866
  --input-gap: 8px;
1867
1867
  --input-height: 32px;
1868
1868
  --input-radius: var(--radius-8);
1869
1869
  --input-padding: calc(var(--spacing-8) - var(--spacing-2));
1870
1870
  }
1871
- .celeste-text-input-wrapper[size=sm][data-v-a28be4ca] {
1871
+ .celeste-text-input-wrapper[size=sm][data-v-113c4db9] {
1872
1872
  --input-gap: 6px;
1873
1873
  --input-height: 36px;
1874
1874
  --input-radius: var(--radius-8);
1875
1875
  --input-padding: var(--spacing-8);
1876
1876
  }
1877
- .celeste-text-input-wrapper[size=md][data-v-a28be4ca] {
1877
+ .celeste-text-input-wrapper[size=md][data-v-113c4db9] {
1878
1878
  --input-gap: 6px;
1879
1879
  --input-height: 40px;
1880
1880
  --input-radius: var(--radius-10);
1881
1881
  --input-padding: var(--spacing-10);
1882
1882
  }
1883
- .celeste-text-input-wrapper[has-error=true][data-v-a28be4ca] {
1883
+ .celeste-text-input-wrapper[has-error=true][data-v-113c4db9] {
1884
1884
  border-color: var(--color-state-error-base);
1885
1885
  }
1886
- .celeste-text-input-wrapper .celeste-text-input[data-v-a28be4ca] {
1886
+ .celeste-text-input-wrapper .celeste-text-input[data-v-113c4db9] {
1887
1887
  width: 100%;
1888
1888
  height: 100%;
1889
1889
  padding: 0;
@@ -1893,90 +1893,90 @@ to {
1893
1893
  color: inherit;
1894
1894
  font: inherit;
1895
1895
  }
1896
- .celeste-text-input-wrapper .celeste-text-input[data-v-a28be4ca]::-moz-placeholder {
1896
+ .celeste-text-input-wrapper .celeste-text-input[data-v-113c4db9]::-moz-placeholder {
1897
1897
  -moz-transition: color var(--animation-fast) ease-out;
1898
1898
  transition: color var(--animation-fast) ease-out;
1899
1899
  color: var(--color-text-soft-400);
1900
1900
  }
1901
- .celeste-text-input-wrapper .celeste-text-input[data-v-a28be4ca]::placeholder {
1901
+ .celeste-text-input-wrapper .celeste-text-input[data-v-113c4db9]::placeholder {
1902
1902
  transition: color var(--animation-fast) ease-out;
1903
1903
  color: var(--color-text-soft-400);
1904
1904
  }
1905
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:focus) {
1905
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:focus) {
1906
1906
  border-color: var(--color-stroke-strong-950);
1907
1907
  outline-color: var(--color-stroke-soft-200);
1908
1908
  }
1909
- .celeste-text-input-wrapper:has(.celeste-text-input:focus)[has-error=true][data-v-a28be4ca] {
1909
+ .celeste-text-input-wrapper:has(.celeste-text-input:focus)[has-error=true][data-v-113c4db9] {
1910
1910
  border-color: var(--color-state-error-base);
1911
1911
  outline-color: var(--color-state-error-lighter);
1912
1912
  }
1913
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:disabled) {
1913
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:disabled) {
1914
1914
  border-color: transparent;
1915
1915
  background-color: var(--color-bg-weak-50);
1916
1916
  box-shadow: none;
1917
1917
  color: var(--color-text-disabled-300);
1918
1918
  pointer-events: none;
1919
1919
  }
1920
- .celeste-text-input-wrapper:has(.celeste-text-input:disabled) .celeste-text-input[data-v-a28be4ca]::-moz-placeholder {
1920
+ .celeste-text-input-wrapper:has(.celeste-text-input:disabled) .celeste-text-input[data-v-113c4db9]::-moz-placeholder {
1921
1921
  color: currentcolor;
1922
1922
  }
1923
- .celeste-text-input-wrapper:has(.celeste-text-input:disabled) .celeste-text-input[data-v-a28be4ca]::placeholder {
1923
+ .celeste-text-input-wrapper:has(.celeste-text-input:disabled) .celeste-text-input[data-v-113c4db9]::placeholder {
1924
1924
  color: currentcolor;
1925
1925
  }
1926
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:disabled) .celeste-text-input-icon {
1926
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:disabled) .celeste-text-input-icon {
1927
1927
  color: var(--color-icon-disabled-300);
1928
1928
  }
1929
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:disabled) .celeste-text-input-affix, .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:disabled) .celeste-text-input-button {
1929
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:disabled) .celeste-text-input-affix, .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:disabled) .celeste-text-input-button {
1930
1930
  background-color: var(--color-bg-weak-50) !important;
1931
1931
  color: var(--color-text-disabled-300);
1932
1932
  }
1933
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]) {
1933
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]) {
1934
1934
  gap: var(--spacing-0);
1935
1935
  padding-inline-end: var(--spacing-0);
1936
1936
  }
1937
- .celeste-text-input-wrapper:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]):has(.celeste-text-input-button[inline=false], .celeste-text-input-affix[variant=suffix]) .celeste-text-input[data-v-a28be4ca] {
1937
+ .celeste-text-input-wrapper:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]):has(.celeste-text-input-button[inline=false], .celeste-text-input-affix[variant=suffix]) .celeste-text-input[data-v-113c4db9] {
1938
1938
  padding-inline-end: var(--input-padding);
1939
1939
  border-inline-end: 1px solid var(--color-stroke-soft-200);
1940
1940
  }
1941
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]):has(.celeste-text-input-affix[variant=prefix]) {
1941
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]):has(.celeste-text-input-affix[variant=prefix]) {
1942
1942
  padding-inline: var(--spacing-0) var(--input-padding);
1943
1943
  }
1944
- .celeste-text-input-wrapper:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]):has(.celeste-text-input-affix[variant=prefix]) .celeste-text-input[data-v-a28be4ca] {
1944
+ .celeste-text-input-wrapper:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]):has(.celeste-text-input-affix[variant=prefix]) .celeste-text-input[data-v-113c4db9] {
1945
1945
  padding-inline-start: var(--input-padding);
1946
1946
  border-inline-start: 1px solid var(--color-stroke-soft-200);
1947
1947
  }
1948
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]) .celeste-text-input-icon[position=start] {
1948
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]) .celeste-text-input-icon[position=start] {
1949
1949
  margin-inline-end: var(--input-gap);
1950
1950
  }
1951
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]) .celeste-text-input-icon[position=end] {
1951
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input-button, .celeste-text-input-affix[inline=false][askbd=false]) .celeste-text-input-icon[position=end] {
1952
1952
  margin-inline-start: var(--input-gap);
1953
1953
  }
1954
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:hover:not(:focus, :disabled)) {
1954
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:hover:not(:focus, :disabled)) {
1955
1955
  /* stylelint-disable-next-line no-descending-specificity */
1956
1956
  }
1957
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:hover:not(:focus, :disabled)):not(:has(.celeste-text-input-button, .celeste-text-input-affix)) {
1957
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:hover:not(:focus, :disabled)):not(:has(.celeste-text-input-button, .celeste-text-input-affix)) {
1958
1958
  border-color: transparent;
1959
1959
  background-color: var(--color-bg-weak-50);
1960
1960
  }
1961
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:hover:not(:focus, :disabled)):has(.celeste-text-input-button:not(:hover), .celeste-text-input-affix:not(:hover)) {
1961
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:hover:not(:focus, :disabled)):has(.celeste-text-input-button:not(:hover), .celeste-text-input-affix:not(:hover)) {
1962
1962
  background-color: var(--color-bg-weak-50);
1963
1963
  }
1964
- .celeste-text-input-wrapper:has(.celeste-text-input:hover:not(:focus, :disabled)):not(:has(.celeste-text-input-button:hover)) .celeste-text-input[data-v-a28be4ca]::-moz-placeholder {
1964
+ .celeste-text-input-wrapper:has(.celeste-text-input:hover:not(:focus, :disabled)):not(:has(.celeste-text-input-button:hover)) .celeste-text-input[data-v-113c4db9]::-moz-placeholder {
1965
1965
  color: var(--color-text-sub-600);
1966
1966
  }
1967
- .celeste-text-input-wrapper:has(.celeste-text-input:hover:not(:focus, :disabled)):not(:has(.celeste-text-input-button:hover)) .celeste-text-input[data-v-a28be4ca]::placeholder {
1967
+ .celeste-text-input-wrapper:has(.celeste-text-input:hover:not(:focus, :disabled)):not(:has(.celeste-text-input-button:hover)) .celeste-text-input[data-v-113c4db9]::placeholder {
1968
1968
  color: var(--color-text-sub-600);
1969
1969
  }
1970
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:-moz-placeholder:not(:disabled)) {
1970
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:-moz-placeholder:not(:disabled)) {
1971
1971
  /* stylelint-disable-next-line no-descending-specificity */
1972
1972
  }
1973
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:placeholder-shown:not(:disabled)) {
1973
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:placeholder-shown:not(:disabled)) {
1974
1974
  /* stylelint-disable-next-line no-descending-specificity */
1975
1975
  }
1976
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:-moz-placeholder:not(:disabled)) .celeste-text-input-icon, .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:-moz-placeholder:not(:disabled)) .celeste-text-input-affix {
1976
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:-moz-placeholder:not(:disabled)) .celeste-text-input-icon, .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:-moz-placeholder:not(:disabled)) .celeste-text-input-affix {
1977
1977
  color: var(--color-text-soft-400);
1978
1978
  }
1979
- .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:placeholder-shown:not(:disabled)) .celeste-text-input-icon, .celeste-text-input-wrapper[data-v-a28be4ca]:has(.celeste-text-input:placeholder-shown:not(:disabled)) .celeste-text-input-affix {
1979
+ .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:placeholder-shown:not(:disabled)) .celeste-text-input-icon, .celeste-text-input-wrapper[data-v-113c4db9]:has(.celeste-text-input:placeholder-shown:not(:disabled)) .celeste-text-input-affix {
1980
1980
  color: var(--color-text-soft-400);
1981
1981
  }[data-v-2cc18da8] {
1982
1982
  box-sizing: border-box;
@@ -19,23 +19,24 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
19
19
  const props = __props;
20
20
  const modelValue = Mo.useModel(__props, "modelValue");
21
21
  return (_ctx, _cache) => {
22
- return Mo.openBlock(), Mo.createElementBlock("label", {
22
+ return Mo.openBlock(), Mo.createElementBlock("div", {
23
23
  size: _ctx.size,
24
+ role: "presentation",
24
25
  "has-error": _ctx.hasError,
25
- class: "celeste-text-input-wrapper"
26
+ class: Mo.normalizeClass(Mo.unref(clsx.clsx)("celeste-text-input-wrapper", props.class))
26
27
  }, [
27
28
  Mo.withDirectives(Mo.createElementVNode("input", Mo.mergeProps({
28
29
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
29
30
  }, _ctx.$attrs, {
30
31
  type: _ctx.type,
31
- class: Mo.unref(clsx.clsx)("celeste-text-input", props.class)
32
+ class: "celeste-text-input"
32
33
  }), null, 16, _hoisted_2), [
33
34
  [Mo.vModelDynamic, modelValue.value]
34
35
  ]),
35
36
  Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
36
- ], 8, _hoisted_1);
37
+ ], 10, _hoisted_1);
37
38
  };
38
39
  }
39
40
  });
40
- const TextInput = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-a28be4ca"]]);
41
+ const TextInput = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-113c4db9"]]);
41
42
  module.exports = TextInput;
@@ -16,7 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
16
16
  size: "xs" | "sm" | "md";
17
17
  type: "text" | "email" | "password" | "search" | "tel" | "url";
18
18
  hasError: boolean;
19
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>, {
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
20
20
  default?(_: {}): any;
21
21
  }>;
22
22
  export default _default;
@@ -1,4 +1,4 @@
1
- import { defineComponent, mergeModels, useModel, openBlock, createElementBlock, withDirectives, createElementVNode, mergeProps, unref, vModelDynamic, renderSlot } from "vue";
1
+ import { defineComponent, mergeModels, useModel, openBlock, createElementBlock, normalizeClass, unref, withDirectives, createElementVNode, mergeProps, vModelDynamic, renderSlot } from "vue";
2
2
  import { c as clsx } from "./chunks/clsx.js";
3
3
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
4
4
  const _hoisted_1 = ["size", "has-error"];
@@ -18,25 +18,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  const props = __props;
19
19
  const modelValue = useModel(__props, "modelValue");
20
20
  return (_ctx, _cache) => {
21
- return openBlock(), createElementBlock("label", {
21
+ return openBlock(), createElementBlock("div", {
22
22
  size: _ctx.size,
23
+ role: "presentation",
23
24
  "has-error": _ctx.hasError,
24
- class: "celeste-text-input-wrapper"
25
+ class: normalizeClass(unref(clsx)("celeste-text-input-wrapper", props.class))
25
26
  }, [
26
27
  withDirectives(createElementVNode("input", mergeProps({
27
28
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
28
29
  }, _ctx.$attrs, {
29
30
  type: _ctx.type,
30
- class: unref(clsx)("celeste-text-input", props.class)
31
+ class: "celeste-text-input"
31
32
  }), null, 16, _hoisted_2), [
32
33
  [vModelDynamic, modelValue.value]
33
34
  ]),
34
35
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
35
- ], 8, _hoisted_1);
36
+ ], 10, _hoisted_1);
36
37
  };
37
38
  }
38
39
  });
39
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a28be4ca"]]);
40
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-113c4db9"]]);
40
41
  export {
41
42
  TextInput as default
42
43
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/celeste",
3
3
  "type": "module",
4
- "version": "0.6.9",
4
+ "version": "0.6.11",
5
5
  "author": "YouCan <tech@youcan.shop>",
6
6
  "keywords": [
7
7
  "youcan",
@@ -32,8 +32,8 @@
32
32
  "clsx": "^2.1.1",
33
33
  "radix-vue": "^1.9.12",
34
34
  "tinycolor2": "^1.6.0",
35
- "@youcan/celeste-icons": "0.6.9",
36
- "@youcan/celeste-tokens": "0.6.9"
35
+ "@youcan/celeste-tokens": "0.6.11",
36
+ "@youcan/celeste-icons": "0.6.11"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@chromatic-com/storybook": "^4.0.0",
@@ -20,19 +20,20 @@ export interface TextInputProps extends /* @vue-ignore */ InputHTMLAttributes {
20
20
  </script>
21
21
 
22
22
  <template>
23
- <label
23
+ <div
24
24
  :size="size"
25
+ role="presentation"
25
26
  :has-error="hasError"
26
- class="celeste-text-input-wrapper"
27
+ :class="clsx('celeste-text-input-wrapper', props.class)"
27
28
  >
28
29
  <input
29
30
  v-model="modelValue"
30
31
  v-bind="$attrs"
31
32
  :type="type"
32
- :class="clsx('celeste-text-input', props.class)"
33
+ class="celeste-text-input"
33
34
  >
34
35
  <slot />
35
- </label>
36
+ </div>
36
37
  </template>
37
38
 
38
39
  <style scoped lang="scss">