@grantcodes/ui 2.0.0-beta4 → 2.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 (310) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/README.md +6 -8
  3. package/custom-elements.json +4273 -0
  4. package/package.json +79 -88
  5. package/src/components/app-bar/app-bar.component.js +90 -0
  6. package/src/components/app-bar/app-bar.js +8 -0
  7. package/src/components/app-bar/app-bar.stories.js +84 -0
  8. package/src/components/app-bar/app-bar.styles.js +227 -0
  9. package/src/components/app-bar/app-bar.test.js +174 -0
  10. package/src/components/app-bar/index.js +3 -0
  11. package/src/components/avatar/avatar.component.js +78 -0
  12. package/src/components/avatar/avatar.js +18 -0
  13. package/src/components/avatar/avatar.stories.js +45 -0
  14. package/src/components/avatar/avatar.styles.js +42 -0
  15. package/src/components/avatar/avatar.test.js +85 -0
  16. package/src/components/avatar/index.js +13 -0
  17. package/src/components/badge/badge.component.js +36 -0
  18. package/src/components/badge/badge.js +8 -0
  19. package/src/components/badge/badge.stories.js +46 -0
  20. package/src/components/badge/badge.styles.js +94 -0
  21. package/src/components/badge/badge.test.js +70 -0
  22. package/src/components/badge/index.js +3 -0
  23. package/src/components/breadcrumb/breadcrumb.component.js +110 -0
  24. package/src/components/breadcrumb/breadcrumb.js +12 -0
  25. package/src/components/breadcrumb/breadcrumb.stories.js +25 -0
  26. package/src/components/breadcrumb/breadcrumb.styles.js +96 -0
  27. package/src/components/breadcrumb/breadcrumb.test.js +144 -0
  28. package/src/components/breadcrumb/index.js +3 -0
  29. package/src/components/button/button.component.js +64 -0
  30. package/src/components/button/button.js +6 -0
  31. package/src/components/button/button.stories.js +78 -0
  32. package/src/components/button/button.styles.js +97 -0
  33. package/src/components/button/button.test.js +98 -0
  34. package/src/components/button/index.js +1 -0
  35. package/src/components/button-group/button-group.component.js +27 -0
  36. package/src/components/button-group/button-group.js +6 -0
  37. package/src/components/button-group/button-group.stories.js +33 -0
  38. package/src/components/button-group/button-group.styles.js +43 -0
  39. package/src/components/button-group/button-group.test.js +57 -0
  40. package/src/components/button-group/index.js +1 -0
  41. package/src/components/card/card.component.js +17 -0
  42. package/src/components/card/card.js +6 -0
  43. package/src/components/card/card.stories.js +36 -0
  44. package/src/components/card/card.styles.js +128 -0
  45. package/src/components/card/card.test.js +59 -0
  46. package/src/components/card/index.js +1 -0
  47. package/src/components/code-preview/code-preview.component.js +53 -0
  48. package/src/components/code-preview/code-preview.js +7 -0
  49. package/src/components/code-preview/code-preview.stories.js +67 -0
  50. package/src/components/code-preview/code-preview.styles.js +18 -0
  51. package/src/components/code-preview/code-preview.test.js +118 -0
  52. package/src/components/code-preview/index.js +1 -0
  53. package/src/components/container/container.component.js +38 -0
  54. package/src/components/container/container.js +7 -0
  55. package/src/components/container/container.stories.js +59 -0
  56. package/src/components/container/container.styles.js +43 -0
  57. package/src/components/container/container.test.js +84 -0
  58. package/src/components/container/index.js +1 -0
  59. package/src/components/dialog/dialog.component.js +78 -0
  60. package/src/components/dialog/dialog.js +7 -0
  61. package/src/components/dialog/dialog.stories.js +43 -0
  62. package/src/components/dialog/dialog.styles.js +74 -0
  63. package/src/components/dialog/dialog.test.js +97 -0
  64. package/src/components/dialog/index.js +1 -0
  65. package/src/components/dropdown/dropdown.component.js +225 -0
  66. package/src/components/dropdown/dropdown.js +12 -0
  67. package/src/components/dropdown/dropdown.stories.js +107 -0
  68. package/src/components/dropdown/dropdown.styles.js +128 -0
  69. package/src/components/dropdown/dropdown.test.js +144 -0
  70. package/src/components/dropdown/index.js +3 -0
  71. package/src/components/dropzone/dropzone.component.js +141 -0
  72. package/src/components/dropzone/dropzone.js +6 -0
  73. package/src/components/dropzone/dropzone.stories.js +41 -0
  74. package/src/components/dropzone/dropzone.styles.js +64 -0
  75. package/src/components/dropzone/dropzone.test.js +112 -0
  76. package/src/components/dropzone/index.js +1 -0
  77. package/src/components/footer/footer-column.component.js +15 -0
  78. package/src/components/footer/footer-column.styles.js +51 -0
  79. package/src/components/footer/footer.component.js +38 -0
  80. package/src/components/footer/footer.js +9 -0
  81. package/src/components/footer/footer.stories.js +143 -0
  82. package/src/components/footer/footer.styles.js +90 -0
  83. package/src/components/footer/footer.test.js +107 -0
  84. package/src/components/footer/index.js +2 -0
  85. package/src/components/form-field/form-field.component.js +173 -0
  86. package/src/components/form-field/form-field.js +7 -0
  87. package/src/components/form-field/form-field.stories.js +104 -0
  88. package/src/components/form-field/form-field.styles.js +47 -0
  89. package/src/components/form-field/form-field.test.js +118 -0
  90. package/src/components/form-field/index.js +1 -0
  91. package/src/components/gallery/gallery-image.component.js +52 -0
  92. package/src/components/gallery/gallery-image.js +7 -0
  93. package/src/components/gallery/gallery.component.js +25 -0
  94. package/src/components/gallery/gallery.js +7 -0
  95. package/src/components/gallery/gallery.stories.js +60 -0
  96. package/src/components/gallery/gallery.styles.js +56 -0
  97. package/src/components/gallery/gallery.test.js +58 -0
  98. package/src/components/gallery/index.js +2 -0
  99. package/src/components/icon/icon.component.js +14 -0
  100. package/src/components/icon/icon.js +7 -0
  101. package/src/components/icon/icon.stories.js +26 -0
  102. package/src/components/icon/icon.styles.js +28 -0
  103. package/src/components/icon/icon.test.js +57 -0
  104. package/src/components/icon/index.js +1 -0
  105. package/src/components/loading/index.js +1 -0
  106. package/src/components/loading/loading.component.js +21 -0
  107. package/src/components/loading/loading.js +7 -0
  108. package/src/components/loading/loading.stories.js +25 -0
  109. package/src/components/loading/loading.styles.js +43 -0
  110. package/src/components/loading/loading.test.js +57 -0
  111. package/src/components/notice/index.js +1 -0
  112. package/src/components/notice/notice.component.js +77 -0
  113. package/src/components/notice/notice.js +7 -0
  114. package/src/components/notice/notice.stories.js +122 -0
  115. package/src/components/notice/notice.styles.js +72 -0
  116. package/src/components/notice/notice.test.js +146 -0
  117. package/src/components/pagination/index.js +1 -0
  118. package/src/components/pagination/pagination.component.js +62 -0
  119. package/src/components/pagination/pagination.js +7 -0
  120. package/src/components/pagination/pagination.stories.js +34 -0
  121. package/src/components/pagination/pagination.styles.js +19 -0
  122. package/src/components/pagination/pagination.test.js +98 -0
  123. package/src/components/sidebar/index.js +3 -0
  124. package/src/components/sidebar/sidebar.component.js +165 -0
  125. package/src/components/sidebar/sidebar.js +8 -0
  126. package/src/components/sidebar/sidebar.stories.js +155 -0
  127. package/src/components/sidebar/sidebar.styles.js +192 -0
  128. package/src/components/sidebar/sidebar.test.js +196 -0
  129. package/src/components/tabs/index.js +2 -0
  130. package/src/components/tabs/internal/tabs-button.component.js +39 -0
  131. package/src/components/tabs/internal/tabs-button.js +7 -0
  132. package/src/components/tabs/internal/tabs-item.component.js +39 -0
  133. package/src/components/tabs/tab.component.js +20 -0
  134. package/src/components/tabs/tab.js +7 -0
  135. package/src/components/tabs/tabs.component.js +130 -0
  136. package/src/components/tabs/tabs.js +7 -0
  137. package/src/components/tabs/tabs.stories.js +39 -0
  138. package/src/components/tabs/tabs.styles.js +88 -0
  139. package/src/components/tabs/tabs.test.js +148 -0
  140. package/src/components/toast/index.js +3 -0
  141. package/src/components/toast/toast.component.js +187 -0
  142. package/src/components/toast/toast.js +9 -0
  143. package/src/components/toast/toast.stories.js +169 -0
  144. package/src/components/toast/toast.styles.js +207 -0
  145. package/src/components/toast/toast.test.js +196 -0
  146. package/src/components/tooltip/index.js +1 -0
  147. package/src/components/tooltip/tooltip.component.js +70 -0
  148. package/src/components/tooltip/tooltip.js +7 -0
  149. package/src/components/tooltip/tooltip.stories.js +33 -0
  150. package/src/components/tooltip/tooltip.styles.js +78 -0
  151. package/src/components/tooltip/tooltip.test.js +150 -0
  152. package/src/css/all.css +1 -0
  153. package/src/css/base.css +31 -0
  154. package/src/css/colors.stories.js +192 -0
  155. package/src/css/elements/a.css +50 -0
  156. package/src/css/elements/forms/button.css +15 -0
  157. package/src/css/elements/forms/input.css +183 -0
  158. package/src/css/elements/forms/label.css +5 -0
  159. package/src/css/elements/media/image.css +3 -0
  160. package/src/css/elements.css +5 -0
  161. package/src/css/elements.stories.js +108 -0
  162. package/src/css/helpers.css +16 -0
  163. package/src/css/themes/grantcodes.css +3 -0
  164. package/src/css/themes/todomap.css +2 -0
  165. package/src/css/themes/wireframe.css +2 -0
  166. package/src/css/tokens.stories.js +183 -0
  167. package/src/css/typography.css +64 -0
  168. package/src/css/typography.stories.js +179 -0
  169. package/src/css/util/functions.css +16 -0
  170. package/src/css/util/index.css +2 -0
  171. package/src/css/util/mixins.css +63 -0
  172. package/src/icons.js +3 -0
  173. package/src/lib/classnames.js +61 -0
  174. package/src/lib/generate-id.js +10 -0
  175. package/src/main.js +17 -0
  176. package/src/test-utils/assert-helpers.js +150 -0
  177. package/src/test-utils/events.js +88 -0
  178. package/src/test-utils/fixture.js +77 -0
  179. package/src/test-utils/index.js +7 -0
  180. package/dist/components/avatar/avatar.component.js +0 -3
  181. package/dist/components/avatar/avatar.js +0 -1
  182. package/dist/components/avatar/avatar.react.js +0 -1
  183. package/dist/components/avatar/avatar.scss.js +0 -1
  184. package/dist/components/avatar/index.js +0 -1
  185. package/dist/components/button/button.component.js +0 -5
  186. package/dist/components/button/button.js +0 -1
  187. package/dist/components/button/button.react.js +0 -1
  188. package/dist/components/button/button.scss.js +0 -1
  189. package/dist/components/button/index.js +0 -1
  190. package/dist/components/button-group/button-group.component.js +0 -5
  191. package/dist/components/button-group/button-group.js +0 -1
  192. package/dist/components/button-group/button-group.react.js +0 -1
  193. package/dist/components/button-group/button-group.scss.js +0 -1
  194. package/dist/components/button-group/index.js +0 -1
  195. package/dist/components/card/card.component.js +0 -8
  196. package/dist/components/card/card.js +0 -1
  197. package/dist/components/card/card.react.js +0 -1
  198. package/dist/components/card/card.scss.js +0 -1
  199. package/dist/components/card/index.js +0 -1
  200. package/dist/components/code-preview/code-preview.component.js +0 -1
  201. package/dist/components/code-preview/code-preview.js +0 -1
  202. package/dist/components/code-preview/code-preview.react.js +0 -1
  203. package/dist/components/code-preview/code-preview.scss.js +0 -1
  204. package/dist/components/code-preview/index.js +0 -1
  205. package/dist/components/container/container.component.js +0 -5
  206. package/dist/components/container/container.js +0 -1
  207. package/dist/components/container/container.react.js +0 -1
  208. package/dist/components/container/container.scss.js +0 -1
  209. package/dist/components/container/index.js +0 -1
  210. package/dist/components/dialog/dialog.component.js +0 -23
  211. package/dist/components/dialog/dialog.js +0 -1
  212. package/dist/components/dialog/dialog.react.js +0 -1
  213. package/dist/components/dialog/dialog.scss.js +0 -1
  214. package/dist/components/dialog/index.js +0 -1
  215. package/dist/components/dropzone/dropzone.component.js +0 -11
  216. package/dist/components/dropzone/dropzone.js +0 -1
  217. package/dist/components/dropzone/dropzone.react.js +0 -1
  218. package/dist/components/dropzone/dropzone.scss.js +0 -1
  219. package/dist/components/dropzone/index.js +0 -1
  220. package/dist/components/form-field/form-field.component.js +0 -22
  221. package/dist/components/form-field/form-field.js +0 -1
  222. package/dist/components/form-field/form-field.react.js +0 -1
  223. package/dist/components/form-field/form-field.scss.js +0 -1
  224. package/dist/components/form-field/index.js +0 -1
  225. package/dist/components/gallery/gallery-image.component.js +0 -14
  226. package/dist/components/gallery/gallery-image.js +0 -1
  227. package/dist/components/gallery/gallery.component.js +0 -5
  228. package/dist/components/gallery/gallery.js +0 -1
  229. package/dist/components/gallery/gallery.react.js +0 -1
  230. package/dist/components/gallery/gallery.scss.js +0 -1
  231. package/dist/components/gallery/index.js +0 -1
  232. package/dist/components/icon/icon.component.js +0 -1
  233. package/dist/components/icon/icon.js +0 -1
  234. package/dist/components/icon/icon.react.js +0 -1
  235. package/dist/components/icon/icon.scss.js +0 -1
  236. package/dist/components/icon/index.js +0 -1
  237. package/dist/components/loading/index.js +0 -1
  238. package/dist/components/loading/loading.component.js +0 -5
  239. package/dist/components/loading/loading.js +0 -1
  240. package/dist/components/loading/loading.react.js +0 -1
  241. package/dist/components/loading/loading.scss.js +0 -1
  242. package/dist/components/notice/index.js +0 -1
  243. package/dist/components/notice/notice.component.js +0 -17
  244. package/dist/components/notice/notice.js +0 -1
  245. package/dist/components/notice/notice.react.js +0 -1
  246. package/dist/components/notice/notice.scss.js +0 -1
  247. package/dist/components/pagination/index.js +0 -1
  248. package/dist/components/pagination/pagination.component.js +0 -13
  249. package/dist/components/pagination/pagination.js +0 -1
  250. package/dist/components/pagination/pagination.react.js +0 -1
  251. package/dist/components/pagination/pagination.scss.js +0 -1
  252. package/dist/components/tabs/index.js +0 -1
  253. package/dist/components/tabs/tab.component.js +0 -1
  254. package/dist/components/tabs/tab.js +0 -1
  255. package/dist/components/tabs/tabs-item.component.js +0 -1
  256. package/dist/components/tabs/tabs-panel.component.js +0 -10
  257. package/dist/components/tabs/tabs-panel.js +0 -1
  258. package/dist/components/tabs/tabs-tab.component.js +0 -12
  259. package/dist/components/tabs/tabs-tab.js +0 -1
  260. package/dist/components/tabs/tabs.component.js +0 -28
  261. package/dist/components/tabs/tabs.js +0 -1
  262. package/dist/components/tabs/tabs.react.js +0 -1
  263. package/dist/components/tabs/tabs.scss.js +0 -1
  264. package/dist/components/tooltip/index.js +0 -1
  265. package/dist/components/tooltip/tooltip.component.js +0 -10
  266. package/dist/components/tooltip/tooltip.js +0 -1
  267. package/dist/components/tooltip/tooltip.react.js +0 -1
  268. package/dist/components/tooltip/tooltip.scss.js +0 -1
  269. package/dist/css/base.css +0 -1
  270. package/dist/css/themes/grantcodes.css +0 -1
  271. package/dist/fonts/greycliff-bold-oblique.woff +0 -0
  272. package/dist/fonts/greycliff-bold-oblique.woff2 +0 -0
  273. package/dist/fonts/greycliff-bold.woff +0 -0
  274. package/dist/fonts/greycliff-bold.woff2 +0 -0
  275. package/dist/fonts/greycliff-demi-bold-oblique.woff +0 -0
  276. package/dist/fonts/greycliff-demi-bold-oblique.woff2 +0 -0
  277. package/dist/fonts/greycliff-demi-bold.woff +0 -0
  278. package/dist/fonts/greycliff-demi-bold.woff2 +0 -0
  279. package/dist/fonts/greycliff-extra-bold-oblique.woff +0 -0
  280. package/dist/fonts/greycliff-extra-bold-oblique.woff2 +0 -0
  281. package/dist/fonts/greycliff-extra-bold.woff +0 -0
  282. package/dist/fonts/greycliff-extra-bold.woff2 +0 -0
  283. package/dist/fonts/greycliff-extra-light-oblique.woff +0 -0
  284. package/dist/fonts/greycliff-extra-light-oblique.woff2 +0 -0
  285. package/dist/fonts/greycliff-extra-light.woff +0 -0
  286. package/dist/fonts/greycliff-extra-light.woff2 +0 -0
  287. package/dist/fonts/greycliff-heavy-oblique.woff +0 -0
  288. package/dist/fonts/greycliff-heavy-oblique.woff2 +0 -0
  289. package/dist/fonts/greycliff-heavy.woff +0 -0
  290. package/dist/fonts/greycliff-heavy.woff2 +0 -0
  291. package/dist/fonts/greycliff-light-oblique.woff +0 -0
  292. package/dist/fonts/greycliff-light-oblique.woff2 +0 -0
  293. package/dist/fonts/greycliff-light.woff +0 -0
  294. package/dist/fonts/greycliff-light.woff2 +0 -0
  295. package/dist/fonts/greycliff-medium-oblique.woff +0 -0
  296. package/dist/fonts/greycliff-medium-oblique.woff2 +0 -0
  297. package/dist/fonts/greycliff-medium.woff +0 -0
  298. package/dist/fonts/greycliff-medium.woff2 +0 -0
  299. package/dist/fonts/greycliff-regular-oblique.woff +0 -0
  300. package/dist/fonts/greycliff-regular-oblique.woff2 +0 -0
  301. package/dist/fonts/greycliff-regular.woff +0 -0
  302. package/dist/fonts/greycliff-regular.woff2 +0 -0
  303. package/dist/fonts/greycliff-thin-oblique.woff +0 -0
  304. package/dist/fonts/greycliff-thin-oblique.woff2 +0 -0
  305. package/dist/fonts/greycliff-thin.woff +0 -0
  306. package/dist/fonts/greycliff-thin.woff2 +0 -0
  307. package/dist/icons.js +0 -1
  308. package/dist/lib/generate-id.js +0 -1
  309. package/dist/main.js +0 -1
  310. package/dist/react.js +0 -1
@@ -0,0 +1,108 @@
1
+ import { html } from "lit";
2
+
3
+ // This default export determines where your story goes in the story list
4
+ const meta = {
5
+ title: "Styles/Elements",
6
+ // component: "grantcodes-elements",
7
+ };
8
+
9
+ export default meta;
10
+
11
+ export const Image = {
12
+ args: {
13
+ width: 400,
14
+ height: 400,
15
+ },
16
+ render: ({ width, height }) =>
17
+ html`<img
18
+ width="${width}"
19
+ height="${height}"
20
+ src="https://placehold.co/${width}x${height}"
21
+ />`,
22
+ };
23
+
24
+ export const Figure = {
25
+ args: {},
26
+ render: () =>
27
+ html`<figure>
28
+ <img width="800" height="600" src="https://placehold.co/800x600" />
29
+ <figcaption>This is a caption</figcaption>
30
+ </figure>`,
31
+ };
32
+
33
+ export const Link = {
34
+ args: {
35
+ text: "This is a link",
36
+ },
37
+ render: ({ text }) => html`<a href="#">${text}</a>`,
38
+ };
39
+
40
+ export const Button = {
41
+ args: {
42
+ text: "This is a button",
43
+ disabled: false,
44
+ },
45
+ render: ({ text }) => html`<button>${text}</button>`,
46
+ };
47
+
48
+ export const Input = {
49
+ args: {
50
+ placeholder: "This is an input",
51
+ },
52
+ render: ({ placeholder }) => html`<input placeholder="${placeholder}" />`,
53
+ };
54
+
55
+ export const Label = {
56
+ args: {
57
+ text: "This is a label",
58
+ },
59
+ render: ({ text }) => html`<label>${text}</label>`,
60
+ };
61
+
62
+ export const Select = {
63
+ args: {},
64
+ render: () => html`<select>
65
+ <option value="1">Option 1</option>
66
+ <option value="2">Option 2</option>
67
+ <option value="3">Option 3</option>
68
+ <option value="4">Option 4</option>
69
+ <option value="5">Option 5</option>
70
+ </select>`,
71
+ };
72
+
73
+ export const Textarea = {
74
+ args: {
75
+ placeholder: "This is a textarea",
76
+ },
77
+ render: ({ placeholder }) =>
78
+ html`<textarea placeholder="${placeholder}"></textarea>`,
79
+ };
80
+
81
+ export const Checkbox = {
82
+ args: {},
83
+ render: () => html`<input type="checkbox" />`,
84
+ };
85
+
86
+ export const Radio = {
87
+ args: {
88
+ text: "This is a radio",
89
+ },
90
+ render: () => html`<input type="radio" />`,
91
+ };
92
+
93
+ export const DetailsSummary = {
94
+ args: {
95
+ exclusive: false,
96
+ },
97
+ argTypes: {},
98
+ render: ({ exclusive }) => html`
99
+ <details name=${exclusive ? "accordion" : ""}>
100
+ <summary>Summary</summary>
101
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero, ratione ad Suscipit, impedit ipsa sed soluta sapiente totam Voluptatibus, corporis.
102
+ </details>
103
+ <details name=${exclusive ? "accordion" : ""}>
104
+ <summary>Summary</summary>
105
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero, ratione ad Suscipit, impedit ipsa sed soluta sapiente totam Voluptatibus, corporis.
106
+ </details>
107
+ `,
108
+ };
@@ -0,0 +1,16 @@
1
+ .screen-reader-text {
2
+ display: none !important;
3
+ }
4
+
5
+ .hide-print {
6
+ @media print {
7
+ display: none !important;
8
+ }
9
+ }
10
+
11
+ .print-only {
12
+ display: none !important;
13
+ @media print {
14
+ display: block !important;
15
+ }
16
+ }
@@ -0,0 +1,3 @@
1
+ @import "@grantcodes/style-dictionary/grantcodes/css";
2
+ @import "@grantcodes/style-dictionary/grantcodes/css/theme";
3
+ @import "@grantcodes/style-dictionary/assets/fonts/greycliff";
@@ -0,0 +1,2 @@
1
+ @import "@grantcodes/style-dictionary/todomap/css";
2
+ @import "@grantcodes/style-dictionary/todomap/css/theme";
@@ -0,0 +1,2 @@
1
+ @import "@grantcodes/style-dictionary/wireframe/css";
2
+ @import "@grantcodes/style-dictionary/wireframe/css/theme";
@@ -0,0 +1,183 @@
1
+ import grantcodes from '@grantcodes/style-dictionary/grantcodes/json'
2
+ import wireframe from '@grantcodes/style-dictionary/wireframe/json'
3
+ import todomap from '@grantcodes/style-dictionary/todomap/json'
4
+ import { LitElement, html, css } from 'lit'
5
+
6
+ const allTokens = {
7
+ grantcodes,
8
+ wireframe,
9
+ todomap,
10
+ }
11
+
12
+ // Token List Component
13
+ class TokenList extends LitElement {
14
+ static styles = css`
15
+ :host {
16
+ display: block;
17
+ padding: 2rem;
18
+ background: var(--g-theme-color-background-default, #fff);
19
+ color: var(--g-theme-color-content-default, #333);
20
+ }
21
+
22
+ .banner {
23
+ margin-bottom: 2rem;
24
+ padding: 1rem;
25
+ background: var(--g-theme-color-background-subtle, #f5f5f5);
26
+ border-radius: 0.5rem;
27
+ border: 1px solid var(--g-theme-color-border-default, #ccc);
28
+ }
29
+
30
+ .theme-title {
31
+ margin: 0;
32
+ font-weight: 600;
33
+ color: var(--g-theme-color-content-default, #333);
34
+ font-size: 1rem;
35
+ }
36
+
37
+ .theme-hint {
38
+ margin: 0.5rem 0 0 0;
39
+ color: var(--g-theme-color-content-subtle, #666);
40
+ font-size: 0.875rem;
41
+ }
42
+
43
+ .theme-section {
44
+ margin-bottom: 3rem;
45
+ }
46
+
47
+ .section-title {
48
+ margin: 0 0 1rem 0;
49
+ font-weight: 600;
50
+ font-size: 1.5rem;
51
+ color: var(--g-theme-color-content-default, #333);
52
+ padding-bottom: 0.5rem;
53
+ border-bottom: 2px solid var(--g-theme-color-border-default, #ccc);
54
+ }
55
+
56
+ .token-count {
57
+ margin: 0.5rem 0 1rem 0;
58
+ color: var(--g-theme-color-content-subtle, #666);
59
+ font-size: 0.875rem;
60
+ }
61
+
62
+ .token-table {
63
+ width: 100%;
64
+ border-collapse: collapse;
65
+ margin-top: 1rem;
66
+ }
67
+
68
+ .token-table th {
69
+ text-align: left;
70
+ padding: 0.75rem;
71
+ background: var(--g-theme-color-background-subtle, #f5f5f5);
72
+ border-bottom: 2px solid var(--g-theme-color-border-default, #ccc);
73
+ font-weight: 600;
74
+ font-size: 0.875rem;
75
+ color: var(--g-theme-color-content-default, #333);
76
+ }
77
+
78
+ .token-table td {
79
+ padding: 0.75rem;
80
+ border-bottom: 1px solid var(--g-theme-color-border-default, #e0e0e0);
81
+ font-size: 0.875rem;
82
+ }
83
+
84
+ .token-table tr:hover {
85
+ background: var(--g-theme-color-background-subtle, #f9f9f9);
86
+ }
87
+
88
+ .token-name {
89
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
90
+ color: var(--g-theme-color-content-default, #333);
91
+ font-weight: 500;
92
+ }
93
+
94
+ .token-value {
95
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
96
+ color: var(--g-theme-color-content-subtle, #666);
97
+ word-break: break-all;
98
+ }
99
+ `
100
+
101
+ static properties = {
102
+ theme: { type: String },
103
+ }
104
+
105
+ constructor() {
106
+ super();
107
+ this.theme = 'grantcodes';
108
+ }
109
+
110
+ formatValue(value) {
111
+ if (value === null || value === undefined) {
112
+ return String(value)
113
+ }
114
+ if (typeof value === 'object') {
115
+ return JSON.stringify(value, null, 2)
116
+ }
117
+ return String(value)
118
+ }
119
+
120
+ render() {
121
+ const currentThemeTokens = allTokens[this.theme] || allTokens.grantcodes;
122
+ const tokenEntries = Object.entries(currentThemeTokens).sort(([a], [b]) => a.localeCompare(b));
123
+ const themeDisplay = this.theme.charAt(0).toUpperCase() + this.theme.slice(1);
124
+
125
+ return html`
126
+ <div class="banner">
127
+ <p class="theme-title">
128
+ <strong>Current Theme:</strong> ${themeDisplay}
129
+ </p>
130
+ <p class="theme-hint">
131
+ Use the theme picker in the toolbar to switch between themes.
132
+ </p>
133
+ </div>
134
+
135
+ <div class="theme-section">
136
+ <h2 class="section-title">${themeDisplay} Tokens</h2>
137
+ <div class="token-count">${tokenEntries.length} tokens</div>
138
+ <table class="token-table">
139
+ <thead>
140
+ <tr>
141
+ <th>Token Name</th>
142
+ <th>Value</th>
143
+ </tr>
144
+ </thead>
145
+ <tbody>
146
+ ${tokenEntries.map(([tokenName, value]) => html`
147
+ <tr>
148
+ <td class="token-name">--${tokenName}</td>
149
+ <td class="token-value">${this.formatValue(value)}</td>
150
+ <td style="background-color: var(--${tokenName});"></td>
151
+ </tr>
152
+ `)}
153
+ </tbody>
154
+ </table>
155
+ </div>
156
+ `
157
+ }
158
+ }
159
+
160
+ customElements.define('token-list', TokenList)
161
+
162
+ // This default export determines where your story goes in the story list
163
+ const meta = {
164
+ title: "Styles/Tokens",
165
+ parameters: {
166
+ docs: {
167
+ description: {
168
+ component:
169
+ "Complete list of design tokens. Tokens update based on the selected theme in the Storybook toolbar.",
170
+ },
171
+ },
172
+ },
173
+ }
174
+
175
+ export default meta
176
+
177
+ // Main tokens story that responds to theme changes
178
+ export const AllTokens = {
179
+ render: (args, context) => {
180
+ const theme = context.globals?.theme || "grantcodes";
181
+ return html`<token-list .theme=${theme}></token-list>`;
182
+ },
183
+ }
@@ -0,0 +1,64 @@
1
+ @import "./util/index.css";
2
+
3
+ html {
4
+ font-family: var(--g-theme-typography-body-default-font-family);
5
+ line-height: var(--g-theme-typography-body-default-line-height);
6
+ font-size: var(--g-typography-font-size-16);
7
+ font-weight: var(--g-theme-typography-body-default-font-weight);
8
+ }
9
+
10
+ h1,
11
+ h2,
12
+ h3,
13
+ h4,
14
+ h5,
15
+ h6 {
16
+ line-height: var(--g-theme-typography-headline-default-line-height);
17
+ font-weight: var(--g-theme-typography-headline-default-font-weight);
18
+ text-wrap: balance;
19
+ }
20
+
21
+ h1 {
22
+ font-size: var(--g-typography-font-size-48);
23
+ }
24
+
25
+ h2 {
26
+ font-size: var(--g-typography-font-size-24);
27
+ }
28
+
29
+ h3 {
30
+ font-size: var(--g-typography-font-size-20);
31
+ }
32
+
33
+ h4 {
34
+ font-size: var(--g-typography-font-size-16);
35
+ }
36
+
37
+ h5 {
38
+ font-size: var(--g-typography-font-size-14);
39
+ }
40
+
41
+ h6 {
42
+ font-size: var(--g-typography-font-size-12);
43
+ }
44
+
45
+ p {
46
+ text-wrap: pretty;
47
+ }
48
+
49
+ pre {
50
+ font-family: var(--g-typography-font-family-system);
51
+ line-height: 1.2;
52
+ width: 100%;
53
+ overflow: auto;
54
+ border-radius: var(--g-theme-border-radius-md);
55
+ /* PLACEHOLDER: u.shadow(0) - manual conversion needed */
56
+ box-shadow: var(--g-theme-box-shadow-sm);
57
+ font-size: var(--g-typography-font-size-16);
58
+ font-weight: 400;
59
+ padding: 1rem;
60
+ }
61
+
62
+ mark {
63
+ background-color: var(--g-color-neutral-300);
64
+ }
@@ -0,0 +1,179 @@
1
+ import { html } from "lit";
2
+
3
+ // This default export determines where your story goes in the story list
4
+ const meta = {
5
+ title: "Styles/Typography",
6
+ // component: "grantcodes-typography",
7
+ };
8
+
9
+ export default meta;
10
+
11
+ export const Heading1 = {
12
+ args: {
13
+ text: "Heading 1",
14
+ },
15
+ render: ({ text }) => html`<h1>${text}</h1>`,
16
+ };
17
+
18
+ export const Heading2 = {
19
+ args: {
20
+ text: "Heading 2",
21
+ },
22
+ render: ({ text }) => html`<h2>${text}</h2>`,
23
+ };
24
+
25
+ export const Heading3 = {
26
+ args: {
27
+ text: "Heading 3",
28
+ },
29
+ render: ({ text }) => html`<h3>${text}</h3>`,
30
+ };
31
+
32
+ export const Heading4 = {
33
+ args: {
34
+ text: "Heading 4",
35
+ },
36
+ render: ({ text }) => html`<h4>${text}</h4>`,
37
+ };
38
+
39
+ export const Heading5 = {
40
+ args: {
41
+ text: "Heading 5",
42
+ },
43
+ render: ({ text }) => html`<h5>${text}</h5>`,
44
+ };
45
+
46
+ export const Heading6 = {
47
+ args: {
48
+ text: "Heading 6",
49
+ },
50
+ render: ({ text }) => html`<h6>${text}</h6>`,
51
+ };
52
+
53
+ export const Paragraph = {
54
+ args: {
55
+ text: "This is a paragraph.",
56
+ },
57
+ render: ({ text }) => html`<p>${text}</p>`,
58
+ };
59
+
60
+ export const Emphasis = {
61
+ args: {
62
+ text: "This is emphasized text.",
63
+ },
64
+ render: ({ text }) => html`<p><em>${text}</em></p>`,
65
+ };
66
+
67
+ export const Strong = {
68
+ args: {
69
+ text: "This is strong text.",
70
+ },
71
+ render: ({ text }) => html`<p><strong>${text}</strong></p>`,
72
+ };
73
+
74
+ export const Small = {
75
+ args: {
76
+ text: "This is smallprint.",
77
+ },
78
+ render: ({ text }) => html`<p><small>${text}</small></p>`,
79
+ };
80
+
81
+ export const Deleted = {
82
+ args: {
83
+ text: "This is deleted text.",
84
+ },
85
+ render: ({ text }) => html`<p><del>${text}</del></p>`,
86
+ };
87
+
88
+ export const Inserted = {
89
+ args: {
90
+ text: "This is inserted text.",
91
+ },
92
+ render: ({ text }) => html`<p><ins>${text}</ins></p>`,
93
+ };
94
+
95
+ export const Code = {
96
+ args: {
97
+ text: "This is code.",
98
+ },
99
+ render: ({ text }) => html`<p><code>${text}</code></p>`,
100
+ };
101
+
102
+ export const Subscript = {
103
+ args: {
104
+ text: "This is subscript text.",
105
+ },
106
+ render: ({ text }) => html`<p><sub>${text}</sub></p>`,
107
+ };
108
+
109
+ export const Superscript = {
110
+ args: {
111
+ text: "This is superscript text.",
112
+ },
113
+ render: ({ text }) => html`<p><sup>${text}</sup></p>`,
114
+ };
115
+
116
+ export const Mark = {
117
+ args: {
118
+ text: "This is marked text.",
119
+ },
120
+ render: ({ text }) => html`<p><mark>${text}</mark></p>`,
121
+ };
122
+
123
+ export const OrderedList = {
124
+ args: {
125
+ items: ["Item 1", "Item 2"],
126
+ },
127
+ render: ({ items }) => html`
128
+ <ol>
129
+ ${items.map((item) => html`<li>${item}</li>`)}
130
+ </ol>
131
+ `,
132
+ };
133
+
134
+ export const UnorderedList = {
135
+ args: {
136
+ items: ["Item 1", "Item 2"],
137
+ },
138
+ render: ({ items }) => html`
139
+ <ul>
140
+ ${items.map((item) => html`<li>${item}</li>`)}
141
+ </ul>
142
+ `,
143
+ };
144
+
145
+ export const DescriptionDetails = {
146
+ args: {
147
+ items: [
148
+ { term: "Term 1", description: "Description 1" },
149
+ { term: "Term 2", description: "Description 2" },
150
+ ],
151
+ },
152
+ render: ({ items }) => html`
153
+ <dl>
154
+ ${items.map(
155
+ (item) => html`
156
+ <dt>${item.term}</dt>
157
+ <dd>${item.description}</dd>
158
+ `,
159
+ )}
160
+ </dl>
161
+ `,
162
+ };
163
+
164
+ export const Pre = {
165
+ args: {
166
+ text: "This is a pre block.",
167
+ },
168
+ render: ({ text }) => html`<pre>${text}</pre>`,
169
+ };
170
+
171
+ export const Blockquote = {
172
+ args: {
173
+ text: "This is a blockquote.",
174
+ },
175
+ render: ({ text }) => html`<blockquote>
176
+ <p>${text}</p>
177
+ <footer><cite>Cite info</cite></footer>
178
+ </blockquote>`,
179
+ };
@@ -0,0 +1,16 @@
1
+ /* PLACEHOLDER: shadow() function conversion needed */
2
+ /* Original SCSS:
3
+ @function shadow($level: 0) {
4
+ $multiplier: $level + 1;
5
+ @return 0.1rem * $multiplier 0.2rem * $multiplier 0.4rem * $multiplier
6
+ rgba(0, 0, 0, 0.1 * $multiplier);
7
+ }
8
+ */
9
+
10
+ /* Manual conversion needed - consider using CSS custom properties for different shadow levels */
11
+ :root {
12
+ --shadow-0: 0.1rem 0.2rem 0.4rem rgba(0, 0, 0, 0.1);
13
+ --shadow-1: 0.2rem 0.4rem 0.8rem rgba(0, 0, 0, 0.2);
14
+ --shadow-2: 0.3rem 0.6rem 1.2rem rgba(0, 0, 0, 0.3);
15
+ --shadow-3: 0.4rem 0.8rem 1.6rem rgba(0, 0, 0, 0.4);
16
+ }
@@ -0,0 +1,2 @@
1
+ @import "./mixins.css";
2
+ @import "./functions.css";
@@ -0,0 +1,63 @@
1
+ /* Component base styles - inlined from mixin */
2
+ *,
3
+ *::before,
4
+ *::after {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ :host {
9
+ display: block;
10
+ }
11
+
12
+ /* PLACEHOLDER: custom-scrollbar mixin conversion needed */
13
+ /* Original SCSS:
14
+ @mixin custom-scrollbar($size: 0.5rem) {
15
+ &::-webkit-scrollbar {
16
+ width: $size;
17
+ height: $size;
18
+ }
19
+
20
+ &::-webkit-scrollbar-track {
21
+ background-color: rgba(0, 0, 0, 0.05);
22
+ border-radius: math.div($size, 2);
23
+ }
24
+
25
+ &::-webkit-scrollbar-thumb {
26
+ border-radius: math.div($size, 2);
27
+ min-height: 2rem;
28
+ background-color: rgba(0, 0, 0, 0.3);
29
+ }
30
+ }
31
+ */
32
+
33
+ /* Manual conversion needed - convert math.div($size, 2) to calc($size / 2) */
34
+ .custom-scrollbar {
35
+ /* PLACEHOLDER: Add manual conversion here */
36
+ }
37
+
38
+ /* Focus ring styles - using tier-3 component tokens */
39
+ :host {
40
+ outline-color: transparent;
41
+ outline-offset: var(--g-theme-focus-ring-offset-default);
42
+ outline-style: solid;
43
+ outline-width: var(--g-theme-focus-ring-width-default);
44
+ }
45
+
46
+ :host:focus-visible {
47
+ outline-color: var(--g-theme-focus-ring-color-default);
48
+ }
49
+
50
+ @media (prefers-contrast: more) {
51
+ :host:focus-visible {
52
+ outline-color: var(--g-theme-focus-ring-color-contrast);
53
+ box-shadow: 0 0 0
54
+ calc(
55
+ (
56
+ var(--g-theme-focus-ring-width-default) +
57
+ var(--g-theme-focus-ring-offset-default)
58
+ ) *
59
+ 1.5
60
+ )
61
+ var(--g-theme-focus-ring-color-contrast-shadow);
62
+ }
63
+ }
package/src/icons.js ADDED
@@ -0,0 +1,3 @@
1
+ // Map icons to Lucide icons
2
+
3
+ export * from "lucide-static";
@@ -0,0 +1,61 @@
1
+ // classnames npm package moved to a local dependency
2
+
3
+ var hasOwn = {}.hasOwnProperty;
4
+
5
+ export function cx() {
6
+ var classes = "";
7
+ var i;
8
+ var arg;
9
+
10
+ for (i = 0; i < arguments.length; i++) {
11
+ arg = arguments[i];
12
+ if (arg) {
13
+ classes = appendClass(classes, parseValue(arg));
14
+ }
15
+ }
16
+
17
+ return classes;
18
+ }
19
+
20
+ function parseValue(arg) {
21
+ if (typeof arg === "string" || typeof arg === "number") {
22
+ return arg;
23
+ }
24
+
25
+ if (typeof arg !== "object") {
26
+ return "";
27
+ }
28
+
29
+ if (Array.isArray(arg)) {
30
+ return cx.apply(null, arg);
31
+ }
32
+
33
+ if (
34
+ arg.toString !== Object.prototype.toString &&
35
+ !arg.toString.toString().includes("[native code]")
36
+ ) {
37
+ return arg.toString();
38
+ }
39
+
40
+ var classes = "";
41
+
42
+ for (var key in arg) {
43
+ if (hasOwn.call(arg, key) && arg[key]) {
44
+ classes = appendClass(classes, key);
45
+ }
46
+ }
47
+
48
+ return classes;
49
+ }
50
+
51
+ function appendClass(value, newClass) {
52
+ if (!newClass) {
53
+ return value;
54
+ }
55
+
56
+ if (value) {
57
+ return `${value} ${newClass}`;
58
+ }
59
+
60
+ return value + newClass;
61
+ }