@remember-web/primitive 0.2.13 → 0.2.14

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.
Files changed (45) hide show
  1. package/dist/src/Inputs/Select/styles.cjs.js +1 -1
  2. package/dist/src/Inputs/Select/styles.cjs.js.map +1 -1
  3. package/dist/src/Inputs/Select/styles.esm.js +1 -1
  4. package/dist/src/Inputs/Select/styles.esm.js.map +1 -1
  5. package/dist/src/Inputs/Select/types.d.ts +3 -0
  6. package/dist/src/Inputs/Select/types.d.ts.map +1 -1
  7. package/dist/src/Inputs/TextInput/styles.cjs.js +2 -2
  8. package/dist/src/Inputs/TextInput/styles.cjs.js.map +1 -1
  9. package/dist/src/Inputs/TextInput/styles.esm.js +2 -2
  10. package/dist/src/Inputs/TextInput/styles.esm.js.map +1 -1
  11. package/dist/src/Inputs/TextInput/types.d.ts +3 -0
  12. package/dist/src/Inputs/TextInput/types.d.ts.map +1 -1
  13. package/dist/src/Labels/Label/index.cjs.js +58 -0
  14. package/dist/src/Labels/Label/index.cjs.js.map +1 -0
  15. package/dist/src/Labels/Label/index.d.ts +5 -0
  16. package/dist/src/Labels/Label/index.d.ts.map +1 -0
  17. package/dist/src/Labels/Label/index.esm.js +51 -0
  18. package/dist/src/Labels/Label/index.esm.js.map +1 -0
  19. package/dist/src/Labels/Label/styles.cjs.js +79 -0
  20. package/dist/src/Labels/Label/styles.cjs.js.map +1 -0
  21. package/dist/src/Labels/Label/styles.d.ts +11 -0
  22. package/dist/src/Labels/Label/styles.d.ts.map +1 -0
  23. package/dist/src/Labels/Label/styles.esm.js +72 -0
  24. package/dist/src/Labels/Label/styles.esm.js.map +1 -0
  25. package/dist/src/Labels/Label/types.d.ts +13 -0
  26. package/dist/src/Labels/Label/types.d.ts.map +1 -0
  27. package/dist/src/Labels/index.d.ts +2 -0
  28. package/dist/src/Labels/index.d.ts.map +1 -0
  29. package/dist/src/index.cjs.js +2 -0
  30. package/dist/src/index.cjs.js.map +1 -1
  31. package/dist/src/index.d.ts +1 -0
  32. package/dist/src/index.d.ts.map +1 -1
  33. package/dist/src/index.esm.js +1 -0
  34. package/dist/src/index.esm.js.map +1 -1
  35. package/package.json +2 -2
  36. package/src/Inputs/Select/styles.ts +1 -1
  37. package/src/Inputs/Select/types.ts +3 -0
  38. package/src/Inputs/TextInput/styles.ts +2 -2
  39. package/src/Inputs/TextInput/types.ts +3 -0
  40. package/src/Labels/Label/Label.stories.tsx +68 -0
  41. package/src/Labels/Label/index.tsx +50 -0
  42. package/src/Labels/Label/styles.ts +138 -0
  43. package/src/Labels/Label/types.ts +30 -0
  44. package/src/Labels/index.ts +1 -0
  45. package/src/index.ts +1 -0
@@ -21,7 +21,7 @@ var SelectContainer = styled__default.default.div(_templateObject || (_templateO
21
21
  }
22
22
  return $width;
23
23
  }, mixin.contents000, mixin.contents200, mixin.contents300, mixin.bg200);
24
- var SelectLabel = styled__default.default.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default.default(["\n ", "\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ", ";\n }\n"])), mixin.getTypographyStyles('SubTitle1'), mixin.roleRed);
24
+ var SelectLabel = styled__default.default.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default.default(["\n ", "\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ", ";\n }\n"])), mixin.getTypographyStyles('Title2'), mixin.roleRed);
25
25
 
26
26
  exports.SelectContainer = SelectContainer;
27
27
  exports.SelectLabel = SelectLabel;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.cjs.js","sources":["../../../../src/Inputs/Select/styles.ts"],"sourcesContent":["'use client';\n\nimport {\n bg200,\n contents000,\n contents200,\n contents300,\n getTypographyStyles,\n roleRed,\n} from '@remember-web/mixin';\nimport styled from 'styled-components';\n\nexport const SelectContainer = styled.div<{ $width?: number | string }>`\n ${getTypographyStyles('UIBody2')}\n color: ${contents000};\n width: ${({ $width }) => {\n if (!$width) {\n return 'fit-content';\n }\n\n if (typeof $width === 'number') {\n return `${$width}px`;\n }\n\n return $width;\n }};\n position: relative;\n user-select: none;\n\n &:focus {\n outline: none;\n border-color: ${contents000};\n }\n &[aria-disabled='true'] {\n color: ${contents200};\n border-color: ${contents300};\n background-color: ${bg200};\n }\n`;\n\nexport const SelectLabel = styled.label`\n ${getTypographyStyles('SubTitle1')}\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ${roleRed};\n }\n`;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAa;AAYN;AAGoB;;AAErB;AACF;AAEA;;AAEA;AAEA;AACF;;;;"}
1
+ {"version":3,"file":"styles.cjs.js","sources":["../../../../src/Inputs/Select/styles.ts"],"sourcesContent":["'use client';\n\nimport {\n bg200,\n contents000,\n contents200,\n contents300,\n getTypographyStyles,\n roleRed,\n} from '@remember-web/mixin';\nimport styled from 'styled-components';\n\nexport const SelectContainer = styled.div<{ $width?: number | string }>`\n ${getTypographyStyles('UIBody2')}\n color: ${contents000};\n width: ${({ $width }) => {\n if (!$width) {\n return 'fit-content';\n }\n\n if (typeof $width === 'number') {\n return `${$width}px`;\n }\n\n return $width;\n }};\n position: relative;\n user-select: none;\n\n &:focus {\n outline: none;\n border-color: ${contents000};\n }\n &[aria-disabled='true'] {\n color: ${contents200};\n border-color: ${contents300};\n background-color: ${bg200};\n }\n`;\n\nexport const SelectLabel = styled.label`\n ${getTypographyStyles('Title2')}\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ${roleRed};\n }\n`;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAa;AAYN;AAGoB;;AAErB;AACF;AAEA;;AAEA;AAEA;AACF;;;;"}
@@ -14,7 +14,7 @@ var SelectContainer = styled.div(_templateObject || (_templateObject = _taggedTe
14
14
  }
15
15
  return $width;
16
16
  }, contents000, contents200, contents300, bg200);
17
- var SelectLabel = styled.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ", ";\n }\n"])), getTypographyStyles('SubTitle1'), roleRed);
17
+ var SelectLabel = styled.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ", ";\n }\n"])), getTypographyStyles('Title2'), roleRed);
18
18
 
19
19
  export { SelectContainer, SelectLabel };
20
20
  //# sourceMappingURL=styles.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.esm.js","sources":["../../../../src/Inputs/Select/styles.ts"],"sourcesContent":["'use client';\n\nimport {\n bg200,\n contents000,\n contents200,\n contents300,\n getTypographyStyles,\n roleRed,\n} from '@remember-web/mixin';\nimport styled from 'styled-components';\n\nexport const SelectContainer = styled.div<{ $width?: number | string }>`\n ${getTypographyStyles('UIBody2')}\n color: ${contents000};\n width: ${({ $width }) => {\n if (!$width) {\n return 'fit-content';\n }\n\n if (typeof $width === 'number') {\n return `${$width}px`;\n }\n\n return $width;\n }};\n position: relative;\n user-select: none;\n\n &:focus {\n outline: none;\n border-color: ${contents000};\n }\n &[aria-disabled='true'] {\n color: ${contents200};\n border-color: ${contents300};\n background-color: ${bg200};\n }\n`;\n\nexport const SelectLabel = styled.label`\n ${getTypographyStyles('SubTitle1')}\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ${roleRed};\n }\n`;\n"],"names":[],"mappings":";;;;;AAAa;AAYN;AAGoB;;AAErB;AACF;AAEA;;AAEA;AAEA;AACF;;;"}
1
+ {"version":3,"file":"styles.esm.js","sources":["../../../../src/Inputs/Select/styles.ts"],"sourcesContent":["'use client';\n\nimport {\n bg200,\n contents000,\n contents200,\n contents300,\n getTypographyStyles,\n roleRed,\n} from '@remember-web/mixin';\nimport styled from 'styled-components';\n\nexport const SelectContainer = styled.div<{ $width?: number | string }>`\n ${getTypographyStyles('UIBody2')}\n color: ${contents000};\n width: ${({ $width }) => {\n if (!$width) {\n return 'fit-content';\n }\n\n if (typeof $width === 'number') {\n return `${$width}px`;\n }\n\n return $width;\n }};\n position: relative;\n user-select: none;\n\n &:focus {\n outline: none;\n border-color: ${contents000};\n }\n &[aria-disabled='true'] {\n color: ${contents200};\n border-color: ${contents300};\n background-color: ${bg200};\n }\n`;\n\nexport const SelectLabel = styled.label`\n ${getTypographyStyles('Title2')}\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ${roleRed};\n }\n`;\n"],"names":[],"mappings":";;;;;AAAa;AAYN;AAGoB;;AAErB;AACF;AAEA;;AAEA;AAEA;AACF;;;"}
@@ -9,6 +9,9 @@ export type SelectBaseProps<Value extends SelectValue> = {
9
9
  className?: string;
10
10
  disabled?: boolean;
11
11
  error?: boolean;
12
+ /**
13
+ * @deprecated Label 컴포넌트를 사용해 주세요.
14
+ */
12
15
  label?: ReactNode;
13
16
  required?: boolean;
14
17
  value?: Value;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/Inputs/Select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,WAAW,IAAI,YAAY,CACrE,WAAW,CAAC,KAAK,CAAC,EAClB,OAAO,YAAY,CACpB,CAAC;AAEF,KAAK,eAAe,CAAC,KAAK,SAAS,WAAW,IAAI;IAChD,QAAQ,EAAE,iBAAiB,CAA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AAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAAC,KAAK,SAAS,WAAW,IACvD,eAAe,CAAC,KAAK,CAAC,GAAG;IACvB,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACrC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AAE7B,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,WAAW,IACrD,eAAe,CAAC,KAAK,CAAC,GAAG;IACvB,MAAM,EAAE,IAAI,CAAC;CACd,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AAE7B,MAAM,MAAM,WAAW,CAAC,KAAK,SAAS,WAAW,IAC7C,mBAAmB,CAAC,KAAK,CAAC,GAC1B,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAE7B,MAAM,MAAM,WAAW,CAAC,KAAK,SAAS,WAAW,IAAI;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC"}
@@ -23,8 +23,8 @@ var InputContainer = styled__default.default.div(_templateObject3 || (_templateO
23
23
  });
24
24
  var InputDecorator = styled__default.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral__default.default(["\n flex-shrink: 0;\n /* Inline\uC694\uC18C\uAC00 \uB4E4\uC5B4\uC624\uBA74 \uAC15\uC81C\uB85C block\uC73C\uB85C \uCC98\uB9AC (\uC911\uC559\uC815\uB82C\uC744 \uC704\uD574) */\n > * {\n display: block;\n }\n"])));
25
25
  var InputInner = styled__default.default.input(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral__default.default(["\n ", "\n color: ", ";\n\n display: block;\n flex-grow: 1;\n width: 100%;\n padding: 10px 0;\n border: 0;\n background-color: transparent;\n\n &:placeholder-shown {\n ", "\n }\n\n &::placeholder {\n color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"])), mixin.getTypographyStyles('UIBody2'), mixin.contents000, mixin.ellipsis(), mixin.contents200);
26
- var InputLabel = styled__default.default.label(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral__default.default(["\n ", "\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ", ";\n }\n"])), mixin.getTypographyStyles('SubTitle1'), mixin.roleRed);
27
- var InputError = styled__default.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral__default.default(["\n ", "\n color: ", ";\n\n margin-top: 8px;\n"])), mixin.getTypographyStyles('Caption1'), mixin.roleRed);
26
+ var InputLabel = styled__default.default.label(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral__default.default(["\n ", "\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ", ";\n }\n"])), mixin.getTypographyStyles('Title2'), mixin.roleRed);
27
+ var InputError = styled__default.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral__default.default(["\n ", "\n color: ", ";\n\n margin-top: 8px;\n"])), mixin.getTypographyStyles('UIBody3'), mixin.roleRed);
28
28
  var InputHintText = styled__default.default.span(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral__default.default(["\n ", "\n color: ", ";\n white-space: nowrap;\n"])), mixin.getTypographyStyles('UIBody2'), function (_ref3) {
29
29
  var textColor = _ref3.textColor;
30
30
  return textColor;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.cjs.js","sources":["../../../../src/Inputs/TextInput/styles.ts"],"sourcesContent":["'use client';\n\nimport type { ColorVariable } from '@remember-web/mixin';\nimport {\n bg200,\n contents000,\n contents200,\n contents300,\n ellipsis,\n getTypographyStyles,\n roleRed,\n} from '@remember-web/mixin';\nimport { formatUnit } from '@remember-web/shared';\nimport styled, { css } from 'styled-components';\n\nexport const InputWrapper = styled.div<{ $width?: string | number }>`\n ${({ $width }) =>\n $width &&\n css`\n width: ${formatUnit($width)};\n `};\n`;\n\nexport const InputContainer = styled.div<{\n disabled?: boolean;\n $hasError?: boolean;\n}>`\n display: flex;\n align-items: center;\n border: 1px solid ${contents300};\n border-radius: 4px;\n padding: 0 12px;\n gap: 8px;\n\n transition:\n border-color 0.2s,\n background-color 0.2s;\n\n ${({ $hasError, disabled }) => [\n $hasError\n ? css`\n border-color: ${roleRed};\n `\n : css`\n &:focus-within {\n border-color: ${contents000};\n }\n `,\n disabled &&\n css`\n background-color: ${bg200};\n `,\n ]}\n`;\n\nexport const InputDecorator = styled.div`\n flex-shrink: 0;\n /* Inline요소가 들어오면 강제로 block으로 처리 (중앙정렬을 위해) */\n > * {\n display: block;\n }\n`;\n\nexport const InputInner = styled.input`\n ${getTypographyStyles('UIBody2')}\n color: ${contents000};\n\n display: block;\n flex-grow: 1;\n width: 100%;\n padding: 10px 0;\n border: 0;\n background-color: transparent;\n\n &:placeholder-shown {\n ${ellipsis()}\n }\n\n &::placeholder {\n color: ${contents200};\n }\n\n &:focus {\n outline: none;\n }\n`;\n\nexport const InputLabel = styled.label`\n ${getTypographyStyles('SubTitle1')}\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ${roleRed};\n }\n`;\n\nexport const InputError = styled.div`\n ${getTypographyStyles('Caption1')}\n color: ${roleRed};\n\n margin-top: 8px;\n`;\n\nexport const InputHintText = styled.span<{ textColor?: ColorVariable }>`\n ${getTypographyStyles('UIBody2')}\n color: ${({ textColor }) => textColor};\n white-space: nowrap;\n`;\n\nexport const InputTogglePasswordVisibilityButton = styled.button`\n all: unset;\n appearance: none;\n cursor: pointer;\n flex-shrink: 0;\n\n & > svg {\n display: block;\n }\n`;\n"],"names":["InputWrapper","InputDecorator","InputTogglePasswordVisibilityButton"],"mappings":";;;;;;;;;;;;;AAAa;AAeAA;AACT;AAAS;AAIR;;AAkBD;;AAAsB;AAcvB;AAGUC;AAQN;;;;AA+CI;AAAY;AAAgB;AAI1BC;;;;;;;;;"}
1
+ {"version":3,"file":"styles.cjs.js","sources":["../../../../src/Inputs/TextInput/styles.ts"],"sourcesContent":["'use client';\n\nimport type { ColorVariable } from '@remember-web/mixin';\nimport {\n bg200,\n contents000,\n contents200,\n contents300,\n ellipsis,\n getTypographyStyles,\n roleRed,\n} from '@remember-web/mixin';\nimport { formatUnit } from '@remember-web/shared';\nimport styled, { css } from 'styled-components';\n\nexport const InputWrapper = styled.div<{ $width?: string | number }>`\n ${({ $width }) =>\n $width &&\n css`\n width: ${formatUnit($width)};\n `};\n`;\n\nexport const InputContainer = styled.div<{\n disabled?: boolean;\n $hasError?: boolean;\n}>`\n display: flex;\n align-items: center;\n border: 1px solid ${contents300};\n border-radius: 4px;\n padding: 0 12px;\n gap: 8px;\n\n transition:\n border-color 0.2s,\n background-color 0.2s;\n\n ${({ $hasError, disabled }) => [\n $hasError\n ? css`\n border-color: ${roleRed};\n `\n : css`\n &:focus-within {\n border-color: ${contents000};\n }\n `,\n disabled &&\n css`\n background-color: ${bg200};\n `,\n ]}\n`;\n\nexport const InputDecorator = styled.div`\n flex-shrink: 0;\n /* Inline요소가 들어오면 강제로 block으로 처리 (중앙정렬을 위해) */\n > * {\n display: block;\n }\n`;\n\nexport const InputInner = styled.input`\n ${getTypographyStyles('UIBody2')}\n color: ${contents000};\n\n display: block;\n flex-grow: 1;\n width: 100%;\n padding: 10px 0;\n border: 0;\n background-color: transparent;\n\n &:placeholder-shown {\n ${ellipsis()}\n }\n\n &::placeholder {\n color: ${contents200};\n }\n\n &:focus {\n outline: none;\n }\n`;\n\nexport const InputLabel = styled.label`\n ${getTypographyStyles('Title2')}\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ${roleRed};\n }\n`;\n\nexport const InputError = styled.div`\n ${getTypographyStyles('UIBody3')}\n color: ${roleRed};\n\n margin-top: 8px;\n`;\n\nexport const InputHintText = styled.span<{ textColor?: ColorVariable }>`\n ${getTypographyStyles('UIBody2')}\n color: ${({ textColor }) => textColor};\n white-space: nowrap;\n`;\n\nexport const InputTogglePasswordVisibilityButton = styled.button`\n all: unset;\n appearance: none;\n cursor: pointer;\n flex-shrink: 0;\n\n & > svg {\n display: block;\n }\n`;\n"],"names":["InputWrapper","InputDecorator","InputTogglePasswordVisibilityButton"],"mappings":";;;;;;;;;;;;;AAAa;AAeAA;AACT;AAAS;AAIR;;AAkBD;;AAAsB;AAcvB;AAGUC;AAQN;;;;AA+CI;AAAY;AAAgB;AAI1BC;;;;;;;;;"}
@@ -16,8 +16,8 @@ var InputContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedT
16
16
  });
17
17
  var InputDecorator = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n /* Inline\uC694\uC18C\uAC00 \uB4E4\uC5B4\uC624\uBA74 \uAC15\uC81C\uB85C block\uC73C\uB85C \uCC98\uB9AC (\uC911\uC559\uC815\uB82C\uC744 \uC704\uD574) */\n > * {\n display: block;\n }\n"])));
18
18
  var InputInner = styled.input(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n\n display: block;\n flex-grow: 1;\n width: 100%;\n padding: 10px 0;\n border: 0;\n background-color: transparent;\n\n &:placeholder-shown {\n ", "\n }\n\n &::placeholder {\n color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"])), getTypographyStyles('UIBody2'), contents000, ellipsis(), contents200);
19
- var InputLabel = styled.label(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ", ";\n }\n"])), getTypographyStyles('SubTitle1'), roleRed);
20
- var InputError = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n\n margin-top: 8px;\n"])), getTypographyStyles('Caption1'), roleRed);
19
+ var InputLabel = styled.label(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ", ";\n }\n"])), getTypographyStyles('Title2'), roleRed);
20
+ var InputError = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n\n margin-top: 8px;\n"])), getTypographyStyles('UIBody3'), roleRed);
21
21
  var InputHintText = styled.span(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n white-space: nowrap;\n"])), getTypographyStyles('UIBody2'), function (_ref3) {
22
22
  var textColor = _ref3.textColor;
23
23
  return textColor;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.esm.js","sources":["../../../../src/Inputs/TextInput/styles.ts"],"sourcesContent":["'use client';\n\nimport type { ColorVariable } from '@remember-web/mixin';\nimport {\n bg200,\n contents000,\n contents200,\n contents300,\n ellipsis,\n getTypographyStyles,\n roleRed,\n} from '@remember-web/mixin';\nimport { formatUnit } from '@remember-web/shared';\nimport styled, { css } from 'styled-components';\n\nexport const InputWrapper = styled.div<{ $width?: string | number }>`\n ${({ $width }) =>\n $width &&\n css`\n width: ${formatUnit($width)};\n `};\n`;\n\nexport const InputContainer = styled.div<{\n disabled?: boolean;\n $hasError?: boolean;\n}>`\n display: flex;\n align-items: center;\n border: 1px solid ${contents300};\n border-radius: 4px;\n padding: 0 12px;\n gap: 8px;\n\n transition:\n border-color 0.2s,\n background-color 0.2s;\n\n ${({ $hasError, disabled }) => [\n $hasError\n ? css`\n border-color: ${roleRed};\n `\n : css`\n &:focus-within {\n border-color: ${contents000};\n }\n `,\n disabled &&\n css`\n background-color: ${bg200};\n `,\n ]}\n`;\n\nexport const InputDecorator = styled.div`\n flex-shrink: 0;\n /* Inline요소가 들어오면 강제로 block으로 처리 (중앙정렬을 위해) */\n > * {\n display: block;\n }\n`;\n\nexport const InputInner = styled.input`\n ${getTypographyStyles('UIBody2')}\n color: ${contents000};\n\n display: block;\n flex-grow: 1;\n width: 100%;\n padding: 10px 0;\n border: 0;\n background-color: transparent;\n\n &:placeholder-shown {\n ${ellipsis()}\n }\n\n &::placeholder {\n color: ${contents200};\n }\n\n &:focus {\n outline: none;\n }\n`;\n\nexport const InputLabel = styled.label`\n ${getTypographyStyles('SubTitle1')}\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ${roleRed};\n }\n`;\n\nexport const InputError = styled.div`\n ${getTypographyStyles('Caption1')}\n color: ${roleRed};\n\n margin-top: 8px;\n`;\n\nexport const InputHintText = styled.span<{ textColor?: ColorVariable }>`\n ${getTypographyStyles('UIBody2')}\n color: ${({ textColor }) => textColor};\n white-space: nowrap;\n`;\n\nexport const InputTogglePasswordVisibilityButton = styled.button`\n all: unset;\n appearance: none;\n cursor: pointer;\n flex-shrink: 0;\n\n & > svg {\n display: block;\n }\n`;\n"],"names":["InputWrapper","InputDecorator","InputTogglePasswordVisibilityButton"],"mappings":";;;;;;AAAa;AAeAA;AACT;AAAS;AAIR;;AAkBD;;AAAsB;AAcvB;AAGUC;AAQN;;;;AA+CI;AAAY;AAAgB;AAI1BC;;"}
1
+ {"version":3,"file":"styles.esm.js","sources":["../../../../src/Inputs/TextInput/styles.ts"],"sourcesContent":["'use client';\n\nimport type { ColorVariable } from '@remember-web/mixin';\nimport {\n bg200,\n contents000,\n contents200,\n contents300,\n ellipsis,\n getTypographyStyles,\n roleRed,\n} from '@remember-web/mixin';\nimport { formatUnit } from '@remember-web/shared';\nimport styled, { css } from 'styled-components';\n\nexport const InputWrapper = styled.div<{ $width?: string | number }>`\n ${({ $width }) =>\n $width &&\n css`\n width: ${formatUnit($width)};\n `};\n`;\n\nexport const InputContainer = styled.div<{\n disabled?: boolean;\n $hasError?: boolean;\n}>`\n display: flex;\n align-items: center;\n border: 1px solid ${contents300};\n border-radius: 4px;\n padding: 0 12px;\n gap: 8px;\n\n transition:\n border-color 0.2s,\n background-color 0.2s;\n\n ${({ $hasError, disabled }) => [\n $hasError\n ? css`\n border-color: ${roleRed};\n `\n : css`\n &:focus-within {\n border-color: ${contents000};\n }\n `,\n disabled &&\n css`\n background-color: ${bg200};\n `,\n ]}\n`;\n\nexport const InputDecorator = styled.div`\n flex-shrink: 0;\n /* Inline요소가 들어오면 강제로 block으로 처리 (중앙정렬을 위해) */\n > * {\n display: block;\n }\n`;\n\nexport const InputInner = styled.input`\n ${getTypographyStyles('UIBody2')}\n color: ${contents000};\n\n display: block;\n flex-grow: 1;\n width: 100%;\n padding: 10px 0;\n border: 0;\n background-color: transparent;\n\n &:placeholder-shown {\n ${ellipsis()}\n }\n\n &::placeholder {\n color: ${contents200};\n }\n\n &:focus {\n outline: none;\n }\n`;\n\nexport const InputLabel = styled.label`\n ${getTypographyStyles('Title2')}\n display: block;\n margin-bottom: 12px;\n display: flex;\n align-items: center;\n gap: 4px;\n\n & > mark {\n all: unset;\n color: ${roleRed};\n }\n`;\n\nexport const InputError = styled.div`\n ${getTypographyStyles('UIBody3')}\n color: ${roleRed};\n\n margin-top: 8px;\n`;\n\nexport const InputHintText = styled.span<{ textColor?: ColorVariable }>`\n ${getTypographyStyles('UIBody2')}\n color: ${({ textColor }) => textColor};\n white-space: nowrap;\n`;\n\nexport const InputTogglePasswordVisibilityButton = styled.button`\n all: unset;\n appearance: none;\n cursor: pointer;\n flex-shrink: 0;\n\n & > svg {\n display: block;\n }\n`;\n"],"names":["InputWrapper","InputDecorator","InputTogglePasswordVisibilityButton"],"mappings":";;;;;;AAAa;AAeAA;AACT;AAAS;AAIR;;AAkBD;;AAAsB;AAcvB;AAGUC;AAQN;;;;AA+CI;AAAY;AAAgB;AAI1BC;;"}
@@ -3,6 +3,9 @@ import type { InputHTMLAttributes, ReactNode } from 'react';
3
3
  type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, `aria-${string}`>;
4
4
  type TextInputProps = {
5
5
  type?: 'text' | 'number' | 'email' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local';
6
+ /**
7
+ * @deprecated Label 컴포넌트를 사용해 주세요.
8
+ */
6
9
  label?: ReactNode;
7
10
  hintText?: string;
8
11
  hintTextColor?: ColorVariable;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/Inputs/TextInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5D,KAAK,cAAc,GAAG,IAAI,CACxB,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,QAAQ,MAAM,EAAE,CACjB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,CAAC,EACD,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,KAAK,GACL,KAAK,GACL,MAAM,GACN,gBAAgB,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IACvD,IAAI,EAAE,UAAU,CAAC;IACjB,iCAAiC,EAAE,OAAO,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,CAAC,cAAc,GAAG,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/Inputs/TextInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5D,KAAK,cAAc,GAAG,IAAI,CACxB,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,QAAQ,MAAM,EAAE,CACjB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,CAAC,EACD,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,KAAK,GACL,KAAK,GACL,MAAM,GACN,gBAAgB,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IACvD,IAAI,EAAE,UAAU,CAAC;IACjB,iCAAiC,EAAE,OAAO,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,CAAC,cAAc,GAAG,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
+ require('../../Common/Divider/index.cjs.js');
6
+ var index = require('../../Common/Flex/index.cjs.js');
7
+ require('../../Common/Grid/index.cjs.js');
8
+ var icon = require('@remember-web/icon');
9
+ require('../../Common/Spinner/styles.cjs.js');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+ var react = require('react');
12
+ require('../../Common/Skeleton/styles.cjs.js');
13
+ require('../../Common/Typography/styles.cjs.js');
14
+ var styles = require('./styles.cjs.js');
15
+
16
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
17
+
18
+ var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);
19
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWithoutProperties);
20
+
21
+ var _excluded = ["text", "children", "direction", "size", "gap", "width", "rightElement", "required", "className"];
22
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
23
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24
+ var Label = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
25
+ var text = _ref.text,
26
+ children = _ref.children,
27
+ _ref$direction = _ref.direction,
28
+ direction = _ref$direction === void 0 ? 'top-left' : _ref$direction,
29
+ _ref$size = _ref.size,
30
+ size = _ref$size === void 0 ? 'small' : _ref$size,
31
+ gap = _ref.gap,
32
+ width = _ref.width,
33
+ rightElement = _ref.rightElement,
34
+ required = _ref.required,
35
+ className = _ref.className,
36
+ props = _objectWithoutProperties__default.default(_ref, _excluded);
37
+ return /*#__PURE__*/jsxRuntime.jsxs(styles.LabelContainer, _objectSpread(_objectSpread({
38
+ ref: ref,
39
+ $size: size,
40
+ className: className,
41
+ $direction: direction,
42
+ $gap: gap,
43
+ $width: width
44
+ }, props), {}, {
45
+ children: [/*#__PURE__*/jsxRuntime.jsxs(index.Flex, {
46
+ gap: 4,
47
+ children: [text, /*#__PURE__*/jsxRuntime.jsxs(index.Flex, {
48
+ children: [rightElement, required && /*#__PURE__*/jsxRuntime.jsx(index.Flex, {
49
+ className: "required-icon",
50
+ children: /*#__PURE__*/jsxRuntime.jsx(icon.IconRequiredS, {})
51
+ })]
52
+ })]
53
+ }), children]
54
+ }));
55
+ });
56
+
57
+ module.exports = Label;
58
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/Labels/Label/index.tsx"],"sourcesContent":["import { Flex } from '@/Common';\nimport { IconRequiredS } from '@remember-web/icon';\nimport { forwardRef } from 'react';\nimport { LabelContainer } from './styles';\nimport type { LabelProps } from './types';\n\nconst Label = forwardRef<HTMLLabelElement, LabelProps>(\n (\n {\n text,\n children,\n direction = 'top-left',\n size = 'small',\n gap,\n width,\n rightElement,\n required,\n className,\n ...props\n },\n ref\n ) => {\n return (\n <LabelContainer\n ref={ref}\n $size={size}\n className={className}\n $direction={direction}\n $gap={gap}\n $width={width}\n {...props}\n >\n <Flex gap={4}>\n {text}\n <Flex>\n {rightElement}\n {required && (\n <Flex className=\"required-icon\">\n <IconRequiredS />\n </Flex>\n )}\n </Flex>\n </Flex>\n {children}\n </LabelContainer>\n );\n }\n);\n\nexport default Label;\n"],"names":["Label","forwardRef","_ref","ref","text","children","_ref$direction","direction","_ref$size","size","gap","width","rightElement","required","className","props","_objectWithoutProperties","_excluded","_jsxs","LabelContainer","_objectSpread","$size","$direction","$gap","$width","Flex","_jsx","IconRequiredS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAMMA,IAAAA,KAAK,gBAAGC,gBAAU,CACtB,UAAAC,IAAA,EAaEC,GAAG,EACA;AAAA,EAAA,IAZDC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,cAAA;IAAAE,SAAA,GAAAN,IAAA,CACtBO,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,SAAA;IACdE,GAAG,GAAAR,IAAA,CAAHQ,GAAG;IACHC,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,YAAY,GAAAV,IAAA,CAAZU,YAAY;IACZC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IACRC,SAAS,GAAAZ,IAAA,CAATY,SAAS;AACNC,IAAAA,KAAK,GAAAC,yCAAA,CAAAd,IAAA,EAAAe,SAAA,CAAA,CAAA;AAIV,EAAA,oBACEC,eAAA,CAACC,qBAAc,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACbjB,IAAAA,GAAG,EAAEA,GAAI;AACTkB,IAAAA,KAAK,EAAEZ,IAAK;AACZK,IAAAA,SAAS,EAAEA,SAAU;AACrBQ,IAAAA,UAAU,EAAEf,SAAU;AACtBgB,IAAAA,IAAI,EAAEb,GAAI;AACVc,IAAAA,MAAM,EAAEb,KAAAA;AAAM,GAAA,EACVI,KAAK,CAAA,EAAA,EAAA,EAAA;IAAAV,QAAA,EAAA,cAETa,eAAA,CAACO,UAAI,EAAA;AAACf,MAAAA,GAAG,EAAE,CAAE;AAAAL,MAAAA,QAAA,EACVD,CAAAA,IAAI,eACLc,eAAA,CAACO,UAAI,EAAA;AAAApB,QAAAA,QAAA,GACFO,YAAY,EACZC,QAAQ,iBACPa,cAAA,CAACD,UAAI,EAAA;AAACX,UAAAA,SAAS,EAAC,eAAe;AAAAT,UAAAA,QAAA,eAC7BqB,cAAA,CAACC,kBAAa,EAAE,EAAA,CAAA;AAAC,SACb,CACP,CAAA;AAAA,OACG,CAAC,CAAA;KACH,CAAC,EACNtB,QAAQ,CAAA;AAAA,GAAA,CACK,CAAC,CAAA;AAErB,CACF;;;;"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { LabelProps } from './types';
3
+ declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
4
+ export default Label;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Labels/Label/index.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,KAAK,yGAyCV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,51 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import '../../Common/Divider/index.esm.js';
4
+ import { Flex } from '../../Common/Flex/index.esm.js';
5
+ import '../../Common/Grid/index.esm.js';
6
+ import { IconRequiredS } from '@remember-web/icon';
7
+ import '../../Common/Spinner/styles.esm.js';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
+ import { forwardRef } from 'react';
10
+ import '../../Common/Skeleton/styles.esm.js';
11
+ import '../../Common/Typography/styles.esm.js';
12
+ import { LabelContainer } from './styles.esm.js';
13
+
14
+ var _excluded = ["text", "children", "direction", "size", "gap", "width", "rightElement", "required", "className"];
15
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
+ var Label = /*#__PURE__*/forwardRef(function (_ref, ref) {
18
+ var text = _ref.text,
19
+ children = _ref.children,
20
+ _ref$direction = _ref.direction,
21
+ direction = _ref$direction === void 0 ? 'top-left' : _ref$direction,
22
+ _ref$size = _ref.size,
23
+ size = _ref$size === void 0 ? 'small' : _ref$size,
24
+ gap = _ref.gap,
25
+ width = _ref.width,
26
+ rightElement = _ref.rightElement,
27
+ required = _ref.required,
28
+ className = _ref.className,
29
+ props = _objectWithoutProperties(_ref, _excluded);
30
+ return /*#__PURE__*/jsxs(LabelContainer, _objectSpread(_objectSpread({
31
+ ref: ref,
32
+ $size: size,
33
+ className: className,
34
+ $direction: direction,
35
+ $gap: gap,
36
+ $width: width
37
+ }, props), {}, {
38
+ children: [/*#__PURE__*/jsxs(Flex, {
39
+ gap: 4,
40
+ children: [text, /*#__PURE__*/jsxs(Flex, {
41
+ children: [rightElement, required && /*#__PURE__*/jsx(Flex, {
42
+ className: "required-icon",
43
+ children: /*#__PURE__*/jsx(IconRequiredS, {})
44
+ })]
45
+ })]
46
+ }), children]
47
+ }));
48
+ });
49
+
50
+ export { Label as default };
51
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/Labels/Label/index.tsx"],"sourcesContent":["import { Flex } from '@/Common';\nimport { IconRequiredS } from '@remember-web/icon';\nimport { forwardRef } from 'react';\nimport { LabelContainer } from './styles';\nimport type { LabelProps } from './types';\n\nconst Label = forwardRef<HTMLLabelElement, LabelProps>(\n (\n {\n text,\n children,\n direction = 'top-left',\n size = 'small',\n gap,\n width,\n rightElement,\n required,\n className,\n ...props\n },\n ref\n ) => {\n return (\n <LabelContainer\n ref={ref}\n $size={size}\n className={className}\n $direction={direction}\n $gap={gap}\n $width={width}\n {...props}\n >\n <Flex gap={4}>\n {text}\n <Flex>\n {rightElement}\n {required && (\n <Flex className=\"required-icon\">\n <IconRequiredS />\n </Flex>\n )}\n </Flex>\n </Flex>\n {children}\n </LabelContainer>\n );\n }\n);\n\nexport default Label;\n"],"names":["Label","forwardRef","_ref","ref","text","children","_ref$direction","direction","_ref$size","size","gap","width","rightElement","required","className","props","_objectWithoutProperties","_excluded","_jsxs","LabelContainer","_objectSpread","$size","$direction","$gap","$width","Flex","_jsx","IconRequiredS"],"mappings":";;;;;;;;;;;;;;;;AAMMA,IAAAA,KAAK,gBAAGC,UAAU,CACtB,UAAAC,IAAA,EAaEC,GAAG,EACA;AAAA,EAAA,IAZDC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,cAAA;IAAAE,SAAA,GAAAN,IAAA,CACtBO,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,SAAA;IACdE,GAAG,GAAAR,IAAA,CAAHQ,GAAG;IACHC,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,YAAY,GAAAV,IAAA,CAAZU,YAAY;IACZC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IACRC,SAAS,GAAAZ,IAAA,CAATY,SAAS;AACNC,IAAAA,KAAK,GAAAC,wBAAA,CAAAd,IAAA,EAAAe,SAAA,CAAA,CAAA;AAIV,EAAA,oBACEC,IAAA,CAACC,cAAc,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACbjB,IAAAA,GAAG,EAAEA,GAAI;AACTkB,IAAAA,KAAK,EAAEZ,IAAK;AACZK,IAAAA,SAAS,EAAEA,SAAU;AACrBQ,IAAAA,UAAU,EAAEf,SAAU;AACtBgB,IAAAA,IAAI,EAAEb,GAAI;AACVc,IAAAA,MAAM,EAAEb,KAAAA;AAAM,GAAA,EACVI,KAAK,CAAA,EAAA,EAAA,EAAA;IAAAV,QAAA,EAAA,cAETa,IAAA,CAACO,IAAI,EAAA;AAACf,MAAAA,GAAG,EAAE,CAAE;AAAAL,MAAAA,QAAA,EACVD,CAAAA,IAAI,eACLc,IAAA,CAACO,IAAI,EAAA;AAAApB,QAAAA,QAAA,GACFO,YAAY,EACZC,QAAQ,iBACPa,GAAA,CAACD,IAAI,EAAA;AAACX,UAAAA,SAAS,EAAC,eAAe;AAAAT,UAAAA,QAAA,eAC7BqB,GAAA,CAACC,aAAa,EAAE,EAAA,CAAA;AAAC,SACb,CACP,CAAA;AAAA,OACG,CAAC,CAAA;KACH,CAAC,EACNtB,QAAQ,CAAA;AAAA,GAAA,CACK,CAAC,CAAA;AAErB,CACF;;;;"}
@@ -0,0 +1,79 @@
1
+ 'use strict';
2
+
3
+ var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
4
+ var mixin = require('@remember-web/mixin');
5
+ var styled = require('styled-components');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefault(_taggedTemplateLiteral);
10
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
11
+
12
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
13
+ var LabelContainer = styled__default.default.label(_templateObject || (_templateObject = _taggedTemplateLiteral__default.default(["\n display: flex;\n position: relative;\n width: ", ";\n min-width: min-content; \n\n ", "\n\n ", "\n\n /* Size styles */\n ", "\n"])), function (_ref) {
14
+ var _ref$$width = _ref.$width,
15
+ $width = _ref$$width === void 0 ? 'auto' : _ref$$width;
16
+ return $width;
17
+ }, function (_ref2) {
18
+ var $size = _ref2.$size,
19
+ $gap = _ref2.$gap;
20
+ var defaultGap = $size === 'large' ? '12px' : '8px';
21
+ var finalGap = $gap !== undefined ? "".concat($gap, "px") : defaultGap;
22
+ return styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default.default(["\n gap: ", ";\n "])), finalGap);
23
+ }, function (_ref3) {
24
+ var _ref3$$direction = _ref3.$direction,
25
+ $direction = _ref3$$direction === void 0 ? 'top' : _ref3$$direction;
26
+ switch ($direction) {
27
+ // Top variations
28
+ case 'top':
29
+ return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default.default(["\n flex-direction: column;\n align-items: flex-start;\n "])));
30
+ case 'top-left':
31
+ return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral__default.default(["\n flex-direction: column;\n align-items: flex-start;\n "])));
32
+ case 'top-right':
33
+ return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral__default.default(["\n flex-direction: column;\n align-items: flex-end;\n "])));
34
+ case 'top-center':
35
+ return styled.css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral__default.default(["\n flex-direction: column;\n align-items: center;\n "])));
36
+
37
+ // Bottom variations
38
+ case 'bottom':
39
+ return styled.css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral__default.default(["\n flex-direction: column-reverse;\n align-items: flex-start;\n "])));
40
+ case 'bottom-left':
41
+ return styled.css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral__default.default(["\n flex-direction: column-reverse;\n align-items: flex-start;\n "])));
42
+ case 'bottom-right':
43
+ return styled.css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral__default.default(["\n flex-direction: column-reverse;\n align-items: flex-end;\n "])));
44
+ case 'bottom-center':
45
+ return styled.css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral__default.default(["\n flex-direction: column-reverse;\n align-items: center;\n "])));
46
+
47
+ // Left variations
48
+ case 'left':
49
+ return styled.css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral__default.default(["\n flex-direction: row;\n align-items: center;\n "])));
50
+ case 'left-top':
51
+ return styled.css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral__default.default(["\n flex-direction: row;\n align-items: flex-start;\n "])));
52
+ case 'left-bottom':
53
+ return styled.css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral__default.default(["\n flex-direction: row;\n align-items: flex-end;\n "])));
54
+ case 'left-center':
55
+ return styled.css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral__default.default(["\n flex-direction: row;\n align-items: center;\n "])));
56
+
57
+ // Right variations
58
+ case 'right':
59
+ return styled.css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral__default.default(["\n flex-direction: row-reverse;\n align-items: center;\n "])));
60
+ case 'right-top':
61
+ return styled.css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral__default.default(["\n flex-direction: row-reverse;\n align-items: flex-start;\n "])));
62
+ case 'right-bottom':
63
+ return styled.css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral__default.default(["\n flex-direction: row-reverse;\n align-items: flex-end;\n "])));
64
+ case 'right-center':
65
+ return styled.css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral__default.default(["\n flex-direction: row-reverse;\n align-items: center;\n "])));
66
+ }
67
+ }, function (_ref4) {
68
+ var $size = _ref4.$size;
69
+ switch ($size) {
70
+ case 'small':
71
+ return styled.css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral__default.default(["\n ", "\n color: ", ";\n "])), mixin.getTypographyStyles('UIBody2'), mixin.contents100);
72
+ case 'large':
73
+ default:
74
+ return styled.css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral__default.default(["\n ", "\n color: ", ";\n "])), mixin.getTypographyStyles('Title2'), mixin.contents000);
75
+ }
76
+ });
77
+
78
+ exports.LabelContainer = LabelContainer;
79
+ //# sourceMappingURL=styles.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.cjs.js","sources":["../../../../src/Labels/Label/styles.ts"],"sourcesContent":["import {\n contents000,\n contents100,\n getTypographyStyles,\n} from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\nimport type { LabelProps } from './types';\n\ninterface LabelContainerProps {\n $size: LabelProps['size'];\n $direction: LabelProps['direction'];\n $gap: LabelProps['gap'];\n $width: LabelProps['width'];\n}\nexport const LabelContainer = styled.label<LabelContainerProps>`\n display: flex;\n position: relative;\n width: ${({ $width = 'auto' }) => $width};\n min-width: min-content; \n\n ${({ $size, $gap }) => {\n const defaultGap = $size === 'large' ? '12px' : '8px';\n const finalGap = $gap !== undefined ? `${$gap}px` : defaultGap;\n\n return css`\n gap: ${finalGap};\n `;\n }}\n\n ${({ $direction = 'top' }) => {\n switch ($direction) {\n // Top variations\n case 'top':\n return css`\n flex-direction: column;\n align-items: flex-start;\n `;\n case 'top-left':\n return css`\n flex-direction: column;\n align-items: flex-start;\n `;\n case 'top-right':\n return css`\n flex-direction: column;\n align-items: flex-end;\n `;\n case 'top-center':\n return css`\n flex-direction: column;\n align-items: center;\n `;\n\n // Bottom variations\n case 'bottom':\n return css`\n flex-direction: column-reverse;\n align-items: flex-start;\n `;\n case 'bottom-left':\n return css`\n flex-direction: column-reverse;\n align-items: flex-start;\n `;\n case 'bottom-right':\n return css`\n flex-direction: column-reverse;\n align-items: flex-end;\n `;\n case 'bottom-center':\n return css`\n flex-direction: column-reverse;\n align-items: center;\n `;\n\n // Left variations\n case 'left':\n return css`\n flex-direction: row;\n align-items: center;\n `;\n case 'left-top':\n return css`\n flex-direction: row;\n align-items: flex-start;\n `;\n case 'left-bottom':\n return css`\n flex-direction: row;\n align-items: flex-end;\n `;\n case 'left-center':\n return css`\n flex-direction: row;\n align-items: center;\n `;\n\n // Right variations\n case 'right':\n return css`\n flex-direction: row-reverse;\n align-items: center;\n `;\n case 'right-top':\n return css`\n flex-direction: row-reverse;\n align-items: flex-start;\n `;\n case 'right-bottom':\n return css`\n flex-direction: row-reverse;\n align-items: flex-end;\n `;\n case 'right-center':\n return css`\n flex-direction: row-reverse;\n align-items: center;\n `;\n }\n }}\n\n /* Size styles */\n ${({ $size }) => {\n switch ($size) {\n case 'small':\n return css`\n ${getTypographyStyles('UIBody2')}\n color: ${contents100};\n `;\n case 'large':\n default:\n return css`\n ${getTypographyStyles('Title2')}\n color: ${contents000};\n `;\n }\n }}\n`;\n"],"names":["LabelContainer","styled","label","_templateObject","_taggedTemplateLiteral","_ref","_ref$$width","$width","_ref2","$size","$gap","defaultGap","finalGap","undefined","concat","css","_templateObject2","_ref3","_ref3$$direction","$direction","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","_templateObject12","_templateObject13","_templateObject14","_templateObject15","_templateObject16","_templateObject17","_templateObject18","_ref4","_templateObject19","getTypographyStyles","contents100","_templateObject20","contents000"],"mappings":";;;;;;;;;;;;AAcaA,IAAAA,cAAc,GAAGC,uBAAM,CAACC,KAAK,CAAAC,eAAA,KAAAA,eAAA,GAAAC,uCAAA,CAAA,CAAA,sDAAA,EAAA,qCAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,IAAA,CAAA,CAAA,CAAA,EAG/B,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAAC,WAAA,GAAAD,IAAA,CAAGE,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,WAAA,CAAA;AAAA,EAAA,OAAOC,MAAM,CAAA;AAAA,CAGtC,EAAA,UAAAC,KAAA,EAAqB;AAAA,EAAA,IAAlBC,KAAK,GAAAD,KAAA,CAALC,KAAK;IAAEC,IAAI,GAAAF,KAAA,CAAJE,IAAI,CAAA;EACd,IAAMC,UAAU,GAAGF,KAAK,KAAK,OAAO,GAAG,MAAM,GAAG,KAAK,CAAA;EACrD,IAAMG,QAAQ,GAAGF,IAAI,KAAKG,SAAS,MAAAC,MAAA,CAAMJ,IAAI,EAAA,IAAA,CAAA,GAAOC,UAAU,CAAA;EAE9D,OAAOI,UAAG,CAAAC,gBAAA,KAAAA,gBAAA,GAAAZ,uCAAA,iCACDQ,QAAQ,CAAA,CAAA;AAEnB,CAAC,EAEC,UAAAK,KAAA,EAA4B;AAAA,EAAA,IAAAC,gB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,CAAA;AAId,GAAA;AACF,CAAC,EAGE,UAAAgC,KAAA,EAAe;AAAA,EAAA,IAAZ3B,KAAK,GAAA2B,KAAA,CAAL3B,KAAK,CAAA;AACR,EAAA,QAAQA,KAAK;AACX,IAAA,KAAK,OAAO;AACV,MAAA,OAAOM,UAAG,CAAAsB,iBAAA,KAAAA,iBAAA,GAAAjC,uCAAA,CAAA,CAAA,cAAA,EAAA,qBAAA,EAAA,aAAA,CAAA,CAAA,CAAA,EACPkC,yBAAmB,CAAC,SAAS,CAAC,EACvBC,iBAAW,CAAA,CAAA;AAEvB,IAAA,KAAK,OAAO,CAAA;AACZ,IAAA;AACE,MAAA,OAAOxB,UAAG,CAAAyB,iBAAA,KAAAA,iBAAA,GAAApC,uCAAA,CAAA,CAAA,cAAA,EAAA,qBAAA,EAAA,aAAA,CAAA,CAAA,CAAA,EACPkC,yBAAmB,CAAC,QAAQ,CAAC,EACtBG,iBAAW,CAAA,CAAA;AAEzB,GAAA;AACF,CAAC;;;;"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { LabelProps } from './types';
3
+ interface LabelContainerProps {
4
+ $size: LabelProps['size'];
5
+ $direction: LabelProps['direction'];
6
+ $gap: LabelProps['gap'];
7
+ $width: LabelProps['width'];
8
+ }
9
+ export declare const LabelContainer: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, LabelContainerProps>>;
10
+ export {};
11
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/Labels/Label/styles.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,UAAU,mBAAmB;IAC3B,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAC7B;AACD,eAAO,MAAM,cAAc,yOA2H1B,CAAC"}
@@ -0,0 +1,72 @@
1
+ import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
2
+ import { getTypographyStyles, contents000, contents100 } from '@remember-web/mixin';
3
+ import styled, { css } from 'styled-components';
4
+
5
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
6
+ var LabelContainer = styled.label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n width: ", ";\n min-width: min-content; \n\n ", "\n\n ", "\n\n /* Size styles */\n ", "\n"])), function (_ref) {
7
+ var _ref$$width = _ref.$width,
8
+ $width = _ref$$width === void 0 ? 'auto' : _ref$$width;
9
+ return $width;
10
+ }, function (_ref2) {
11
+ var $size = _ref2.$size,
12
+ $gap = _ref2.$gap;
13
+ var defaultGap = $size === 'large' ? '12px' : '8px';
14
+ var finalGap = $gap !== undefined ? "".concat($gap, "px") : defaultGap;
15
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n gap: ", ";\n "])), finalGap);
16
+ }, function (_ref3) {
17
+ var _ref3$$direction = _ref3.$direction,
18
+ $direction = _ref3$$direction === void 0 ? 'top' : _ref3$$direction;
19
+ switch ($direction) {
20
+ // Top variations
21
+ case 'top':
22
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex-direction: column;\n align-items: flex-start;\n "])));
23
+ case 'top-left':
24
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex-direction: column;\n align-items: flex-start;\n "])));
25
+ case 'top-right':
26
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex-direction: column;\n align-items: flex-end;\n "])));
27
+ case 'top-center':
28
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex-direction: column;\n align-items: center;\n "])));
29
+
30
+ // Bottom variations
31
+ case 'bottom':
32
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex-direction: column-reverse;\n align-items: flex-start;\n "])));
33
+ case 'bottom-left':
34
+ return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n flex-direction: column-reverse;\n align-items: flex-start;\n "])));
35
+ case 'bottom-right':
36
+ return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n flex-direction: column-reverse;\n align-items: flex-end;\n "])));
37
+ case 'bottom-center':
38
+ return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n flex-direction: column-reverse;\n align-items: center;\n "])));
39
+
40
+ // Left variations
41
+ case 'left':
42
+ return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n "])));
43
+ case 'left-top':
44
+ return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: flex-start;\n "])));
45
+ case 'left-bottom':
46
+ return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: flex-end;\n "])));
47
+ case 'left-center':
48
+ return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n "])));
49
+
50
+ // Right variations
51
+ case 'right':
52
+ return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n flex-direction: row-reverse;\n align-items: center;\n "])));
53
+ case 'right-top':
54
+ return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n flex-direction: row-reverse;\n align-items: flex-start;\n "])));
55
+ case 'right-bottom':
56
+ return css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n flex-direction: row-reverse;\n align-items: flex-end;\n "])));
57
+ case 'right-center':
58
+ return css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n flex-direction: row-reverse;\n align-items: center;\n "])));
59
+ }
60
+ }, function (_ref4) {
61
+ var $size = _ref4.$size;
62
+ switch ($size) {
63
+ case 'small':
64
+ return css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n "])), getTypographyStyles('UIBody2'), contents100);
65
+ case 'large':
66
+ default:
67
+ return css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n "])), getTypographyStyles('Title2'), contents000);
68
+ }
69
+ });
70
+
71
+ export { LabelContainer };
72
+ //# sourceMappingURL=styles.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.esm.js","sources":["../../../../src/Labels/Label/styles.ts"],"sourcesContent":["import {\n contents000,\n contents100,\n getTypographyStyles,\n} from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\nimport type { LabelProps } from './types';\n\ninterface LabelContainerProps {\n $size: LabelProps['size'];\n $direction: LabelProps['direction'];\n $gap: LabelProps['gap'];\n $width: LabelProps['width'];\n}\nexport const LabelContainer = styled.label<LabelContainerProps>`\n display: flex;\n position: relative;\n width: ${({ $width = 'auto' }) => $width};\n min-width: min-content; \n\n ${({ $size, $gap }) => {\n const defaultGap = $size === 'large' ? '12px' : '8px';\n const finalGap = $gap !== undefined ? `${$gap}px` : defaultGap;\n\n return css`\n gap: ${finalGap};\n `;\n }}\n\n ${({ $direction = 'top' }) => {\n switch ($direction) {\n // Top variations\n case 'top':\n return css`\n flex-direction: column;\n align-items: flex-start;\n `;\n case 'top-left':\n return css`\n flex-direction: column;\n align-items: flex-start;\n `;\n case 'top-right':\n return css`\n flex-direction: column;\n align-items: flex-end;\n `;\n case 'top-center':\n return css`\n flex-direction: column;\n align-items: center;\n `;\n\n // Bottom variations\n case 'bottom':\n return css`\n flex-direction: column-reverse;\n align-items: flex-start;\n `;\n case 'bottom-left':\n return css`\n flex-direction: column-reverse;\n align-items: flex-start;\n `;\n case 'bottom-right':\n return css`\n flex-direction: column-reverse;\n align-items: flex-end;\n `;\n case 'bottom-center':\n return css`\n flex-direction: column-reverse;\n align-items: center;\n `;\n\n // Left variations\n case 'left':\n return css`\n flex-direction: row;\n align-items: center;\n `;\n case 'left-top':\n return css`\n flex-direction: row;\n align-items: flex-start;\n `;\n case 'left-bottom':\n return css`\n flex-direction: row;\n align-items: flex-end;\n `;\n case 'left-center':\n return css`\n flex-direction: row;\n align-items: center;\n `;\n\n // Right variations\n case 'right':\n return css`\n flex-direction: row-reverse;\n align-items: center;\n `;\n case 'right-top':\n return css`\n flex-direction: row-reverse;\n align-items: flex-start;\n `;\n case 'right-bottom':\n return css`\n flex-direction: row-reverse;\n align-items: flex-end;\n `;\n case 'right-center':\n return css`\n flex-direction: row-reverse;\n align-items: center;\n `;\n }\n }}\n\n /* Size styles */\n ${({ $size }) => {\n switch ($size) {\n case 'small':\n return css`\n ${getTypographyStyles('UIBody2')}\n color: ${contents100};\n `;\n case 'large':\n default:\n return css`\n ${getTypographyStyles('Title2')}\n color: ${contents000};\n `;\n }\n }}\n`;\n"],"names":["LabelContainer","styled","label","_templateObject","_taggedTemplateLiteral","_ref","_ref$$width","$width","_ref2","$size","$gap","defaultGap","finalGap","undefined","concat","css","_templateObject2","_ref3","_ref3$$direction","$direction","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","_templateObject12","_templateObject13","_templateObject14","_templateObject15","_templateObject16","_templateObject17","_templateObject18","_ref4","_templateObject19","getTypographyStyles","contents100","_templateObject20","contents000"],"mappings":";;;;;AAcaA,IAAAA,cAAc,GAAGC,MAAM,CAACC,KAAK,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,CAAA,CAAA,sDAAA,EAAA,qCAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,IAAA,CAAA,CAAA,CA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AC,EACtBG,WAAW,CAAA,CAAA;AAEzB,GAAA;AACF,CAAC;;;;"}
@@ -0,0 +1,13 @@
1
+ import type { LabelHTMLAttributes } from 'react';
2
+ export type Direction = 'top' | 'top-left' | 'top-right' | 'top-center' | 'bottom' | 'bottom-left' | 'bottom-right' | 'bottom-center' | 'left' | 'left-top' | 'left-bottom' | 'left-center' | 'right' | 'right-top' | 'right-bottom' | 'right-center';
3
+ export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
4
+ text: string;
5
+ size?: 'small' | 'large';
6
+ gap?: number;
7
+ width?: string;
8
+ rightElement?: React.ReactNode;
9
+ required?: boolean;
10
+ direction?: Direction;
11
+ children?: React.ReactNode;
12
+ }
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/Labels/Label/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,MAAM,SAAS,GACjB,KAAK,GACL,UAAU,GACV,WAAW,GACX,YAAY,GACZ,QAAQ,GACR,aAAa,GACb,cAAc,GACd,eAAe,GACf,MAAM,GACN,UAAU,GACV,aAAa,GACb,aAAa,GACb,OAAO,GACP,WAAW,GACX,cAAc,GACd,cAAc,CAAC;AAEnB,MAAM,WAAW,UAAW,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export { default as Label } from './Label';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Labels/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -32,6 +32,7 @@ var index$k = require('./Floating/Tooltip/index.cjs.js');
32
32
  var styles$2 = require('./Floating/DropdownMenu/styles.cjs.js');
33
33
  var styles$3 = require('./Floating/Popover/styles.cjs.js');
34
34
  var index$l = require('./Chips/Chip/index.cjs.js');
35
+ var index$m = require('./Labels/Label/index.cjs.js');
35
36
 
36
37
 
37
38
 
@@ -82,4 +83,5 @@ exports.StyledPopoverContentWrapper = styles$3.StyledPopoverContentWrapper;
82
83
  exports.showFadeIn = styles$3.showFadeIn;
83
84
  exports.showFadeOut = styles$3.showFadeOut;
84
85
  exports.Chip = index$l.Chip;
86
+ exports.Label = index$m;
85
87
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,4 +9,5 @@ export * from './Paginations';
9
9
  export * from './Inputs';
10
10
  export * from './Floating';
11
11
  export * from './Chips';
12
+ export * from './Labels';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
@@ -30,4 +30,5 @@ export { default as Tooltip } from './Floating/Tooltip/index.esm.js';
30
30
  export { DropdownMenuItemDisabledCSS, DropdownMenuItemHoverCSS, StyledDropdownMenuContent, StyledDropdownMenuContentWrapper, StyledDropdownMenuItem, StyledDropdownMenuSection, StyledDropdownMenuSectionTitle, dropdownMenuItemCSS, getDropdownMenuItemCss } from './Floating/DropdownMenu/styles.esm.js';
31
31
  export { StyledPopoverContent, StyledPopoverContentWrapper, showFadeIn, showFadeOut } from './Floating/Popover/styles.esm.js';
32
32
  export { Chip } from './Chips/Chip/index.esm.js';
33
+ export { default as Label } from './Labels/Label/index.esm.js';
33
34
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remember-web/primitive",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Remember Web Primitive Components",
5
5
  "homepage": "https://dramancompany.github.io/remember-web-packages/",
6
6
  "author": "Remember",
@@ -41,7 +41,7 @@
41
41
  "@radix-ui/react-separator": "^1.0.3",
42
42
  "@radix-ui/react-switch": "^1.0.3",
43
43
  "@radix-ui/react-tooltip": "^1.0.7",
44
- "@remember-web/icon": "^0.1.12",
44
+ "@remember-web/icon": "^0.1.13",
45
45
  "@remember-web/mixin": "^0.2.6",
46
46
  "@remember-web/shared": "^0.1.1"
47
47
  },
@@ -39,7 +39,7 @@ export const SelectContainer = styled.div<{ $width?: number | string }>`
39
39
  `;
40
40
 
41
41
  export const SelectLabel = styled.label`
42
- ${getTypographyStyles('SubTitle1')}
42
+ ${getTypographyStyles('Title2')}
43
43
  display: block;
44
44
  margin-bottom: 12px;
45
45
  display: flex;
@@ -17,6 +17,9 @@ export type SelectBaseProps<Value extends SelectValue> = {
17
17
  className?: string;
18
18
  disabled?: boolean;
19
19
  error?: boolean;
20
+ /**
21
+ * @deprecated Label 컴포넌트를 사용해 주세요.
22
+ */
20
23
  label?: ReactNode;
21
24
  required?: boolean;
22
25
  // TODO: children의 prop에 따라 결정되는 제네릭 구현이 필요 infer를 활용하면 될 것 같기도 한데 추후 확인
@@ -86,7 +86,7 @@ export const InputInner = styled.input`
86
86
  `;
87
87
 
88
88
  export const InputLabel = styled.label`
89
- ${getTypographyStyles('SubTitle1')}
89
+ ${getTypographyStyles('Title2')}
90
90
  display: block;
91
91
  margin-bottom: 12px;
92
92
  display: flex;
@@ -100,7 +100,7 @@ export const InputLabel = styled.label`
100
100
  `;
101
101
 
102
102
  export const InputError = styled.div`
103
- ${getTypographyStyles('Caption1')}
103
+ ${getTypographyStyles('UIBody3')}
104
104
  color: ${roleRed};
105
105
 
106
106
  margin-top: 8px;
@@ -16,6 +16,9 @@ type TextInputProps = {
16
16
  | 'url'
17
17
  | 'date'
18
18
  | 'datetime-local';
19
+ /**
20
+ * @deprecated Label 컴포넌트를 사용해 주세요.
21
+ */
19
22
  label?: ReactNode;
20
23
  hintText?: string;
21
24
  hintTextColor?: ColorVariable;
@@ -0,0 +1,68 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+
3
+ import { Flex } from '@/Common';
4
+ import { Select, TextInput } from '@/Inputs';
5
+ import {
6
+ getIconComponentFromName,
7
+ iconNames,
8
+ isIconName,
9
+ } from '@/stories/util';
10
+ import { createElement } from 'react';
11
+ import Label from '.';
12
+
13
+ type Story = StoryObj<typeof Label>;
14
+
15
+ const meta = {
16
+ title: 'Primitive/Labels/Label',
17
+ component: Label,
18
+ argTypes: {
19
+ text: { control: 'text' },
20
+ children: { control: 'text' },
21
+ size: { control: 'select', options: ['small', 'large'] },
22
+ rightElement: { control: 'select', options: iconNames },
23
+ required: { control: 'boolean' },
24
+ direction: {
25
+ control: 'select',
26
+ options: [
27
+ 'top',
28
+ 'top-left',
29
+ 'top-right',
30
+ 'top-center',
31
+ 'bottom',
32
+ 'bottom-left',
33
+ 'bottom-right',
34
+ 'bottom-center',
35
+ 'left',
36
+ 'left-top',
37
+ 'left-bottom',
38
+ 'left-center',
39
+ 'right',
40
+ 'right-top',
41
+ 'right-bottom',
42
+ 'right-center',
43
+ ],
44
+ },
45
+ },
46
+ args: {
47
+ text: 'Label 컴포넌트',
48
+ children: <TextInput width="300px" />,
49
+ },
50
+ } satisfies Meta<typeof Label>;
51
+
52
+ export const Default: Story = {
53
+ render: ({ rightElement, ...props }) => {
54
+ const RightIconString = String(rightElement);
55
+ const renderedRightElement =
56
+ rightElement &&
57
+ isIconName(RightIconString) &&
58
+ createElement(getIconComponentFromName(RightIconString));
59
+ return (
60
+ <Flex gap={20} justify="unset" style={{ width: '100%' }}>
61
+ <Label rightElement={renderedRightElement} {...props} />
62
+ <Label text="children 없이 독립적으로 사용 가능" required />
63
+ </Flex>
64
+ );
65
+ },
66
+ };
67
+
68
+ export default meta;
@@ -0,0 +1,50 @@
1
+ import { Flex } from '@/Common';
2
+ import { IconRequiredS } from '@remember-web/icon';
3
+ import { forwardRef } from 'react';
4
+ import { LabelContainer } from './styles';
5
+ import type { LabelProps } from './types';
6
+
7
+ const Label = forwardRef<HTMLLabelElement, LabelProps>(
8
+ (
9
+ {
10
+ text,
11
+ children,
12
+ direction = 'top-left',
13
+ size = 'small',
14
+ gap,
15
+ width,
16
+ rightElement,
17
+ required,
18
+ className,
19
+ ...props
20
+ },
21
+ ref
22
+ ) => {
23
+ return (
24
+ <LabelContainer
25
+ ref={ref}
26
+ $size={size}
27
+ className={className}
28
+ $direction={direction}
29
+ $gap={gap}
30
+ $width={width}
31
+ {...props}
32
+ >
33
+ <Flex gap={4}>
34
+ {text}
35
+ <Flex>
36
+ {rightElement}
37
+ {required && (
38
+ <Flex className="required-icon">
39
+ <IconRequiredS />
40
+ </Flex>
41
+ )}
42
+ </Flex>
43
+ </Flex>
44
+ {children}
45
+ </LabelContainer>
46
+ );
47
+ }
48
+ );
49
+
50
+ export default Label;
@@ -0,0 +1,138 @@
1
+ import {
2
+ contents000,
3
+ contents100,
4
+ getTypographyStyles,
5
+ } from '@remember-web/mixin';
6
+ import styled, { css } from 'styled-components';
7
+ import type { LabelProps } from './types';
8
+
9
+ interface LabelContainerProps {
10
+ $size: LabelProps['size'];
11
+ $direction: LabelProps['direction'];
12
+ $gap: LabelProps['gap'];
13
+ $width: LabelProps['width'];
14
+ }
15
+ export const LabelContainer = styled.label<LabelContainerProps>`
16
+ display: flex;
17
+ position: relative;
18
+ width: ${({ $width = 'auto' }) => $width};
19
+ min-width: min-content;
20
+
21
+ ${({ $size, $gap }) => {
22
+ const defaultGap = $size === 'large' ? '12px' : '8px';
23
+ const finalGap = $gap !== undefined ? `${$gap}px` : defaultGap;
24
+
25
+ return css`
26
+ gap: ${finalGap};
27
+ `;
28
+ }}
29
+
30
+ ${({ $direction = 'top' }) => {
31
+ switch ($direction) {
32
+ // Top variations
33
+ case 'top':
34
+ return css`
35
+ flex-direction: column;
36
+ align-items: flex-start;
37
+ `;
38
+ case 'top-left':
39
+ return css`
40
+ flex-direction: column;
41
+ align-items: flex-start;
42
+ `;
43
+ case 'top-right':
44
+ return css`
45
+ flex-direction: column;
46
+ align-items: flex-end;
47
+ `;
48
+ case 'top-center':
49
+ return css`
50
+ flex-direction: column;
51
+ align-items: center;
52
+ `;
53
+
54
+ // Bottom variations
55
+ case 'bottom':
56
+ return css`
57
+ flex-direction: column-reverse;
58
+ align-items: flex-start;
59
+ `;
60
+ case 'bottom-left':
61
+ return css`
62
+ flex-direction: column-reverse;
63
+ align-items: flex-start;
64
+ `;
65
+ case 'bottom-right':
66
+ return css`
67
+ flex-direction: column-reverse;
68
+ align-items: flex-end;
69
+ `;
70
+ case 'bottom-center':
71
+ return css`
72
+ flex-direction: column-reverse;
73
+ align-items: center;
74
+ `;
75
+
76
+ // Left variations
77
+ case 'left':
78
+ return css`
79
+ flex-direction: row;
80
+ align-items: center;
81
+ `;
82
+ case 'left-top':
83
+ return css`
84
+ flex-direction: row;
85
+ align-items: flex-start;
86
+ `;
87
+ case 'left-bottom':
88
+ return css`
89
+ flex-direction: row;
90
+ align-items: flex-end;
91
+ `;
92
+ case 'left-center':
93
+ return css`
94
+ flex-direction: row;
95
+ align-items: center;
96
+ `;
97
+
98
+ // Right variations
99
+ case 'right':
100
+ return css`
101
+ flex-direction: row-reverse;
102
+ align-items: center;
103
+ `;
104
+ case 'right-top':
105
+ return css`
106
+ flex-direction: row-reverse;
107
+ align-items: flex-start;
108
+ `;
109
+ case 'right-bottom':
110
+ return css`
111
+ flex-direction: row-reverse;
112
+ align-items: flex-end;
113
+ `;
114
+ case 'right-center':
115
+ return css`
116
+ flex-direction: row-reverse;
117
+ align-items: center;
118
+ `;
119
+ }
120
+ }}
121
+
122
+ /* Size styles */
123
+ ${({ $size }) => {
124
+ switch ($size) {
125
+ case 'small':
126
+ return css`
127
+ ${getTypographyStyles('UIBody2')}
128
+ color: ${contents100};
129
+ `;
130
+ case 'large':
131
+ default:
132
+ return css`
133
+ ${getTypographyStyles('Title2')}
134
+ color: ${contents000};
135
+ `;
136
+ }
137
+ }}
138
+ `;
@@ -0,0 +1,30 @@
1
+ import type { LabelHTMLAttributes } from 'react';
2
+
3
+ export type Direction =
4
+ | 'top'
5
+ | 'top-left'
6
+ | 'top-right'
7
+ | 'top-center'
8
+ | 'bottom'
9
+ | 'bottom-left'
10
+ | 'bottom-right'
11
+ | 'bottom-center'
12
+ | 'left'
13
+ | 'left-top'
14
+ | 'left-bottom'
15
+ | 'left-center'
16
+ | 'right'
17
+ | 'right-top'
18
+ | 'right-bottom'
19
+ | 'right-center';
20
+
21
+ export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
22
+ text: string;
23
+ size?: 'small' | 'large';
24
+ gap?: number;
25
+ width?: string;
26
+ rightElement?: React.ReactNode;
27
+ required?: boolean;
28
+ direction?: Direction;
29
+ children?: React.ReactNode;
30
+ }
@@ -0,0 +1 @@
1
+ export { default as Label } from './Label';
package/src/index.ts CHANGED
@@ -9,3 +9,4 @@ export * from './Paginations';
9
9
  export * from './Inputs';
10
10
  export * from './Floating';
11
11
  export * from './Chips';
12
+ export * from './Labels';