@remember-web/primitive 0.2.8 → 0.2.9

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 (58) hide show
  1. package/dist/src/Chips/Chip/const.cjs.js +107 -0
  2. package/dist/src/Chips/Chip/const.cjs.js.map +1 -0
  3. package/dist/src/Chips/Chip/const.d.ts +15 -0
  4. package/dist/src/Chips/Chip/const.d.ts.map +1 -0
  5. package/dist/src/Chips/Chip/const.esm.js +104 -0
  6. package/dist/src/Chips/Chip/const.esm.js.map +1 -0
  7. package/dist/src/Chips/Chip/index.cjs.js +57 -0
  8. package/dist/src/Chips/Chip/index.cjs.js.map +1 -0
  9. package/dist/src/Chips/Chip/index.d.ts +4 -0
  10. package/dist/src/Chips/Chip/index.d.ts.map +1 -0
  11. package/dist/src/Chips/Chip/index.esm.js +50 -0
  12. package/dist/src/Chips/Chip/index.esm.js.map +1 -0
  13. package/dist/src/Chips/Chip/styles.cjs.js +46 -0
  14. package/dist/src/Chips/Chip/styles.cjs.js.map +1 -0
  15. package/dist/src/Chips/Chip/styles.d.ts +5 -0
  16. package/dist/src/Chips/Chip/styles.d.ts.map +1 -0
  17. package/dist/src/Chips/Chip/styles.esm.js +36 -0
  18. package/dist/src/Chips/Chip/styles.esm.js.map +1 -0
  19. package/dist/src/Chips/Chip/typeGuard.cjs.js +31 -0
  20. package/dist/src/Chips/Chip/typeGuard.cjs.js.map +1 -0
  21. package/dist/src/Chips/Chip/typeGuard.d.ts +3 -0
  22. package/dist/src/Chips/Chip/typeGuard.d.ts.map +1 -0
  23. package/dist/src/Chips/Chip/typeGuard.esm.js +29 -0
  24. package/dist/src/Chips/Chip/typeGuard.esm.js.map +1 -0
  25. package/dist/src/Chips/Chip/types.d.ts +43 -0
  26. package/dist/src/Chips/Chip/types.d.ts.map +1 -0
  27. package/dist/src/Chips/index.d.ts +2 -0
  28. package/dist/src/Chips/index.d.ts.map +1 -0
  29. package/dist/src/Inputs/TextInput/index.cjs.js +8 -2
  30. package/dist/src/Inputs/TextInput/index.cjs.js.map +1 -1
  31. package/dist/src/Inputs/TextInput/index.d.ts.map +1 -1
  32. package/dist/src/Inputs/TextInput/index.esm.js +8 -2
  33. package/dist/src/Inputs/TextInput/index.esm.js.map +1 -1
  34. package/dist/src/Inputs/TextInput/styles.cjs.js +2 -2
  35. package/dist/src/Inputs/TextInput/styles.cjs.js.map +1 -1
  36. package/dist/src/Inputs/TextInput/styles.d.ts +1 -1
  37. package/dist/src/Inputs/TextInput/styles.esm.js +2 -2
  38. package/dist/src/Inputs/TextInput/styles.esm.js.map +1 -1
  39. package/dist/src/index.cjs.js +2 -0
  40. package/dist/src/index.cjs.js.map +1 -1
  41. package/dist/src/index.d.ts +1 -0
  42. package/dist/src/index.d.ts.map +1 -1
  43. package/dist/src/index.esm.js +1 -0
  44. package/dist/src/index.esm.js.map +1 -1
  45. package/dist/src/stories/common.styles.d.ts +2 -1
  46. package/dist/src/stories/common.styles.d.ts.map +1 -1
  47. package/package.json +1 -1
  48. package/src/Chips/Chip/Chip.stories.tsx +138 -0
  49. package/src/Chips/Chip/const.ts +115 -0
  50. package/src/Chips/Chip/index.tsx +51 -0
  51. package/src/Chips/Chip/styles.ts +80 -0
  52. package/src/Chips/Chip/typeGuard.ts +48 -0
  53. package/src/Chips/Chip/types.ts +61 -0
  54. package/src/Chips/index.ts +1 -0
  55. package/src/Inputs/TextInput/index.tsx +9 -2
  56. package/src/Inputs/TextInput/styles.ts +3 -3
  57. package/src/index.ts +1 -0
  58. package/src/stories/common.styles.tsx +10 -4
@@ -0,0 +1,107 @@
1
+ 'use strict';
2
+
3
+ var mixin = require('@remember-web/mixin');
4
+
5
+ var CHIP_SIZE_STYLE = {
6
+ small: {
7
+ typography: 'Caption1',
8
+ padding: '8px 10px',
9
+ height: '28px'
10
+ },
11
+ medium: {
12
+ typography: 'UIBody3',
13
+ padding: '8px 12px',
14
+ height: '30px'
15
+ }
16
+ };
17
+ var CHIP_VARIANT_STYLE = {
18
+ filled: {
19
+ "default": {
20
+ backgroundColor: mixin.bg200,
21
+ color: mixin.contents150,
22
+ leftIconColor: mixin.contents150,
23
+ deleteButtonColor: mixin.contents200
24
+ },
25
+ hover: {
26
+ backgroundColor: mixin.bg200,
27
+ color: mixin.contents100,
28
+ leftIconColor: mixin.contents100,
29
+ deleteButtonColor: mixin.contents150
30
+ },
31
+ disabled: {
32
+ backgroundColor: mixin.bg300,
33
+ color: mixin.contents300,
34
+ leftIconColor: mixin.contents300,
35
+ deleteButtonColor: mixin.contents300
36
+ },
37
+ selected: {
38
+ backgroundColor: mixin.primary100,
39
+ color: mixin.contents999,
40
+ leftIconColor: mixin.contents999,
41
+ deleteButtonColor: mixin.contents999
42
+ }
43
+ },
44
+ outline: {
45
+ "default": {
46
+ backgroundColor: mixin.bg100,
47
+ color: mixin.contents150,
48
+ leftIconColor: mixin.contents150,
49
+ deleteButtonColor: mixin.contents200,
50
+ border: "1px solid ".concat(mixin.contents150)
51
+ },
52
+ hover: {
53
+ backgroundColor: mixin.bg100,
54
+ color: mixin.contents100,
55
+ leftIconColor: mixin.contents100,
56
+ deleteButtonColor: mixin.contents150,
57
+ border: "1px solid ".concat(mixin.contents100)
58
+ },
59
+ disabled: {
60
+ backgroundColor: mixin.bg100,
61
+ color: mixin.contents200,
62
+ leftIconColor: mixin.contents200,
63
+ deleteButtonColor: mixin.contents200,
64
+ border: "1px solid ".concat(mixin.contents200)
65
+ },
66
+ selected: {
67
+ backgroundColor: mixin.primary100,
68
+ color: mixin.contents999,
69
+ leftIconColor: mixin.contents999,
70
+ deleteButtonColor: mixin.contents999
71
+ }
72
+ },
73
+ dashedLine: {
74
+ "default": {
75
+ backgroundColor: mixin.bg100,
76
+ color: mixin.contents150,
77
+ leftIconColor: mixin.contents150,
78
+ deleteButtonColor: mixin.contents200,
79
+ border: "1px dashed ".concat(mixin.contents150)
80
+ },
81
+ hover: {
82
+ backgroundColor: mixin.bg100,
83
+ color: mixin.contents100,
84
+ leftIconColor: mixin.contents100,
85
+ deleteButtonColor: mixin.contents150,
86
+ border: "1px dashed ".concat(mixin.contents100)
87
+ },
88
+ disabled: {
89
+ backgroundColor: mixin.bg100,
90
+ color: mixin.contents200,
91
+ leftIconColor: mixin.contents200,
92
+ deleteButtonColor: mixin.contents200,
93
+ border: "1px dashed ".concat(mixin.contents200)
94
+ },
95
+ selected: {
96
+ backgroundColor: mixin.primary100,
97
+ color: mixin.contents999,
98
+ leftIconColor: mixin.contents999,
99
+ deleteButtonColor: mixin.contents999,
100
+ border: "1px solid ".concat(mixin.primary100)
101
+ }
102
+ }
103
+ };
104
+
105
+ exports.CHIP_SIZE_STYLE = CHIP_SIZE_STYLE;
106
+ exports.CHIP_VARIANT_STYLE = CHIP_VARIANT_STYLE;
107
+ //# sourceMappingURL=const.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.cjs.js","sources":["../../../../src/Chips/Chip/const.ts"],"sourcesContent":["import {\n bg100,\n bg200,\n bg300,\n contents100,\n contents150,\n contents200,\n contents300,\n contents999,\n primary100,\n} from '@remember-web/mixin';\nimport type { ChipSize, ChipVariant, ChipVariantStyleMap } from './types';\n\nexport const CHIP_SIZE_STYLE = {\n small: {\n typography: 'Caption1',\n padding: '8px 10px',\n height: '28px',\n },\n medium: {\n typography: 'UIBody3',\n padding: '8px 12px',\n height: '30px',\n },\n} as const satisfies Record<ChipSize, unknown>;\n\nexport const CHIP_VARIANT_STYLE: ChipVariantStyleMap = {\n filled: {\n default: {\n backgroundColor: bg200,\n color: contents150,\n leftIconColor: contents150,\n deleteButtonColor: contents200,\n },\n hover: {\n backgroundColor: bg200,\n color: contents100,\n leftIconColor: contents100,\n deleteButtonColor: contents150,\n },\n disabled: {\n backgroundColor: bg300,\n color: contents300,\n leftIconColor: contents300,\n deleteButtonColor: contents300,\n },\n selected: {\n backgroundColor: primary100,\n color: contents999,\n leftIconColor: contents999,\n deleteButtonColor: contents999,\n },\n },\n\n outline: {\n default: {\n backgroundColor: bg100,\n color: contents150,\n leftIconColor: contents150,\n deleteButtonColor: contents200,\n border: `1px solid ${contents150}`,\n },\n hover: {\n backgroundColor: bg100,\n color: contents100,\n leftIconColor: contents100,\n deleteButtonColor: contents150,\n border: `1px solid ${contents100}`,\n },\n disabled: {\n backgroundColor: bg100,\n color: contents200,\n leftIconColor: contents200,\n deleteButtonColor: contents200,\n border: `1px solid ${contents200}`,\n },\n selected: {\n backgroundColor: primary100,\n color: contents999,\n leftIconColor: contents999,\n deleteButtonColor: contents999,\n },\n },\n\n dashedLine: {\n default: {\n backgroundColor: bg100,\n color: contents150,\n leftIconColor: contents150,\n deleteButtonColor: contents200,\n border: `1px dashed ${contents150}`,\n },\n hover: {\n backgroundColor: bg100,\n color: contents100,\n leftIconColor: contents100,\n deleteButtonColor: contents150,\n border: `1px dashed ${contents100}`,\n },\n disabled: {\n backgroundColor: bg100,\n color: contents200,\n leftIconColor: contents200,\n deleteButtonColor: contents200,\n border: `1px dashed ${contents200}`,\n },\n selected: {\n backgroundColor: primary100,\n color: contents999,\n leftIconColor: contents999,\n deleteButtonColor: contents999,\n border: `1px solid ${primary100}`,\n },\n },\n} as const satisfies Record<ChipVariant, unknown>;\n"],"names":["CHIP_SIZE_STYLE","small","typography","padding","height","medium","CHIP_VARIANT_STYLE","filled","backgroundColor","bg200","color","contents150","leftIconColor","deleteButtonColor","contents200","hover","contents100","disabled","bg300","contents300","selected","primary100","contents999","outline","bg100","border","concat","dashedLine"],"mappings":";;;;AAaO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE,UAAU;AACtBC,IAAAA,OAAO,EAAE,UAAU;AACnBC,IAAAA,MAAM,EAAE,MAAA;GACT;AACDC,EAAAA,MAAM,EAAE;AACNH,IAAAA,UAAU,EAAE,SAAS;AACrBC,IAAAA,OAAO,EAAE,UAAU;AACnBC,IAAAA,MAAM,EAAE,MAAA;AACV,GAAA;AACF,EAA8C;AAEvC,IAAME,kB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BAAW;AAClBV,MAAAA,aAAa,EAAEU,iBAAW;AAC1BT,MAAAA,iBAAiB,EAAES,iBAAW;MAC9BG,MAAM,EAAA,YAAA,CAAAC,MAAA,CAAeL,gBAAU,CAAA;AACjC,KAAA;AACF,GAAA;AACF;;;;;"}
@@ -0,0 +1,15 @@
1
+ import type { ChipVariantStyleMap } from './types';
2
+ export declare const CHIP_SIZE_STYLE: {
3
+ readonly small: {
4
+ readonly typography: "Caption1";
5
+ readonly padding: "8px 10px";
6
+ readonly height: "28px";
7
+ };
8
+ readonly medium: {
9
+ readonly typography: "UIBody3";
10
+ readonly padding: "8px 12px";
11
+ readonly height: "30px";
12
+ };
13
+ };
14
+ export declare const CHIP_VARIANT_STYLE: ChipVariantStyleMap;
15
+ //# sourceMappingURL=const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../src/Chips/Chip/const.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAyB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE1E,eAAO,MAAM,eAAe;;;;;;;;;;;CAWkB,CAAC;AAE/C,eAAO,MAAM,kBAAkB,EAAE,mBAwFgB,CAAC"}
@@ -0,0 +1,104 @@
1
+ import { bg200, contents150, contents200, contents100, bg300, contents300, primary100, contents999, bg100 } from '@remember-web/mixin';
2
+
3
+ var CHIP_SIZE_STYLE = {
4
+ small: {
5
+ typography: 'Caption1',
6
+ padding: '8px 10px',
7
+ height: '28px'
8
+ },
9
+ medium: {
10
+ typography: 'UIBody3',
11
+ padding: '8px 12px',
12
+ height: '30px'
13
+ }
14
+ };
15
+ var CHIP_VARIANT_STYLE = {
16
+ filled: {
17
+ "default": {
18
+ backgroundColor: bg200,
19
+ color: contents150,
20
+ leftIconColor: contents150,
21
+ deleteButtonColor: contents200
22
+ },
23
+ hover: {
24
+ backgroundColor: bg200,
25
+ color: contents100,
26
+ leftIconColor: contents100,
27
+ deleteButtonColor: contents150
28
+ },
29
+ disabled: {
30
+ backgroundColor: bg300,
31
+ color: contents300,
32
+ leftIconColor: contents300,
33
+ deleteButtonColor: contents300
34
+ },
35
+ selected: {
36
+ backgroundColor: primary100,
37
+ color: contents999,
38
+ leftIconColor: contents999,
39
+ deleteButtonColor: contents999
40
+ }
41
+ },
42
+ outline: {
43
+ "default": {
44
+ backgroundColor: bg100,
45
+ color: contents150,
46
+ leftIconColor: contents150,
47
+ deleteButtonColor: contents200,
48
+ border: "1px solid ".concat(contents150)
49
+ },
50
+ hover: {
51
+ backgroundColor: bg100,
52
+ color: contents100,
53
+ leftIconColor: contents100,
54
+ deleteButtonColor: contents150,
55
+ border: "1px solid ".concat(contents100)
56
+ },
57
+ disabled: {
58
+ backgroundColor: bg100,
59
+ color: contents200,
60
+ leftIconColor: contents200,
61
+ deleteButtonColor: contents200,
62
+ border: "1px solid ".concat(contents200)
63
+ },
64
+ selected: {
65
+ backgroundColor: primary100,
66
+ color: contents999,
67
+ leftIconColor: contents999,
68
+ deleteButtonColor: contents999
69
+ }
70
+ },
71
+ dashedLine: {
72
+ "default": {
73
+ backgroundColor: bg100,
74
+ color: contents150,
75
+ leftIconColor: contents150,
76
+ deleteButtonColor: contents200,
77
+ border: "1px dashed ".concat(contents150)
78
+ },
79
+ hover: {
80
+ backgroundColor: bg100,
81
+ color: contents100,
82
+ leftIconColor: contents100,
83
+ deleteButtonColor: contents150,
84
+ border: "1px dashed ".concat(contents100)
85
+ },
86
+ disabled: {
87
+ backgroundColor: bg100,
88
+ color: contents200,
89
+ leftIconColor: contents200,
90
+ deleteButtonColor: contents200,
91
+ border: "1px dashed ".concat(contents200)
92
+ },
93
+ selected: {
94
+ backgroundColor: primary100,
95
+ color: contents999,
96
+ leftIconColor: contents999,
97
+ deleteButtonColor: contents999,
98
+ border: "1px solid ".concat(primary100)
99
+ }
100
+ }
101
+ };
102
+
103
+ export { CHIP_SIZE_STYLE, CHIP_VARIANT_STYLE };
104
+ //# sourceMappingURL=const.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.esm.js","sources":["../../../../src/Chips/Chip/const.ts"],"sourcesContent":["import {\n bg100,\n bg200,\n bg300,\n contents100,\n contents150,\n contents200,\n contents300,\n contents999,\n primary100,\n} from '@remember-web/mixin';\nimport type { ChipSize, ChipVariant, ChipVariantStyleMap } from './types';\n\nexport const CHIP_SIZE_STYLE = {\n small: {\n typography: 'Caption1',\n padding: '8px 10px',\n height: '28px',\n },\n medium: {\n typography: 'UIBody3',\n padding: '8px 12px',\n height: '30px',\n },\n} as const satisfies Record<ChipSize, unknown>;\n\nexport const CHIP_VARIANT_STYLE: ChipVariantStyleMap = {\n filled: {\n default: {\n backgroundColor: bg200,\n color: contents150,\n leftIconColor: contents150,\n deleteButtonColor: contents200,\n },\n hover: {\n backgroundColor: bg200,\n color: contents100,\n leftIconColor: contents100,\n deleteButtonColor: contents150,\n },\n disabled: {\n backgroundColor: bg300,\n color: contents300,\n leftIconColor: contents300,\n deleteButtonColor: contents300,\n },\n selected: {\n backgroundColor: primary100,\n color: contents999,\n leftIconColor: contents999,\n deleteButtonColor: contents999,\n },\n },\n\n outline: {\n default: {\n backgroundColor: bg100,\n color: contents150,\n leftIconColor: contents150,\n deleteButtonColor: contents200,\n border: `1px solid ${contents150}`,\n },\n hover: {\n backgroundColor: bg100,\n color: contents100,\n leftIconColor: contents100,\n deleteButtonColor: contents150,\n border: `1px solid ${contents100}`,\n },\n disabled: {\n backgroundColor: bg100,\n color: contents200,\n leftIconColor: contents200,\n deleteButtonColor: contents200,\n border: `1px solid ${contents200}`,\n },\n selected: {\n backgroundColor: primary100,\n color: contents999,\n leftIconColor: contents999,\n deleteButtonColor: contents999,\n },\n },\n\n dashedLine: {\n default: {\n backgroundColor: bg100,\n color: contents150,\n leftIconColor: contents150,\n deleteButtonColor: contents200,\n border: `1px dashed ${contents150}`,\n },\n hover: {\n backgroundColor: bg100,\n color: contents100,\n leftIconColor: contents100,\n deleteButtonColor: contents150,\n border: `1px dashed ${contents100}`,\n },\n disabled: {\n backgroundColor: bg100,\n color: contents200,\n leftIconColor: contents200,\n deleteButtonColor: contents200,\n border: `1px dashed ${contents200}`,\n },\n selected: {\n backgroundColor: primary100,\n color: contents999,\n leftIconColor: contents999,\n deleteButtonColor: contents999,\n border: `1px solid ${primary100}`,\n },\n },\n} as const satisfies Record<ChipVariant, unknown>;\n"],"names":["CHIP_SIZE_STYLE","small","typography","padding","height","medium","CHIP_VARIANT_STYLE","filled","backgroundColor","bg200","color","contents150","leftIconColor","deleteButtonColor","contents200","hover","contents100","disabled","bg300","contents300","selected","primary100","contents999","outline","bg100","border","concat","dashedLine"],"mappings":";;AAaO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE,UAAU;AACtBC,IAAAA,OAAO,EAAE,UAAU;AACnBC,IAAAA,MAAM,EAAE,MAAA;GACT;AACDC,EAAAA,MAAM,EAAE;AACNH,IAAAA,UAAU,EAAE,SAAS;AACrBC,IAAAA,OAAO,EAAE,UAAU;AACnBC,IAAAA,MAAM,EAAE,MAAA;AACV,GAAA;AACF,EAA8C;AAEvC,IAAME,kBAAuC,GAAG;AACrDC,EAAAA,MAAM,EAAE;IACN,SAAS,EAAA;AACPC,MAAAA,eAAe,EAAEC,KAAK;AACtBC,MAAAA,KAAK,EAAEC,WAAW;AAClBC,MAAAA,aAAa,EAAED,WAAW;AAC1BE,MAAAA,iBAAiB,EAAEC,WAAAA;KACpB;AACDC,IAAAA,KAAK,EAAE;AACLP,MAAAA,eAAe,EAAEC,KAAK;AACtBC,MAAAA,KAAK,EAAEM,WAAW;AAClBJ,MAAAA,aAAa,EAAEI,WAAW;AAC1BH,MAAAA,iBAAiB,EAAEF,WAAAA;KACpB;AACDM,IAAAA,QAAQ,EAAE;AACRT,MAAAA,eAAe,EAAEU,KAAK;AACtBR,MAAAA,KAAK,EAAES,WAAW;AAClBP,MAAAA,aAAa,EAAEO,WAAW;AAC1BN,MAAAA,iBAAiB,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AAW;AAC1BE,MAAAA,iBAAiB,EAAEC,WAAW;MAC9BW,MAAM,EAAA,aAAA,CAAAC,MAAA,CAAgBf,WAAW,CAAA;KAClC;AACDI,IAAAA,KAAK,EAAE;AACLP,MAAAA,eAAe,EAAEgB,KAAK;AACtBd,MAAAA,KAAK,EAAEM,WAAW;AAClBJ,MAAAA,aAAa,EAAEI,WAAW;AAC1BH,MAAAA,iBAAiB,EAAEF,WAAW;MAC9Bc,MAAM,EAAA,aAAA,CAAAC,MAAA,CAAgBV,WAAW,CAAA;KAClC;AACDC,IAAAA,QAAQ,EAAE;AACRT,MAAAA,eAAe,EAAEgB,KAAK;AACtBd,MAAAA,KAAK,EAAEI,WAAW;AAClBF,MAAAA,aAAa,EAAEE,WAAW;AAC1BD,MAAAA,iBAAiB,EAAEC,WAAW;MAC9BW,MAAM,EAAA,aAAA,CAAAC,MAAA,CAAgBZ,WAAW,CAAA;KAClC;AACDM,IAAAA,QAAQ,EAAE;AACRZ,MAAAA,eAAe,EAAEa,UAAU;AAC3BX,MAAAA,KAAK,EAAEY,WAAW;AAClBV,MAAAA,aAAa,EAAEU,WAAW;AAC1BT,MAAAA,iBAAiB,EAAES,WAAW;MAC9BG,MAAM,EAAA,YAAA,CAAAC,MAAA,CAAeL,UAAU,CAAA;AACjC,KAAA;AACF,GAAA;AACF;;;;"}
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
+ var icon = require('@remember-web/icon');
6
+ var react = require('react');
7
+ var styles = require('./styles.cjs.js');
8
+ var typeGuard = require('./typeGuard.cjs.js');
9
+ var jsxRuntime = require('react/jsx-runtime');
10
+
11
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
+
13
+ var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);
14
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWithoutProperties);
15
+
16
+ var _excluded = ["size", "variant", "selected", "clickable"];
17
+ 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; }
18
+ 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; }
19
+ var Chip = /*#__PURE__*/react.forwardRef(function (props, ref) {
20
+ var _props$size = props.size,
21
+ size = _props$size === void 0 ? 'medium' : _props$size,
22
+ _props$variant = props.variant,
23
+ variant = _props$variant === void 0 ? 'filled' : _props$variant,
24
+ _props$selected = props.selected,
25
+ selected = _props$selected === void 0 ? false : _props$selected,
26
+ _props$clickable = props.clickable,
27
+ clickable = _props$clickable === void 0 ? true : _props$clickable,
28
+ rest = _objectWithoutProperties__default.default(props, _excluded);
29
+
30
+ // NOTE: 개발 모드에서만 런타임 체크 수행
31
+ if (process.env.NODE_ENV === 'development') {
32
+ typeGuard.ensureValidChipProps(props);
33
+ }
34
+ return /*#__PURE__*/jsxRuntime.jsxs(styles.StyledChip, _objectSpread(_objectSpread({
35
+ ref: ref,
36
+ "aria-live": "polite",
37
+ $size: size,
38
+ $variant: variant,
39
+ $selected: selected,
40
+ $clickable: clickable,
41
+ "data-chip-disabled": props.disabled
42
+ }, rest), {}, {
43
+ children: [props.leftIcon, props.children, props.onDelete && /*#__PURE__*/jsxRuntime.jsx(styles.ButtonWrapper, {
44
+ onClick: function onClick(e) {
45
+ var _props$onDelete;
46
+ e.stopPropagation();
47
+ e.preventDefault();
48
+ (_props$onDelete = props.onDelete) === null || _props$onDelete === void 0 || _props$onDelete.call(props);
49
+ },
50
+ className: "delete-button",
51
+ children: props.deleteIcon || /*#__PURE__*/jsxRuntime.jsx(icon.IconCloseS, {})
52
+ })]
53
+ }));
54
+ });
55
+
56
+ exports.Chip = Chip;
57
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/Chips/Chip/index.tsx"],"sourcesContent":["import { IconCloseS } from '@remember-web/icon';\nimport { type ForwardedRef, forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\nimport { ButtonWrapper, StyledChip } from './styles';\nimport { ensureValidChipProps } from './typeGuard';\nimport type { ChipProps } from './types';\n\nexport const Chip = forwardRef(\n (props: ChipProps, ref: ForwardedRef<HTMLDivElement | null>) => {\n const {\n size = 'medium',\n variant = 'filled',\n selected = false,\n clickable = true,\n ...rest\n } = props;\n\n // NOTE: 개발 모드에서만 런타임 체크 수행\n if (process.env.NODE_ENV === 'development') {\n ensureValidChipProps(props);\n }\n\n return (\n <StyledChip\n ref={ref}\n aria-live=\"polite\"\n $size={size}\n $variant={variant}\n $selected={selected}\n $clickable={clickable}\n data-chip-disabled={props.disabled}\n {...rest}\n >\n {props.leftIcon}\n {props.children}\n {props.onDelete && (\n <ButtonWrapper\n onClick={(e: React.MouseEvent | React.KeyboardEvent) => {\n e.stopPropagation();\n e.preventDefault();\n props.onDelete?.();\n }}\n className=\"delete-button\"\n >\n {props.deleteIcon || <IconCloseS />}\n </ButtonWrapper>\n )}\n </StyledChip>\n );\n }\n) as PolymorphicComponent<'web', ChipProps>;\n"],"names":["Chip","forwardRef","props","ref","_props$size","size","_props$variant","variant","_props$selected","selected","_props$clickable","clickable","rest","_objectWithoutProperties","_excluded","process","env","NODE_ENV","ensureValidChipProps","_jsxs","StyledChip","_objectSpread","$size","$variant","$selected","$clickable","disabled","children","leftIcon","onDelete","_jsx","ButtonWrapper","onClick","e","_props$onDelete","stopPropagation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AAA,KAAK,CAAC0B,QAAQ,EACd1B,KAAK,CAACyB,QAAQ,EACdzB,KAAK,CAAC2B,QAAQ,iBACbC,cAAA,CAACC,oBAAa,EAAA;AACZC,MAAAA,OAAO,EAAE,SAAAA,OAACC,CAAAA,CAAyC,EAAK;AAAA,QAAA,IAAAC,eAAA,CAAA;QACtDD,CAAC,CAACE,eAAe,EAAE,CAAA;QACnBF,CAAC,CAACG,cAAc,EAAE,CAAA;AAClB,QAAA,CAAAF,eAAA,GAAAhC,KAAK,CAAC2B,QAAQ,MAAA,IAAA,IAAAK,eAAA,KAAA,KAAA,CAAA,IAAdA,eAAA,CAAAG,IAAA,CAAAnC,KAAiB,CAAC,CAAA;OAClB;AACFoC,MAAAA,SAAS,EAAC,eAAe;MAAAX,QAAA,EAExBzB,KAAK,CAACqC,UAAU,iBAAIT,cAAA,CAACU,eAAU,EAAE,EAAA,CAAA;AAAC,KACtB,CAChB,CAAA;AAAA,GAAA,CACS,CAAC,CAAA;AAEjB,CACF;;;;"}
@@ -0,0 +1,4 @@
1
+ import type { PolymorphicComponent } from 'styled-components';
2
+ import type { ChipProps } from './types';
3
+ export declare const Chip: PolymorphicComponent<"web", ChipProps>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Chips/Chip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,IAAI,wCA2C0B,CAAC"}
@@ -0,0 +1,50 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import { IconCloseS } from '@remember-web/icon';
4
+ import { forwardRef } from 'react';
5
+ import { StyledChip, ButtonWrapper } from './styles.esm.js';
6
+ import { ensureValidChipProps } from './typeGuard.esm.js';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
+
9
+ var _excluded = ["size", "variant", "selected", "clickable"];
10
+ 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; }
11
+ 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; }
12
+ var Chip = /*#__PURE__*/forwardRef(function (props, ref) {
13
+ var _props$size = props.size,
14
+ size = _props$size === void 0 ? 'medium' : _props$size,
15
+ _props$variant = props.variant,
16
+ variant = _props$variant === void 0 ? 'filled' : _props$variant,
17
+ _props$selected = props.selected,
18
+ selected = _props$selected === void 0 ? false : _props$selected,
19
+ _props$clickable = props.clickable,
20
+ clickable = _props$clickable === void 0 ? true : _props$clickable,
21
+ rest = _objectWithoutProperties(props, _excluded);
22
+
23
+ // NOTE: 개발 모드에서만 런타임 체크 수행
24
+ if (process.env.NODE_ENV === 'development') {
25
+ ensureValidChipProps(props);
26
+ }
27
+ return /*#__PURE__*/jsxs(StyledChip, _objectSpread(_objectSpread({
28
+ ref: ref,
29
+ "aria-live": "polite",
30
+ $size: size,
31
+ $variant: variant,
32
+ $selected: selected,
33
+ $clickable: clickable,
34
+ "data-chip-disabled": props.disabled
35
+ }, rest), {}, {
36
+ children: [props.leftIcon, props.children, props.onDelete && /*#__PURE__*/jsx(ButtonWrapper, {
37
+ onClick: function onClick(e) {
38
+ var _props$onDelete;
39
+ e.stopPropagation();
40
+ e.preventDefault();
41
+ (_props$onDelete = props.onDelete) === null || _props$onDelete === void 0 || _props$onDelete.call(props);
42
+ },
43
+ className: "delete-button",
44
+ children: props.deleteIcon || /*#__PURE__*/jsx(IconCloseS, {})
45
+ })]
46
+ }));
47
+ });
48
+
49
+ export { Chip };
50
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/Chips/Chip/index.tsx"],"sourcesContent":["import { IconCloseS } from '@remember-web/icon';\nimport { type ForwardedRef, forwardRef } from 'react';\nimport type { PolymorphicComponent } from 'styled-components';\nimport { ButtonWrapper, StyledChip } from './styles';\nimport { ensureValidChipProps } from './typeGuard';\nimport type { ChipProps } from './types';\n\nexport const Chip = forwardRef(\n (props: ChipProps, ref: ForwardedRef<HTMLDivElement | null>) => {\n const {\n size = 'medium',\n variant = 'filled',\n selected = false,\n clickable = true,\n ...rest\n } = props;\n\n // NOTE: 개발 모드에서만 런타임 체크 수행\n if (process.env.NODE_ENV === 'development') {\n ensureValidChipProps(props);\n }\n\n return (\n <StyledChip\n ref={ref}\n aria-live=\"polite\"\n $size={size}\n $variant={variant}\n $selected={selected}\n $clickable={clickable}\n data-chip-disabled={props.disabled}\n {...rest}\n >\n {props.leftIcon}\n {props.children}\n {props.onDelete && (\n <ButtonWrapper\n onClick={(e: React.MouseEvent | React.KeyboardEvent) => {\n e.stopPropagation();\n e.preventDefault();\n props.onDelete?.();\n }}\n className=\"delete-button\"\n >\n {props.deleteIcon || <IconCloseS />}\n </ButtonWrapper>\n )}\n </StyledChip>\n );\n }\n) as PolymorphicComponent<'web', ChipProps>;\n"],"names":["Chip","forwardRef","props","ref","_props$size","size","_props$variant","variant","_props$selected","selected","_props$clickable","clickable","rest","_objectWithoutProperties","_excluded","process","env","NODE_ENV","ensureValidChipProps","_jsxs","StyledChip","_objectSpread","$size","$variant","$selected","$clickable","disabled","children","leftIcon","onDelete","_jsx","ButtonWrapper","onClick","e","_props$onDelete","stopPropagation","preventDefault","call","className","deleteI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d1B,KAAK,CAACyB,QAAQ,EACdzB,KAAK,CAAC2B,QAAQ,iBACbC,GAAA,CAACC,aAAa,EAAA;AACZC,MAAAA,OAAO,EAAE,SAAAA,OAACC,CAAAA,CAAyC,EAAK;AAAA,QAAA,IAAAC,eAAA,CAAA;QACtDD,CAAC,CAACE,eAAe,EAAE,CAAA;QACnBF,CAAC,CAACG,cAAc,EAAE,CAAA;AAClB,QAAA,CAAAF,eAAA,GAAAhC,KAAK,CAAC2B,QAAQ,MAAA,IAAA,IAAAK,eAAA,KAAA,KAAA,CAAA,IAAdA,eAAA,CAAAG,IAAA,CAAAnC,KAAiB,CAAC,CAAA;OAClB;AACFoC,MAAAA,SAAS,EAAC,eAAe;MAAAX,QAAA,EAExBzB,KAAK,CAACqC,UAAU,iBAAIT,GAAA,CAACU,UAAU,EAAE,EAAA,CAAA;AAAC,KACtB,CAChB,CAAA;AAAA,GAAA,CACS,CAAC,CAAA;AAEjB,CACF;;;;"}
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
+ var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
6
+ var mixin = require('@remember-web/mixin');
7
+ var styled = require('styled-components');
8
+ var _const = require('./const.cjs.js');
9
+
10
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
+
12
+ var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);
13
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWithoutProperties);
14
+ var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefault(_taggedTemplateLiteral);
15
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
16
+
17
+ var _excluded = ["$size", "$variant", "$clickable"];
18
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
19
+ 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; }
20
+ 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; }
21
+ var getVariantStyles = function getVariantStyles(props) {
22
+ var _props$$variant = props.$variant,
23
+ $variant = _props$$variant === void 0 ? 'filled' : _props$$variant,
24
+ $selected = props.$selected,
25
+ $clickable = props.$clickable;
26
+ var getStateStyle = function getStateStyle(state) {
27
+ return styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default.default(["\n background-color: ", ";\n color: ", ";\n border: ", ";\n --left-icon-color: ", ";\n --delete-button-color: ", ";\n "])), _const.CHIP_VARIANT_STYLE[$variant][state].backgroundColor, _const.CHIP_VARIANT_STYLE[$variant][state].color, _const.CHIP_VARIANT_STYLE[$variant][state].border || 'none', _const.CHIP_VARIANT_STYLE[$variant][state].leftIconColor, _const.CHIP_VARIANT_STYLE[$variant][state].deleteButtonColor);
28
+ };
29
+ return styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default.default(["\n ", ";\n\n ", "\n \n &[data-chip-disabled='true'] {\n ", "\n cursor: not-allowed;\n }\n\n & svg {\n color: var(--left-icon-color);\n }\n\n .delete-button svg {\n color: var(--delete-button-color);\n }\n "])), getStateStyle('default'), $clickable && styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default.default(["\n &:hover:not([data-chip-disabled='true']) {\n ", "\n }\n\n ", ":not([data-chip-disabled=\"true\"]) {\n ", "\n ", "\n }\n "])), getStateStyle('hover'), $selected ? '&' : '&:active', getStateStyle('selected'), $variant === 'outline' && 'border: none;'), getStateStyle('disabled'));
30
+ };
31
+ var StyledChip = styled__default.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral__default.default(["\n ", "\n"])), function (_ref) {
32
+ var $size = _ref.$size,
33
+ $variant = _ref.$variant,
34
+ _ref$$clickable = _ref.$clickable,
35
+ $clickable = _ref$$clickable === void 0 ? false : _ref$$clickable,
36
+ props = _objectWithoutProperties__default.default(_ref, _excluded);
37
+ return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral__default.default(["\n box-sizing: border-box;\n user-select: none;\n cursor: ", ";\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n gap: 4px;\n\n width: fit-content;\n border-radius: 50px;\n text-align: center;\n transition: all 0.2s ease-in;\n\n height: ", ";\n padding: ", ";\n\n ", "\n\n ", "\n "])), $clickable ? 'pointer' : 'default', _const.CHIP_SIZE_STYLE[$size].height, _const.CHIP_SIZE_STYLE[$size].padding, mixin.getTypographyStyles(_const.CHIP_SIZE_STYLE[$size].typography), getVariantStyles(_objectSpread({
38
+ $variant: $variant,
39
+ $clickable: $clickable
40
+ }, props)));
41
+ });
42
+ var ButtonWrapper = styled__default.default.button(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral__default.default(["\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n "])));
43
+
44
+ exports.ButtonWrapper = ButtonWrapper;
45
+ exports.StyledChip = StyledChip;
46
+ //# sourceMappingURL=styles.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.cjs.js","sources":["../../../../src/Chips/Chip/styles.ts"],"sourcesContent":["import { getTypographyStyles } from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\nimport { CHIP_SIZE_STYLE, CHIP_VARIANT_STYLE } from './const';\nimport type { ChipState, ChipStyleProps } from './types';\n\nconst getVariantStyles = (props: Partial<ChipStyleProps>) => {\n const { $variant = 'filled', $selected, $clickable } = props;\n const getStateStyle = (state: ChipState) => css`\n background-color: ${CHIP_VARIANT_STYLE[$variant][state].backgroundColor};\n color: ${CHIP_VARIANT_STYLE[$variant][state].color};\n border: ${CHIP_VARIANT_STYLE[$variant][state].border || 'none'};\n --left-icon-color: ${CHIP_VARIANT_STYLE[$variant][state].leftIconColor};\n --delete-button-color: ${CHIP_VARIANT_STYLE[$variant][state].deleteButtonColor};\n `;\n\n return css`\n ${getStateStyle('default')};\n\n ${\n $clickable &&\n css`\n &:hover:not([data-chip-disabled='true']) {\n ${getStateStyle('hover')}\n }\n\n ${$selected ? '&' : '&:active'}:not([data-chip-disabled=\"true\"]) {\n ${getStateStyle('selected')}\n ${$variant === 'outline' && 'border: none;'}\n }\n `\n }\n \n &[data-chip-disabled='true'] {\n ${getStateStyle('disabled')}\n cursor: not-allowed;\n }\n\n & svg {\n color: var(--left-icon-color);\n }\n\n .delete-button svg {\n color: var(--delete-button-color);\n }\n `;\n};\n\nexport const StyledChip = styled.div<ChipStyleProps>`\n ${({ $size, $variant, $clickable = false, ...props }) => css`\n box-sizing: border-box;\n user-select: none;\n cursor: ${$clickable ? 'pointer' : 'default'};\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n gap: 4px;\n\n width: fit-content;\n border-radius: 50px;\n text-align: center;\n transition: all 0.2s ease-in;\n\n height: ${CHIP_SIZE_STYLE[$size].height};\n padding: ${CHIP_SIZE_STYLE[$size].padding};\n\n ${getTypographyStyles(CHIP_SIZE_STYLE[$size].typography)}\n\n ${getVariantStyles({ $variant, $clickable, ...props })}\n `}\n`;\n\nexport const ButtonWrapper = styled.button`\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n"],"names":["getVariantStyles","props","_props$$variant","$variant","$selected","$clickable","getStateStyle","state","css","_templateObject","_taggedTemplateLiteral","CHIP_VARIANT_STYLE","backgroundColor","color","border","leftIconColor","deleteButtonColor","_templateObject2","_templateObject3","StyledChip","styled","div","_templateObject4","_ref","$size","_ref$$clickable","_objectWithoutProperties","_excluded","_templateObject5","CHIP_SIZE_STYLE","height","padding","getTypographyStyles","typography","_objectSpread","ButtonWrapper","button","_templateObject6"],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,KAA8B,EAAK;AAC3D,EAAA,IAAAC,eAAA,GAAuDD,KAAK,CAApDE,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,eAAA;IAAEE,SAAS,GAAiBH,KAAK,CAA/BG,SAAS;IAAEC,UAAU,GAAKJ,KAAK,CAApBI,UAAU,CAAA;AAClD,EAAA,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAAgB,EAAA;IAAA,OAAKC,UAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,uCAAA,CACzBC,CAAAA,0BAAAA,EAAAA,gBAAAA,EAAAA,iBAAAA,EAAAA,4BAAAA,EAAAA,gCAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA,EAAAA,yBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACK,eAAe,EAC9DD,yBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACM,KAAK,EACxCF,yBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACO,MAAM,IAAI,MAAM,EACzCH,yBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACQ,aAAa,EAC7CJ,yBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACS,iBAAiB,CAAA,CAAA;GAC/E,CAAA;EAED,OAAOR,UAAG,CAAAS,gBAAA,KAAAA,gBAAA,GAAAP,uCAAA,CACNJ,CAAAA,QAAAA,EAAAA,WAAAA,EAAAA,oDAAAA,EAAAA,kLAAAA,CAAAA,CAAAA,CAAAA,EAAAA,aA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ACS,UAAU,CAAC,EAEtDjC,gBAAgB,CAAAkC,aAAA,CAAA;AAAG/B,IAAAA,QAAQ,EAARA,QAAQ;AAAEE,IAAAA,UAAU,EAAVA,UAAAA;GAAeJ,EAAAA,KAAK,CAAE,CAAC,CAAA,CAAA;AAAA,CACvD,EACF;AAEYkC,IAAAA,aAAa,GAAGf,uBAAM,CAACgB,MAAM,CAAAC,gBAAA,KAAAA,gBAAA,GAAA3B,uCAAA,CAMvC,CAAA,+GAAA,CAAA,CAAA,CAAA;;;;;"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { ChipStyleProps } from './types';
3
+ export declare const StyledChip: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ChipStyleProps>>;
4
+ export declare const ButtonWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>>;
5
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/Chips/Chip/styles.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,SAAS,CAAC;AA4CzD,eAAO,MAAM,UAAU,2NAwBtB,CAAC;AAEF,eAAO,MAAM,aAAa,4NAMvB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
4
+ import { getTypographyStyles } from '@remember-web/mixin';
5
+ import styled, { css } from 'styled-components';
6
+ import { CHIP_SIZE_STYLE, CHIP_VARIANT_STYLE } from './const.esm.js';
7
+
8
+ var _excluded = ["$size", "$variant", "$clickable"];
9
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
10
+ 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; }
11
+ 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; }
12
+ var getVariantStyles = function getVariantStyles(props) {
13
+ var _props$$variant = props.$variant,
14
+ $variant = _props$$variant === void 0 ? 'filled' : _props$$variant,
15
+ $selected = props.$selected,
16
+ $clickable = props.$clickable;
17
+ var getStateStyle = function getStateStyle(state) {
18
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n color: ", ";\n border: ", ";\n --left-icon-color: ", ";\n --delete-button-color: ", ";\n "])), CHIP_VARIANT_STYLE[$variant][state].backgroundColor, CHIP_VARIANT_STYLE[$variant][state].color, CHIP_VARIANT_STYLE[$variant][state].border || 'none', CHIP_VARIANT_STYLE[$variant][state].leftIconColor, CHIP_VARIANT_STYLE[$variant][state].deleteButtonColor);
19
+ };
20
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n\n ", "\n \n &[data-chip-disabled='true'] {\n ", "\n cursor: not-allowed;\n }\n\n & svg {\n color: var(--left-icon-color);\n }\n\n .delete-button svg {\n color: var(--delete-button-color);\n }\n "])), getStateStyle('default'), $clickable && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &:hover:not([data-chip-disabled='true']) {\n ", "\n }\n\n ", ":not([data-chip-disabled=\"true\"]) {\n ", "\n ", "\n }\n "])), getStateStyle('hover'), $selected ? '&' : '&:active', getStateStyle('selected'), $variant === 'outline' && 'border: none;'), getStateStyle('disabled'));
21
+ };
22
+ var StyledChip = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref) {
23
+ var $size = _ref.$size,
24
+ $variant = _ref.$variant,
25
+ _ref$$clickable = _ref.$clickable,
26
+ $clickable = _ref$$clickable === void 0 ? false : _ref$$clickable,
27
+ props = _objectWithoutProperties(_ref, _excluded);
28
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n user-select: none;\n cursor: ", ";\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n gap: 4px;\n\n width: fit-content;\n border-radius: 50px;\n text-align: center;\n transition: all 0.2s ease-in;\n\n height: ", ";\n padding: ", ";\n\n ", "\n\n ", "\n "])), $clickable ? 'pointer' : 'default', CHIP_SIZE_STYLE[$size].height, CHIP_SIZE_STYLE[$size].padding, getTypographyStyles(CHIP_SIZE_STYLE[$size].typography), getVariantStyles(_objectSpread({
29
+ $variant: $variant,
30
+ $clickable: $clickable
31
+ }, props)));
32
+ });
33
+ var ButtonWrapper = styled.button(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n "])));
34
+
35
+ export { ButtonWrapper, StyledChip };
36
+ //# sourceMappingURL=styles.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.esm.js","sources":["../../../../src/Chips/Chip/styles.ts"],"sourcesContent":["import { getTypographyStyles } from '@remember-web/mixin';\nimport styled, { css } from 'styled-components';\nimport { CHIP_SIZE_STYLE, CHIP_VARIANT_STYLE } from './const';\nimport type { ChipState, ChipStyleProps } from './types';\n\nconst getVariantStyles = (props: Partial<ChipStyleProps>) => {\n const { $variant = 'filled', $selected, $clickable } = props;\n const getStateStyle = (state: ChipState) => css`\n background-color: ${CHIP_VARIANT_STYLE[$variant][state].backgroundColor};\n color: ${CHIP_VARIANT_STYLE[$variant][state].color};\n border: ${CHIP_VARIANT_STYLE[$variant][state].border || 'none'};\n --left-icon-color: ${CHIP_VARIANT_STYLE[$variant][state].leftIconColor};\n --delete-button-color: ${CHIP_VARIANT_STYLE[$variant][state].deleteButtonColor};\n `;\n\n return css`\n ${getStateStyle('default')};\n\n ${\n $clickable &&\n css`\n &:hover:not([data-chip-disabled='true']) {\n ${getStateStyle('hover')}\n }\n\n ${$selected ? '&' : '&:active'}:not([data-chip-disabled=\"true\"]) {\n ${getStateStyle('selected')}\n ${$variant === 'outline' && 'border: none;'}\n }\n `\n }\n \n &[data-chip-disabled='true'] {\n ${getStateStyle('disabled')}\n cursor: not-allowed;\n }\n\n & svg {\n color: var(--left-icon-color);\n }\n\n .delete-button svg {\n color: var(--delete-button-color);\n }\n `;\n};\n\nexport const StyledChip = styled.div<ChipStyleProps>`\n ${({ $size, $variant, $clickable = false, ...props }) => css`\n box-sizing: border-box;\n user-select: none;\n cursor: ${$clickable ? 'pointer' : 'default'};\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n gap: 4px;\n\n width: fit-content;\n border-radius: 50px;\n text-align: center;\n transition: all 0.2s ease-in;\n\n height: ${CHIP_SIZE_STYLE[$size].height};\n padding: ${CHIP_SIZE_STYLE[$size].padding};\n\n ${getTypographyStyles(CHIP_SIZE_STYLE[$size].typography)}\n\n ${getVariantStyles({ $variant, $clickable, ...props })}\n `}\n`;\n\nexport const ButtonWrapper = styled.button`\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n"],"names":["getVariantStyles","props","_props$$variant","$variant","$selected","$clickable","getStateStyle","state","css","_templateObject","_taggedTemplateLiteral","CHIP_VARIANT_STYLE","backgroundColor","color","border","leftIconColor","deleteButtonColor","_templateObject2","_templateObject3","StyledChip","styled","div","_templateObject4","_ref","$size","_ref$$clickable","_objectWithoutProperties","_excluded","_templateObject5","CHIP_SIZE_STYLE","height","padding","getTypographyStyles","typography","_objectSpread","ButtonWrapper","button","_templateObject6"],"mappings":";;;;;;;;;;;AAKA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,KAA8B,EAAK;AAC3D,EAAA,IAAAC,eAAA,GAAuDD,KAAK,CAApDE,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,eAAA;IAAEE,SAAS,GAAiBH,KAAK,CAA/BG,SAAS;IAAEC,UAAU,GAAKJ,KAAK,CAApBI,UAAU,CAAA;AAClD,EAAA,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAAgB,EAAA;IAAA,OAAKC,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,CACzBC,CAAAA,0BAAAA,EAAAA,gBAAAA,EAAAA,iBAAAA,EAAAA,4BAAAA,EAAAA,gCAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA,EAAAA,kBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACK,eAAe,EAC9DD,kBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACM,KAAK,EACxCF,kBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACO,MAAM,IAAI,MAAM,EACzCH,kBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACQ,aAAa,EAC7CJ,kBAAkB,CAACR,QAAQ,CAAC,CAACI,KAAK,CAAC,CAACS,iBAAiB,CAAA,CAAA;GAC/E,CAAA;EAED,OAAOR,GAAG,CAAAS,gBAAA,KAAAA,gBAAA,GAAAP,sBAAA,CACNJ,CAAAA,QAAAA,EAAAA,WAAAA,EAAAA,oDAAAA,EAAAA,kLAAAA,CAAAA,CAAAA,CAAAA,EAAAA,aAAa,CAAC,SAAS,CAAC,EAGxBD,UAAU,IACVG,GAAG,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;AAAG/B,IAAAA,QAAQ,EAARA,QAAQ;AAAEE,IAAAA,UAAU,EAAVA,UAAAA;GAAeJ,EAAAA,KAAK,CAAE,CAAC,CAAA,CAAA;AAAA,CACvD,EACF;AAEYkC,IAAAA,aAAa,GAAGf,MAAM,CAACgB,MAAM,CAAAC,gBAAA,KAAAA,gBAAA,GAAA3B,sBAAA,CAMvC,CAAA,+GAAA,CAAA,CAAA,CAAA;;;;"}
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ function ensureValidChipProps(props) {
4
+ if (props.clickable === false && 'selected' in props) {
5
+ throw new Error('오류: "clickable"이 false일 때는 "selected" 속성을 사용할 수 없습니다. ' + '선택 가능한 Chip을 만들려면 "clickable"을 true로 설정하세요.');
6
+ }
7
+ if (props.onDelete === undefined && 'deleteIcon' in props) {
8
+ throw new Error('오류: "onDelete" 함수 없이 "deleteIcon"을 사용할 수 없습니다. ' + '"deleteIcon"을 사용하려면 "onDelete" 함수를 함께 사용해야 합니다.');
9
+ }
10
+ if (!props.children) {
11
+ throw new Error('오류: Chip 컴포넌트에는 반드시 children이 있어야 합니다. ');
12
+ }
13
+ if (!props.size) {
14
+ throw new Error('오류: Chip 컴포넌트에는 반드시 size가 있어야 합니다. ');
15
+ }
16
+ if (!props.variant) {
17
+ throw new Error('오류: Chip 컴포넌트에는 반드시 variant가 있어야 합니다. ');
18
+ }
19
+ var validSizes = ['small', 'medium'];
20
+ if (props.size && !validSizes.includes(props.size)) {
21
+ throw new Error("\uC624\uB958: \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 size \uAC12\uC785\uB2C8\uB2E4: \"".concat(props.size, "\". ") + "\uC720\uD6A8\uD55C size \uAC12\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4: ".concat(validSizes.join(', '), "."));
22
+ }
23
+ var validVariants = ['filled', 'outline', 'dashedLine'];
24
+ if (props.variant && !validVariants.includes(props.variant)) {
25
+ throw new Error("\uC624\uB958: \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 variant \uAC12\uC785\uB2C8\uB2E4: \"".concat(props.variant, "\". ") + "\uC720\uD6A8\uD55C variant \uAC12\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4: ".concat(validVariants.join(', '), "."));
26
+ }
27
+ return true;
28
+ }
29
+
30
+ exports.ensureValidChipProps = ensureValidChipProps;
31
+ //# sourceMappingURL=typeGuard.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeGuard.cjs.js","sources":["../../../../src/Chips/Chip/typeGuard.ts"],"sourcesContent":["import type { ChipProps, ChipSize, ChipVariant } from './types';\n\nexport function ensureValidChipProps(props: ChipProps): props is ChipProps {\n if (props.clickable === false && 'selected' in props) {\n throw new Error(\n '오류: \"clickable\"이 false일 때는 \"selected\" 속성을 사용할 수 없습니다. ' +\n '선택 가능한 Chip을 만들려면 \"clickable\"을 true로 설정하세요.'\n );\n }\n\n if (props.onDelete === undefined && 'deleteIcon' in props) {\n throw new Error(\n '오류: \"onDelete\" 함수 없이 \"deleteIcon\"을 사용할 수 없습니다. ' +\n '\"deleteIcon\"을 사용하려면 \"onDelete\" 함수를 함께 사용해야 합니다.'\n );\n }\n\n if (!props.children) {\n throw new Error(\n '오류: Chip 컴포넌트에는 반드시 children이 있어야 합니다. '\n );\n }\n\n if (!props.size) {\n throw new Error('오류: Chip 컴포넌트에는 반드시 size가 있어야 합니다. ');\n }\n\n if (!props.variant) {\n throw new Error('오류: Chip 컴포넌트에는 반드시 variant가 있어야 합니다. ');\n }\n\n const validSizes: ChipSize[] = ['small', 'medium'];\n if (props.size && !validSizes.includes(props.size)) {\n throw new Error(\n `오류: 올바르지 않은 size 값입니다: \"${props.size}\". ` +\n `유효한 size 값은 다음과 같습니다: ${validSizes.join(', ')}.`\n );\n }\n\n const validVariants: ChipVariant[] = ['filled', 'outline', 'dashedLine'];\n if (props.variant && !validVariants.includes(props.variant)) {\n throw new Error(\n `오류: 올바르지 않은 variant 값입니다: \"${props.variant}\". ` +\n `유효한 variant 값은 다음과 같습니다: ${validVariants.join(', ')}.`\n );\n }\n return true;\n}\n"],"names":["ensureValidChipProps","props","clickable","Error","onDelete","undefined","children","size","variant","validSizes","includes","concat","join","validVariants"],"mappings":";;AAEO,SAASA,oBAAoBA,CAACC,KAAgB,EAAsB;EACzE,IAAIA,KAAK,CAACC,SAAS,KAAK,KAAK,IAAI,UAAU,IAAID,KAAK,EAAE;AACpD,IAAA,MAAM,IAAIE,KAAK,CACb,wDAAwD,GACtD,6CACJ,CAAC,CAAA;AACH,GAAA;EAEA,IAAIF,KAAK,CAACG,QAAQ,KAAKC,SAAS,IAAI,YAAY,IAAIJ,KAAK,EAAE;AACzD,IAAA,MAAM,IAAIE,KAAK,CACb,iDAAiD,GAC/C,iDACJ,CAAC,CAAA;AACH,GAAA;AAEA,EAAA,IAAI,CAACF,KAAK,CAACK,QAAQ,EAAE;AACnB,IAAA,MAAM,IAAIH,KAAK,CACb,yCACF,CAAC,CAAA;AACH,GAAA;AAEA,EAAA,IAAI,CAACF,KAAK,CAACM,IAAI,EAAE;AACf,IAAA,MAAM,IAAIJ,KAAK,CAAC,qCAAqC,CAAC,CAAA;AACxD,GAAA;AAEA,EAAA,IAAI,CAACF,KAAK,CAACO,OAAO,EAAE;AAClB,IAAA,MAAM,IAAIL,KAAK,CAAC,wCAAwC,CAAC,CAAA;AAC3D,GAAA;AAEA,EAAA,IAAMM,UAAsB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;AAClD,EAAA,IAAIR,KAAK,CAACM,IAAI,IAAI,CAACE,UAAU,CAACC,QAAQ,CAACT,KAAK,CAACM,IAAI,CAAC,EAAE;AAClD,IAAA,MAAM,IAAIJ,KAAK,CACb,wFAAAQ,MAAA,CAA2BV,KAAK,CAACM,IAAI,iGAAAI,MAAA,CACVF,UAAU,CAACG,IAAI,CAAC,IAAI,CAAC,MAClD,CAAC,CAAA;AACH,GAAA;EAEA,IAAMC,aAA4B,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,YAAY,CAAC,CAAA;AACxE,EAAA,IAAIZ,KAAK,CAACO,OAAO,IAAI,CAACK,aAAa,CAACH,QAAQ,CAACT,KAAK,CAACO,OAAO,CAAC,EAAE;AAC3D,IAAA,MAAM,IAAIL,KAAK,CACb,2FAAAQ,MAAA,CAA8BV,KAAK,CAACO,OAAO,oGAAAG,MAAA,CACbE,aAAa,CAACD,IAAI,CAAC,IAAI,CAAC,MACxD,CAAC,CAAA;AACH,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb;;;;"}
@@ -0,0 +1,3 @@
1
+ import type { ChipProps } from './types';
2
+ export declare function ensureValidChipProps(props: ChipProps): props is ChipProps;
3
+ //# sourceMappingURL=typeGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeGuard.d.ts","sourceRoot":"","sources":["../../../../src/Chips/Chip/typeGuard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,SAAS,CAAC;AAEhE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,IAAI,SAAS,CA6CzE"}
@@ -0,0 +1,29 @@
1
+ function ensureValidChipProps(props) {
2
+ if (props.clickable === false && 'selected' in props) {
3
+ throw new Error('오류: "clickable"이 false일 때는 "selected" 속성을 사용할 수 없습니다. ' + '선택 가능한 Chip을 만들려면 "clickable"을 true로 설정하세요.');
4
+ }
5
+ if (props.onDelete === undefined && 'deleteIcon' in props) {
6
+ throw new Error('오류: "onDelete" 함수 없이 "deleteIcon"을 사용할 수 없습니다. ' + '"deleteIcon"을 사용하려면 "onDelete" 함수를 함께 사용해야 합니다.');
7
+ }
8
+ if (!props.children) {
9
+ throw new Error('오류: Chip 컴포넌트에는 반드시 children이 있어야 합니다. ');
10
+ }
11
+ if (!props.size) {
12
+ throw new Error('오류: Chip 컴포넌트에는 반드시 size가 있어야 합니다. ');
13
+ }
14
+ if (!props.variant) {
15
+ throw new Error('오류: Chip 컴포넌트에는 반드시 variant가 있어야 합니다. ');
16
+ }
17
+ var validSizes = ['small', 'medium'];
18
+ if (props.size && !validSizes.includes(props.size)) {
19
+ throw new Error("\uC624\uB958: \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 size \uAC12\uC785\uB2C8\uB2E4: \"".concat(props.size, "\". ") + "\uC720\uD6A8\uD55C size \uAC12\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4: ".concat(validSizes.join(', '), "."));
20
+ }
21
+ var validVariants = ['filled', 'outline', 'dashedLine'];
22
+ if (props.variant && !validVariants.includes(props.variant)) {
23
+ throw new Error("\uC624\uB958: \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 variant \uAC12\uC785\uB2C8\uB2E4: \"".concat(props.variant, "\". ") + "\uC720\uD6A8\uD55C variant \uAC12\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4: ".concat(validVariants.join(', '), "."));
24
+ }
25
+ return true;
26
+ }
27
+
28
+ export { ensureValidChipProps };
29
+ //# sourceMappingURL=typeGuard.esm.js.map