@sellmate/design-system 0.0.0 → 0.0.2

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 (201) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/sd-button.sd-guide.sd-icon.sd-portal.entry.cjs.js.map +1 -0
  4. package/dist/cjs/sd-button_4.cjs.entry.js +851 -0
  5. package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
  6. package/dist/cjs/sd-date-box.sd-input.entry.cjs.js.map +1 -0
  7. package/dist/cjs/sd-date-box_2.cjs.entry.js +171 -0
  8. package/dist/cjs/sd-date-picker.cjs.entry.js +102 -0
  9. package/dist/cjs/sd-date-picker.entry.cjs.js.map +1 -0
  10. package/dist/cjs/sd-date-range-picker.cjs.entry.js +2 -2
  11. package/dist/cjs/sd-pagination.sd-tooltip.entry.cjs.js.map +1 -0
  12. package/dist/cjs/{sd-pagination.cjs.entry.js → sd-pagination_2.cjs.entry.js} +46 -3
  13. package/dist/cjs/sd-popover.cjs.entry.js +2 -2
  14. package/dist/cjs/sd-select-option.cjs.entry.js +1 -1
  15. package/dist/cjs/sd-table.cjs.entry.js +92 -45
  16. package/dist/cjs/sd-table.entry.cjs.js.map +1 -1
  17. package/dist/cjs/sd-tag.cjs.entry.js +1 -1
  18. package/dist/cjs/sd-tooltip-portal.cjs.entry.js +158 -0
  19. package/dist/cjs/sd-tooltip-portal.entry.cjs.js.map +1 -0
  20. package/dist/collection/collection-manifest.json +1 -0
  21. package/dist/collection/components/assets/event/Event16.js +3 -0
  22. package/dist/collection/components/assets/event/Event16.js.map +1 -0
  23. package/dist/collection/components/assets/event/index.js +5 -0
  24. package/dist/collection/components/assets/event/index.js.map +1 -0
  25. package/dist/collection/components/assets/index.js +8 -0
  26. package/dist/collection/components/assets/index.js.map +1 -1
  27. package/dist/collection/components/assets/notion/Notion16.js +3 -0
  28. package/dist/collection/components/assets/notion/Notion16.js.map +1 -0
  29. package/dist/collection/components/assets/notion/index.js +5 -0
  30. package/dist/collection/components/assets/notion/index.js.map +1 -0
  31. package/dist/collection/components/assets/pdf/Pdf10.js +3 -0
  32. package/dist/collection/components/assets/pdf/Pdf10.js.map +1 -0
  33. package/dist/collection/components/assets/pdf/Pdf12.js +3 -0
  34. package/dist/collection/components/assets/pdf/Pdf12.js.map +1 -0
  35. package/dist/collection/components/assets/pdf/Pdf16.js +3 -0
  36. package/dist/collection/components/assets/pdf/Pdf16.js.map +1 -0
  37. package/dist/collection/components/assets/pdf/Pdf20.js +3 -0
  38. package/dist/collection/components/assets/pdf/Pdf20.js.map +1 -0
  39. package/dist/collection/components/assets/pdf/Pdf24.js +3 -0
  40. package/dist/collection/components/assets/pdf/Pdf24.js.map +1 -0
  41. package/dist/collection/components/assets/pdf/Pdf8.js +3 -0
  42. package/dist/collection/components/assets/pdf/Pdf8.js.map +1 -0
  43. package/dist/collection/components/assets/pdf/index.js +15 -0
  44. package/dist/collection/components/assets/pdf/index.js.map +1 -0
  45. package/dist/collection/components/assets/youtube/Youtube20.js +3 -0
  46. package/dist/collection/components/assets/youtube/Youtube20.js.map +1 -0
  47. package/dist/collection/components/assets/youtube/index.js +5 -0
  48. package/dist/collection/components/assets/youtube/index.js.map +1 -0
  49. package/dist/collection/components/sd-button/sd-button.js +94 -3
  50. package/dist/collection/components/sd-button/sd-button.js.map +1 -1
  51. package/dist/collection/components/sd-checkbox/sd-checkbox.js +1 -1
  52. package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
  53. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +2 -2
  54. package/dist/collection/components/sd-guide/sd-guide.css +1426 -0
  55. package/dist/collection/components/sd-guide/sd-guide.js +218 -0
  56. package/dist/collection/components/sd-guide/sd-guide.js.map +1 -0
  57. package/dist/collection/components/sd-icon/sd-icon.js +30 -2
  58. package/dist/collection/components/sd-icon/sd-icon.js.map +1 -1
  59. package/dist/collection/components/sd-input/sd-input.js +2 -2
  60. package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
  61. package/dist/collection/components/sd-popover/sd-popover.js +3 -3
  62. package/dist/collection/components/sd-portal/sd-portal.js +1 -1
  63. package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
  64. package/dist/collection/components/sd-table/sd-table.css +65 -2
  65. package/dist/collection/components/sd-table/sd-table.js +133 -45
  66. package/dist/collection/components/sd-table/sd-table.js.map +1 -1
  67. package/dist/collection/components/sd-tag/sd-tag.js +1 -1
  68. package/dist/collection/components/sd-tooltip/sd-tooltip.js +3 -3
  69. package/dist/collection/components/sd-tooltip-portal/sd-tooltip-portal.js +1 -1
  70. package/dist/collection/utils/color/index.js +3 -0
  71. package/dist/collection/utils/color/index.js.map +1 -0
  72. package/dist/collection/utils/color/isColorKey.js +7 -0
  73. package/dist/collection/utils/color/isColorKey.js.map +1 -0
  74. package/dist/collection/utils/color/resolveColor.js +11 -0
  75. package/dist/collection/utils/color/resolveColor.js.map +1 -0
  76. package/dist/components/{p-DFpwyGDV.js → p-B9i2YE0t.js} +5 -5
  77. package/dist/components/{p-DFpwyGDV.js.map → p-B9i2YE0t.js.map} +1 -1
  78. package/dist/components/{p-BGwfm6Tq.js → p-BCYA4Zc8.js} +3 -3
  79. package/dist/components/{p-BGwfm6Tq.js.map → p-BCYA4Zc8.js.map} +1 -1
  80. package/dist/components/{p-DQOaZqiU.js → p-BYJLcD4q.js} +5 -5
  81. package/dist/components/{p-DQOaZqiU.js.map → p-BYJLcD4q.js.map} +1 -1
  82. package/dist/components/{p-tyayzXea.js → p-BYycGbL4.js} +7 -7
  83. package/dist/components/{p-tyayzXea.js.map → p-BYycGbL4.js.map} +1 -1
  84. package/dist/components/{p-DxXmSZym.js → p-C8U-8ibc.js} +15 -5
  85. package/dist/components/p-C8U-8ibc.js.map +1 -0
  86. package/dist/components/{p-CJphMObM.js → p-CUaQiV_x.js} +338 -5
  87. package/dist/components/p-CUaQiV_x.js.map +1 -0
  88. package/dist/components/{p-BfaN9cMr.js → p-CyxZzPBJ.js} +3 -3
  89. package/dist/components/{p-BfaN9cMr.js.map → p-CyxZzPBJ.js.map} +1 -1
  90. package/dist/components/{p-DKsiyJkt.js → p-_NsXHYCA.js} +5 -5
  91. package/dist/components/{p-DKsiyJkt.js.map → p-_NsXHYCA.js.map} +1 -1
  92. package/dist/components/{p-CA23o9eA.js → p-ru6C2WME.js} +4 -4
  93. package/dist/components/{p-CA23o9eA.js.map → p-ru6C2WME.js.map} +1 -1
  94. package/dist/components/sd-button.js +1 -1
  95. package/dist/components/sd-checkbox.js +1 -1
  96. package/dist/components/sd-date-picker.js +5 -5
  97. package/dist/components/sd-date-range-picker.js +5 -5
  98. package/dist/components/sd-guide.d.ts +11 -0
  99. package/dist/components/sd-guide.js +152 -0
  100. package/dist/components/sd-guide.js.map +1 -0
  101. package/dist/components/sd-icon.js +1 -1
  102. package/dist/components/sd-input.js +1 -1
  103. package/dist/components/sd-pagination.js +1 -1
  104. package/dist/components/sd-popover.js +5 -5
  105. package/dist/components/sd-portal.js +1 -1
  106. package/dist/components/sd-select-option.js +1 -1
  107. package/dist/components/sd-select.js +5 -5
  108. package/dist/components/sd-table.js +108 -56
  109. package/dist/components/sd-table.js.map +1 -1
  110. package/dist/components/sd-tag.js +1 -1
  111. package/dist/components/sd-tooltip-portal.js +1 -1
  112. package/dist/components/sd-tooltip.js +1 -1
  113. package/dist/design-system/design-system.esm.js +1 -1
  114. package/dist/design-system/p-0be303fc.entry.js +2 -0
  115. package/dist/design-system/p-0be303fc.entry.js.map +1 -0
  116. package/dist/design-system/p-2106f2b1.entry.js +2 -0
  117. package/dist/design-system/p-2106f2b1.entry.js.map +1 -0
  118. package/dist/design-system/{p-eab8c812.entry.js → p-3d8c249d.entry.js} +2 -2
  119. package/dist/design-system/{p-c788ce90.entry.js → p-3ec8c5aa.entry.js} +2 -2
  120. package/dist/design-system/p-47a18185.entry.js +2 -0
  121. package/dist/design-system/p-47a18185.entry.js.map +1 -0
  122. package/dist/design-system/{p-448aeb40.entry.js → p-95e7d47f.entry.js} +2 -2
  123. package/dist/design-system/{p-5018e77a.entry.js → p-9e1abc28.entry.js} +2 -2
  124. package/dist/design-system/p-9edcce39.entry.js +2 -0
  125. package/dist/design-system/p-9edcce39.entry.js.map +1 -0
  126. package/dist/design-system/p-ae72caf9.entry.js +2 -0
  127. package/dist/design-system/p-ae72caf9.entry.js.map +1 -0
  128. package/dist/design-system/p-af40a2ec.entry.js +2 -0
  129. package/dist/design-system/p-af40a2ec.entry.js.map +1 -0
  130. package/dist/design-system/p-bda0d32b.entry.js +2 -0
  131. package/dist/design-system/{p-d47cde44.entry.js.map → p-bda0d32b.entry.js.map} +1 -1
  132. package/dist/design-system/sd-button.sd-guide.sd-icon.sd-portal.entry.esm.js.map +1 -0
  133. package/dist/design-system/sd-date-box.sd-input.entry.esm.js.map +1 -0
  134. package/dist/design-system/sd-date-picker.entry.esm.js.map +1 -0
  135. package/dist/design-system/sd-pagination.sd-tooltip.entry.esm.js.map +1 -0
  136. package/dist/design-system/sd-table.entry.esm.js.map +1 -1
  137. package/dist/design-system/sd-tooltip-portal.entry.esm.js.map +1 -0
  138. package/dist/esm/design-system.js +1 -1
  139. package/dist/esm/loader.js +1 -1
  140. package/dist/esm/sd-button.sd-guide.sd-icon.sd-portal.entry.js.map +1 -0
  141. package/dist/esm/sd-button_4.entry.js +846 -0
  142. package/dist/esm/sd-checkbox.entry.js +1 -1
  143. package/dist/esm/sd-date-box.sd-input.entry.js.map +1 -0
  144. package/dist/esm/sd-date-box_2.entry.js +168 -0
  145. package/dist/esm/sd-date-picker.entry.js +100 -0
  146. package/dist/esm/sd-date-picker.entry.js.map +1 -0
  147. package/dist/esm/sd-date-range-picker.entry.js +2 -2
  148. package/dist/esm/sd-pagination.sd-tooltip.entry.js.map +1 -0
  149. package/dist/esm/{sd-pagination.entry.js → sd-pagination_2.entry.js} +47 -5
  150. package/dist/esm/sd-popover.entry.js +2 -2
  151. package/dist/esm/sd-select-option.entry.js +1 -1
  152. package/dist/esm/sd-table.entry.js +93 -46
  153. package/dist/esm/sd-table.entry.js.map +1 -1
  154. package/dist/esm/sd-tag.entry.js +1 -1
  155. package/dist/esm/sd-tooltip-portal.entry.js +156 -0
  156. package/dist/esm/sd-tooltip-portal.entry.js.map +1 -0
  157. package/dist/types/components/assets/event/Event16.d.ts +1 -0
  158. package/dist/types/components/assets/event/index.d.ts +3 -0
  159. package/dist/types/components/assets/index.d.ts +17 -0
  160. package/dist/types/components/assets/notion/Notion16.d.ts +1 -0
  161. package/dist/types/components/assets/notion/index.d.ts +3 -0
  162. package/dist/types/components/assets/pdf/Pdf10.d.ts +1 -0
  163. package/dist/types/components/assets/pdf/Pdf12.d.ts +1 -0
  164. package/dist/types/components/assets/pdf/Pdf16.d.ts +1 -0
  165. package/dist/types/components/assets/pdf/Pdf20.d.ts +1 -0
  166. package/dist/types/components/assets/pdf/Pdf24.d.ts +1 -0
  167. package/dist/types/components/assets/pdf/Pdf8.d.ts +1 -0
  168. package/dist/types/components/assets/pdf/index.d.ts +8 -0
  169. package/dist/types/components/assets/youtube/Youtube20.d.ts +1 -0
  170. package/dist/types/components/assets/youtube/index.d.ts +3 -0
  171. package/dist/types/components/sd-button/sd-button.d.ts +4 -0
  172. package/dist/types/components/sd-guide/sd-guide.d.ts +25 -0
  173. package/dist/types/components/sd-icon/sd-icon.d.ts +2 -0
  174. package/dist/types/components/sd-table/sd-table.d.ts +20 -17
  175. package/dist/types/components.d.ts +85 -0
  176. package/dist/types/utils/color/index.d.ts +2 -0
  177. package/dist/types/utils/color/isColorKey.d.ts +4 -0
  178. package/dist/types/utils/color/resolveColor.d.ts +1 -0
  179. package/package.json +2 -2
  180. package/readme.md +83 -69
  181. package/dist/cjs/sd-button.sd-date-box.sd-date-picker.sd-icon.sd-input.sd-portal.sd-tooltip.sd-tooltip-portal.entry.cjs.js.map +0 -1
  182. package/dist/cjs/sd-button_8.cjs.entry.js +0 -869
  183. package/dist/cjs/sd-pagination.entry.cjs.js.map +0 -1
  184. package/dist/components/p-CJphMObM.js.map +0 -1
  185. package/dist/components/p-DxXmSZym.js.map +0 -1
  186. package/dist/design-system/p-3f905629.entry.js +0 -2
  187. package/dist/design-system/p-3f905629.entry.js.map +0 -1
  188. package/dist/design-system/p-bbe6f8ef.entry.js +0 -2
  189. package/dist/design-system/p-bbe6f8ef.entry.js.map +0 -1
  190. package/dist/design-system/p-d47cde44.entry.js +0 -2
  191. package/dist/design-system/p-f4825797.entry.js +0 -2
  192. package/dist/design-system/p-f4825797.entry.js.map +0 -1
  193. package/dist/design-system/sd-button.sd-date-box.sd-date-picker.sd-icon.sd-input.sd-portal.sd-tooltip.sd-tooltip-portal.entry.esm.js.map +0 -1
  194. package/dist/design-system/sd-pagination.entry.esm.js.map +0 -1
  195. package/dist/esm/sd-button.sd-date-box.sd-date-picker.sd-icon.sd-input.sd-portal.sd-tooltip.sd-tooltip-portal.entry.js.map +0 -1
  196. package/dist/esm/sd-button_8.entry.js +0 -860
  197. package/dist/esm/sd-pagination.entry.js.map +0 -1
  198. /package/dist/design-system/{p-eab8c812.entry.js.map → p-3d8c249d.entry.js.map} +0 -0
  199. /package/dist/design-system/{p-c788ce90.entry.js.map → p-3ec8c5aa.entry.js.map} +0 -0
  200. /package/dist/design-system/{p-448aeb40.entry.js.map → p-95e7d47f.entry.js.map} +0 -0
  201. /package/dist/design-system/{p-5018e77a.entry.js.map → p-9e1abc28.entry.js.map} +0 -0
@@ -23,6 +23,10 @@ export { Row, SdTableColumn } from "./components/sd-table/sd-table";
23
23
  export { TagColor, TagSize } from "./components/sd-tag/sd-tag";
24
24
  export namespace Components {
25
25
  interface SdButton {
26
+ /**
27
+ * @default {}
28
+ */
29
+ "buttonStyle": StyleProps;
26
30
  /**
27
31
  * @default '#025497'
28
32
  */
@@ -32,7 +36,13 @@ export namespace Components {
32
36
  */
33
37
  "disabled": boolean;
34
38
  "icon"?: IconName;
39
+ "iconColor"?: string;
35
40
  "iconRight"?: IconName;
41
+ "iconSize"?: number;
42
+ /**
43
+ * @default {}
44
+ */
45
+ "iconStyle": StyleProps;
36
46
  /**
37
47
  * @default ''
38
48
  */
@@ -138,11 +148,34 @@ export namespace Components {
138
148
  "maxRange"?: number;
139
149
  "selectable"?: [string, string];
140
150
  }
151
+ interface SdGuide {
152
+ /**
153
+ * @default ''
154
+ */
155
+ "guideUrl": string;
156
+ /**
157
+ * @default ''
158
+ */
159
+ "message": string | string[];
160
+ /**
161
+ * @default ''
162
+ */
163
+ "popupTitle": string;
164
+ "popupWidth"?: number;
165
+ /**
166
+ * @default 'help'
167
+ */
168
+ "type": 'help' | 'pdf' | 'youtube' | 'notion' | 'event';
169
+ }
141
170
  interface SdIcon {
142
171
  /**
143
172
  * 아이콘 색상
144
173
  */
145
174
  "color"?: string;
175
+ /**
176
+ * @default {}
177
+ */
178
+ "iconStyle": StyleProps;
146
179
  /**
147
180
  * 접근성을 위한 라벨
148
181
  */
@@ -391,6 +424,7 @@ export namespace Components {
391
424
  * @default []
392
425
  */
393
426
  "columns": SdTableColumn[];
427
+ "height"?: number;
394
428
  /**
395
429
  * @default '데이터가 없습니다.'
396
430
  */
@@ -420,6 +454,10 @@ export namespace Components {
420
454
  * @default new Set()
421
455
  */
422
456
  "selected": Set<Row>;
457
+ /**
458
+ * @default { left: 0, right: 0 }
459
+ */
460
+ "stickyColumn": { left?: number; right?: number };
423
461
  /**
424
462
  * @default false
425
463
  */
@@ -649,6 +687,12 @@ declare global {
649
687
  prototype: HTMLSdDateRangePickerElement;
650
688
  new (): HTMLSdDateRangePickerElement;
651
689
  };
690
+ interface HTMLSdGuideElement extends Components.SdGuide, HTMLStencilElement {
691
+ }
692
+ var HTMLSdGuideElement: {
693
+ prototype: HTMLSdGuideElement;
694
+ new (): HTMLSdGuideElement;
695
+ };
652
696
  interface HTMLSdIconElement extends Components.SdIcon, HTMLStencilElement {
653
697
  }
654
698
  var HTMLSdIconElement: {
@@ -808,6 +852,7 @@ declare global {
808
852
  "sd-date-box": HTMLSdDateBoxElement;
809
853
  "sd-date-picker": HTMLSdDatePickerElement;
810
854
  "sd-date-range-picker": HTMLSdDateRangePickerElement;
855
+ "sd-guide": HTMLSdGuideElement;
811
856
  "sd-icon": HTMLSdIconElement;
812
857
  "sd-input": HTMLSdInputElement;
813
858
  "sd-pagination": HTMLSdPaginationElement;
@@ -823,6 +868,10 @@ declare global {
823
868
  }
824
869
  declare namespace LocalJSX {
825
870
  interface SdButton {
871
+ /**
872
+ * @default {}
873
+ */
874
+ "buttonStyle"?: StyleProps;
826
875
  /**
827
876
  * @default '#025497'
828
877
  */
@@ -832,7 +881,13 @@ declare namespace LocalJSX {
832
881
  */
833
882
  "disabled"?: boolean;
834
883
  "icon"?: IconName;
884
+ "iconColor"?: string;
835
885
  "iconRight"?: IconName;
886
+ "iconSize"?: number;
887
+ /**
888
+ * @default {}
889
+ */
890
+ "iconStyle"?: StyleProps;
836
891
  /**
837
892
  * @default ''
838
893
  */
@@ -947,11 +1002,34 @@ declare namespace LocalJSX {
947
1002
  "onSdChange"?: (event: SdDateRangePickerCustomEvent<[string, string]>) => void;
948
1003
  "selectable"?: [string, string];
949
1004
  }
1005
+ interface SdGuide {
1006
+ /**
1007
+ * @default ''
1008
+ */
1009
+ "guideUrl"?: string;
1010
+ /**
1011
+ * @default ''
1012
+ */
1013
+ "message"?: string | string[];
1014
+ /**
1015
+ * @default ''
1016
+ */
1017
+ "popupTitle"?: string;
1018
+ "popupWidth"?: number;
1019
+ /**
1020
+ * @default 'help'
1021
+ */
1022
+ "type"?: 'help' | 'pdf' | 'youtube' | 'notion' | 'event';
1023
+ }
950
1024
  interface SdIcon {
951
1025
  /**
952
1026
  * 아이콘 색상
953
1027
  */
954
1028
  "color"?: string;
1029
+ /**
1030
+ * @default {}
1031
+ */
1032
+ "iconStyle"?: StyleProps;
955
1033
  /**
956
1034
  * 접근성을 위한 라벨
957
1035
  */
@@ -1212,6 +1290,7 @@ declare namespace LocalJSX {
1212
1290
  * @default []
1213
1291
  */
1214
1292
  "columns"?: SdTableColumn[];
1293
+ "height"?: number;
1215
1294
  /**
1216
1295
  * @default '데이터가 없습니다.'
1217
1296
  */
@@ -1243,6 +1322,10 @@ declare namespace LocalJSX {
1243
1322
  * @default new Set()
1244
1323
  */
1245
1324
  "selected"?: Set<Row>;
1325
+ /**
1326
+ * @default { left: 0, right: 0 }
1327
+ */
1328
+ "stickyColumn"?: { left?: number; right?: number };
1246
1329
  /**
1247
1330
  * @default false
1248
1331
  */
@@ -1343,6 +1426,7 @@ declare namespace LocalJSX {
1343
1426
  "sd-date-box": SdDateBox;
1344
1427
  "sd-date-picker": SdDatePicker;
1345
1428
  "sd-date-range-picker": SdDateRangePicker;
1429
+ "sd-guide": SdGuide;
1346
1430
  "sd-icon": SdIcon;
1347
1431
  "sd-input": SdInput;
1348
1432
  "sd-pagination": SdPagination;
@@ -1365,6 +1449,7 @@ declare module "@stencil/core" {
1365
1449
  "sd-date-box": LocalJSX.SdDateBox & JSXBase.HTMLAttributes<HTMLSdDateBoxElement>;
1366
1450
  "sd-date-picker": LocalJSX.SdDatePicker & JSXBase.HTMLAttributes<HTMLSdDatePickerElement>;
1367
1451
  "sd-date-range-picker": LocalJSX.SdDateRangePicker & JSXBase.HTMLAttributes<HTMLSdDateRangePickerElement>;
1452
+ "sd-guide": LocalJSX.SdGuide & JSXBase.HTMLAttributes<HTMLSdGuideElement>;
1368
1453
  "sd-icon": LocalJSX.SdIcon & JSXBase.HTMLAttributes<HTMLSdIconElement>;
1369
1454
  "sd-input": LocalJSX.SdInput & JSXBase.HTMLAttributes<HTMLSdInputElement>;
1370
1455
  "sd-pagination": LocalJSX.SdPagination & JSXBase.HTMLAttributes<HTMLSdPaginationElement>;
@@ -0,0 +1,2 @@
1
+ export * from './isColorKey';
2
+ export * from './resolveColor';
@@ -0,0 +1,4 @@
1
+ export type ColorMap = Record<string, string>;
2
+ export declare const colors: ColorMap;
3
+ export type ColorKey = keyof typeof colors;
4
+ export declare function isColorKey(input: string): input is ColorKey;
@@ -0,0 +1 @@
1
+ export declare function resolveColor(input: string | undefined | null, fallback?: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellmate/design-system",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
4
  "description": "Sellmate Design System - Web Components Library built with Stencil",
5
5
  "keywords": [
6
6
  "web-components",
@@ -83,5 +83,5 @@
83
83
  "@stencil/react-output-target": "^1.2.0",
84
84
  "@stencil/vue-output-target": "^0.11.8"
85
85
  },
86
- "gitHead": "cb83a0141f6b846b81fd382ad77a1f0a12009bf2"
86
+ "gitHead": "c2d7d7b5014e99bb3a5a23a05b44464ffd093459"
87
87
  }
package/readme.md CHANGED
@@ -1,111 +1,125 @@
1
1
  [![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)
2
2
 
3
- # Stencil Component Starter
3
+ # Sellmate Design System
4
4
 
5
- > This is a starter project for building a standalone Web Components using Stencil.
5
+ A comprehensive web components library built with Stencil for Sellmate.
6
6
 
7
- Stencil is a compiler for building fast web apps using Web Components.
8
-
9
- Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than runtime tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements specification.
10
-
11
- Stencil components are just Web Components, so they work in any major framework or with no framework at all.
12
-
13
- ## Getting Started
14
-
15
- To start building a new web component using Stencil, clone this repo to a new directory:
7
+ ## Installation
16
8
 
17
9
  ```bash
18
- git clone https://github.com/stenciljs/component-starter.git my-component
19
- cd my-component
20
- git remote rm origin
10
+ npm install @sellmate/design-system
21
11
  ```
22
12
 
23
- and run:
13
+ or
24
14
 
25
15
  ```bash
26
- npm install
27
- npm start
16
+ yarn add @sellmate/design-system
28
17
  ```
29
18
 
30
- To build the component for production, run:
19
+ ## Quick Start
31
20
 
32
- ```bash
33
- npm run build
34
- ```
21
+ ### Lazy Loading (Recommended for most projects)
35
22
 
36
- To run the unit tests for the components, run:
23
+ Include this script in your HTML:
37
24
 
38
- ```bash
39
- npm test
25
+ ```html
26
+ <script type="module" src="https://unpkg.com/@sellmate/design-system"></script>
40
27
  ```
41
28
 
42
- Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
29
+ Then use any component:
30
+
31
+ ```html
32
+ <sd-button>Click me</sd-button>
33
+ ```
43
34
 
44
- ## Naming Components
35
+ ### ES Module Import
45
36
 
46
- When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
37
+ ```tsx
38
+ import '@sellmate/design-system/dist/design-system/design-system.esm.js';
47
39
 
48
- Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the [Ionic-generated](https://ionicframework.com/) web components use the prefix `ion`.
40
+ function App() {
41
+ return (
42
+ <sd-button
43
+ label='Click me'
44
+ onClick={() => console.log('clicked')}
45
+ >
46
+ </sd-button>
47
+ );
48
+ }
49
49
 
50
- ## Using this component
50
+ export default App;
51
+ ```
51
52
 
52
- There are two strategies we recommend for using web components built with Stencil.
53
+ ### CommonJS (Node.js)
53
54
 
54
- The first step for all two of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
55
+ ```js
56
+ const { defineCustomElements } = require('@sellmate/design-system/loader');
55
57
 
56
- You can read more about these different approaches in the [Stencil docs](https://stenciljs.com/docs/publishing).
58
+ defineCustomElements();
59
+ ```
57
60
 
58
- ### Lazy Loading
61
+ ## Available Components
59
62
 
60
- If your Stencil project is built with the [`dist`](https://stenciljs.com/docs/distribution) output target, you can import a small bootstrap script that registers all components and allows you to load individual component scripts lazily.
63
+ - **sd-button** - Button component
64
+ - **sd-input** - Input field component
65
+ - **sd-checkbox** - Checkbox component
66
+ - **sd-select** - Select dropdown component
67
+ - **sd-table** - Data table component
68
+ - **sd-tag** - Tag/badge component
69
+ - **sd-icon** - Icon component
70
+ - **sd-tooltip** - Tooltip component
71
+ - **sd-popover** - Popover component
72
+ - **sd-date-picker** - Date picker component
73
+ - **sd-date-range-picker** - Date range picker component
74
+ - **sd-pagination** - Pagination component
61
75
 
62
- For example, given your Stencil project namespace is called `my-design-system`, to use `my-component` on any website, inject this into your HTML:
76
+ ## Framework Integration
63
77
 
64
- ```html
65
- <script type="module" src="https://unpkg.com/my-design-system"></script>
66
- <!--
67
- To avoid unpkg.com redirects to the actual file, you can also directly import:
68
- https://unpkg.com/foobar-design-system@0.0.1/dist/foobar-design-system/foobar-design-system.esm.js
69
- -->
70
- <my-component first="Stencil" middle="'Don't call me a framework'" last="JS"></my-component>
71
- ```
78
+ ### React
72
79
 
73
- This will only load the necessary scripts needed to render `<my-component />`. Once more components of this package are used, they will automatically be loaded lazily.
80
+ Use the React wrapper package for better TypeScript support:
74
81
 
75
- You can also import the script as part of your `node_modules` in your applications entry file:
82
+ ```bash
83
+ npm install @sellmate/design-system-react
84
+ ```
76
85
 
77
86
  ```tsx
78
- import 'foobar-design-system/dist/foobar-design-system/foobar-design-system.esm.js';
87
+ import { SdButton } from '@sellmate/design-system-react';
88
+
89
+ export function App() {
90
+ return <SdButton>Click me</SdButton>;
91
+ }
79
92
  ```
80
93
 
81
- Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-y6v26a?file=src%2Fmain.tsx).
94
+ ### Vue 3
82
95
 
83
- ### Standalone
96
+ Use the Vue wrapper package:
97
+
98
+ ```bash
99
+ npm install @sellmate/design-system-vue
100
+ ```
84
101
 
85
- If you are using a Stencil component library with `dist-custom-elements`, we recommend importing Stencil components individually in those files where they are needed.
102
+ ```vue
103
+ <template>
104
+ <SdButton @click="handleClick">Click me</SdButton>
105
+ </template>
86
106
 
87
- To export Stencil components as standalone components make sure you have the [`dist-custom-elements`](https://stenciljs.com/docs/custom-elements) output target defined in your `stencil.config.ts`.
107
+ <script setup>
108
+ import { SdButton } from '@sellmate/design-system-vue';
88
109
 
89
- For example, given you'd like to use `<my-component />` as part of a React component, you can import the component directly via:
110
+ const handleClick = () => {
111
+ console.log('clicked');
112
+ };
113
+ </script>
114
+ ```
90
115
 
91
- ```tsx
92
- import 'foobar-design-system/my-component';
116
+ ## Browser Support
93
117
 
94
- function App() {
95
- return (
96
- <>
97
- <div>
98
- <my-component
99
- first="Stencil"
100
- middle="'Don't call me a framework'"
101
- last="JS"
102
- ></my-component>
103
- </div>
104
- </>
105
- );
106
- }
118
+ - Chrome (latest)
119
+ - Firefox (latest)
120
+ - Safari (latest)
121
+ - Edge (latest)
107
122
 
108
- export default App;
109
- ```
123
+ ## License
110
124
 
111
- Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-b6zuds?file=src%2FApp.tsx).
125
+ MIT