@operato/input 2.0.0-alpha.99 → 2.0.0-beta.1

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 (247) hide show
  1. package/CHANGELOG.md +256 -0
  2. package/demo/index-barcode.html +4 -4
  3. package/demo/index-checkbox.html +4 -4
  4. package/demo/index-code.html +4 -4
  5. package/demo/index-options.html +2 -2
  6. package/dist/src/index.d.ts +1 -0
  7. package/dist/src/index.js +1 -0
  8. package/dist/src/index.js.map +1 -1
  9. package/dist/src/ox-buttons-radio.d.ts +9 -5
  10. package/dist/src/ox-buttons-radio.js +43 -11
  11. package/dist/src/ox-buttons-radio.js.map +1 -1
  12. package/dist/src/ox-checkbox.js +23 -19
  13. package/dist/src/ox-checkbox.js.map +1 -1
  14. package/dist/src/ox-input-3axis.js +12 -1
  15. package/dist/src/ox-input-3axis.js.map +1 -1
  16. package/dist/src/ox-input-3dish.js +16 -11
  17. package/dist/src/ox-input-3dish.js.map +1 -1
  18. package/dist/src/ox-input-angle.js +8 -1
  19. package/dist/src/ox-input-angle.js.map +1 -1
  20. package/dist/src/ox-input-barcode.js +11 -8
  21. package/dist/src/ox-input-barcode.js.map +1 -1
  22. package/dist/src/ox-input-code.js +3 -0
  23. package/dist/src/ox-input-code.js.map +1 -1
  24. package/dist/src/ox-input-color.js +8 -6
  25. package/dist/src/ox-input-color.js.map +1 -1
  26. package/dist/src/ox-input-crontab.js +29 -25
  27. package/dist/src/ox-input-crontab.js.map +1 -1
  28. package/dist/src/ox-input-data.js +15 -6
  29. package/dist/src/ox-input-data.js.map +1 -1
  30. package/dist/src/ox-input-direction.d.ts +11 -0
  31. package/dist/src/ox-input-direction.js +60 -0
  32. package/dist/src/ox-input-direction.js.map +1 -0
  33. package/dist/src/ox-input-duration.js +15 -34
  34. package/dist/src/ox-input-duration.js.map +1 -1
  35. package/dist/src/ox-input-file.js +18 -14
  36. package/dist/src/ox-input-file.js.map +1 -1
  37. package/dist/src/ox-input-hashtags.js +13 -14
  38. package/dist/src/ox-input-hashtags.js.map +1 -1
  39. package/dist/src/ox-input-i18n-label.js +4 -4
  40. package/dist/src/ox-input-i18n-label.js.map +1 -1
  41. package/dist/src/ox-input-image.js +2 -2
  42. package/dist/src/ox-input-image.js.map +1 -1
  43. package/dist/src/ox-input-key-values.js +6 -6
  44. package/dist/src/ox-input-key-values.js.map +1 -1
  45. package/dist/src/ox-input-mass-fraction.js +6 -5
  46. package/dist/src/ox-input-mass-fraction.js.map +1 -1
  47. package/dist/src/ox-input-multiple-colors.js +2 -2
  48. package/dist/src/ox-input-multiple-colors.js.map +1 -1
  49. package/dist/src/ox-input-options.js +6 -6
  50. package/dist/src/ox-input-options.js.map +1 -1
  51. package/dist/src/ox-input-partition-keys.js +6 -6
  52. package/dist/src/ox-input-partition-keys.js.map +1 -1
  53. package/dist/src/ox-input-privilege.js +13 -16
  54. package/dist/src/ox-input-privilege.js.map +1 -1
  55. package/dist/src/ox-input-quantifier.js +5 -5
  56. package/dist/src/ox-input-quantifier.js.map +1 -1
  57. package/dist/src/ox-input-range.js +8 -8
  58. package/dist/src/ox-input-range.js.map +1 -1
  59. package/dist/src/ox-input-search.js +5 -6
  60. package/dist/src/ox-input-search.js.map +1 -1
  61. package/dist/src/ox-input-select-buttons.d.ts +2 -0
  62. package/dist/src/ox-input-select-buttons.js +14 -21
  63. package/dist/src/ox-input-select-buttons.js.map +1 -1
  64. package/dist/src/ox-input-table.js +1 -1
  65. package/dist/src/ox-input-table.js.map +1 -1
  66. package/dist/src/ox-input-unit-number.js +5 -5
  67. package/dist/src/ox-input-unit-number.js.map +1 -1
  68. package/dist/src/ox-input-value-map.js +9 -13
  69. package/dist/src/ox-input-value-map.js.map +1 -1
  70. package/dist/src/ox-input-value-ranges.js +7 -7
  71. package/dist/src/ox-input-value-ranges.js.map +1 -1
  72. package/dist/src/ox-input-work-shift.js +7 -7
  73. package/dist/src/ox-input-work-shift.js.map +1 -1
  74. package/dist/src/ox-select.d.ts +9 -1
  75. package/dist/src/ox-select.js +51 -17
  76. package/dist/src/ox-select.js.map +1 -1
  77. package/dist/src/ox-zoomable-image.d.ts +17 -0
  78. package/dist/src/ox-zoomable-image.js +80 -0
  79. package/dist/src/ox-zoomable-image.js.map +1 -0
  80. package/dist/stories/ox-buttons-radio.stories.d.ts +31 -0
  81. package/dist/stories/ox-buttons-radio.stories.js +81 -0
  82. package/dist/stories/ox-buttons-radio.stories.js.map +1 -0
  83. package/dist/stories/ox-checkbox.stories.d.ts +6 -0
  84. package/dist/stories/ox-checkbox.stories.js +57 -13
  85. package/dist/stories/ox-checkbox.stories.js.map +1 -1
  86. package/dist/stories/ox-input-3axis.stories.d.ts +5 -0
  87. package/dist/stories/ox-input-3axis.stories.js +32 -10
  88. package/dist/stories/ox-input-3axis.stories.js.map +1 -1
  89. package/dist/stories/ox-input-3dish.stories.d.ts +5 -0
  90. package/dist/stories/ox-input-3dish.stories.js +35 -13
  91. package/dist/stories/ox-input-3dish.stories.js.map +1 -1
  92. package/dist/stories/ox-input-angle.stories.d.ts +5 -0
  93. package/dist/stories/ox-input-angle.stories.js +36 -13
  94. package/dist/stories/ox-input-angle.stories.js.map +1 -1
  95. package/dist/stories/ox-input-barcode.stories.d.ts +5 -0
  96. package/dist/stories/ox-input-barcode.stories.js +35 -18
  97. package/dist/stories/ox-input-barcode.stories.js.map +1 -1
  98. package/dist/stories/ox-input-code.stories.d.ts +5 -0
  99. package/dist/stories/ox-input-code.stories.js +38 -13
  100. package/dist/stories/ox-input-code.stories.js.map +1 -1
  101. package/dist/stories/ox-input-crontab.stories.d.ts +5 -0
  102. package/dist/stories/ox-input-crontab.stories.js +35 -12
  103. package/dist/stories/ox-input-crontab.stories.js.map +1 -1
  104. package/dist/stories/ox-input-data.stories.d.ts +5 -0
  105. package/dist/stories/ox-input-data.stories.js +34 -11
  106. package/dist/stories/ox-input-data.stories.js.map +1 -1
  107. package/dist/stories/ox-input-direction.stories.d.ts +34 -0
  108. package/dist/stories/ox-input-direction.stories.js +70 -0
  109. package/dist/stories/ox-input-direction.stories.js.map +1 -0
  110. package/dist/stories/ox-input-duration.stories.d.ts +5 -0
  111. package/dist/stories/ox-input-duration.stories.js +36 -13
  112. package/dist/stories/ox-input-duration.stories.js.map +1 -1
  113. package/dist/stories/ox-input-file.stories.d.ts +5 -0
  114. package/dist/stories/ox-input-file.stories.js +39 -16
  115. package/dist/stories/ox-input-file.stories.js.map +1 -1
  116. package/dist/stories/ox-input-hashtags.stories.d.ts +5 -0
  117. package/dist/stories/ox-input-hashtags.stories.js +35 -12
  118. package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
  119. package/dist/stories/ox-input-i18n-label.stories.d.ts +5 -0
  120. package/dist/stories/ox-input-i18n-label.stories.js +35 -12
  121. package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
  122. package/dist/stories/ox-input-key-values.stories.d.ts +5 -0
  123. package/dist/stories/ox-input-key-values.stories.js +35 -12
  124. package/dist/stories/ox-input-key-values.stories.js.map +1 -1
  125. package/dist/stories/ox-input-mass-fraction.stories.d.ts +5 -0
  126. package/dist/stories/ox-input-mass-fraction.stories.js +36 -13
  127. package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
  128. package/dist/stories/ox-input-multiple-colors.stories.d.ts +5 -0
  129. package/dist/stories/ox-input-multiple-colors.stories.js +31 -149
  130. package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
  131. package/dist/stories/ox-input-options.stories.d.ts +5 -0
  132. package/dist/stories/ox-input-options.stories.js +34 -11
  133. package/dist/stories/ox-input-options.stories.js.map +1 -1
  134. package/dist/stories/ox-input-partition-keys.stories.d.ts +5 -0
  135. package/dist/stories/ox-input-partition-keys.stories.js +34 -11
  136. package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
  137. package/dist/stories/ox-input-privilege.stories.d.ts +5 -0
  138. package/dist/stories/ox-input-privilege.stories.js +36 -18
  139. package/dist/stories/ox-input-privilege.stories.js.map +1 -1
  140. package/dist/stories/ox-input-quantifier.stories.d.ts +5 -0
  141. package/dist/stories/ox-input-quantifier.stories.js +37 -10
  142. package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
  143. package/dist/stories/ox-input-range.stories.d.ts +5 -0
  144. package/dist/stories/ox-input-range.stories.js +32 -5
  145. package/dist/stories/ox-input-range.stories.js.map +1 -1
  146. package/dist/stories/ox-input-search.stories.d.ts +5 -0
  147. package/dist/stories/ox-input-search.stories.js +35 -12
  148. package/dist/stories/ox-input-search.stories.js.map +1 -1
  149. package/dist/stories/ox-input-select-buttons.stories.d.ts +5 -0
  150. package/dist/stories/ox-input-select-buttons.stories.js +36 -14
  151. package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
  152. package/dist/stories/ox-input-unit.stories.d.ts +5 -0
  153. package/dist/stories/ox-input-unit.stories.js +40 -13
  154. package/dist/stories/ox-input-unit.stories.js.map +1 -1
  155. package/dist/stories/ox-input-value-map.stories.d.ts +5 -0
  156. package/dist/stories/ox-input-value-map.stories.js +36 -13
  157. package/dist/stories/ox-input-value-map.stories.js.map +1 -1
  158. package/dist/stories/ox-input-value-ranges.stories.d.ts +5 -0
  159. package/dist/stories/ox-input-value-ranges.stories.js +36 -13
  160. package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
  161. package/dist/stories/ox-input-work-shift.stories.d.ts +5 -0
  162. package/dist/stories/ox-input-work-shift.stories.js +36 -13
  163. package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
  164. package/dist/stories/ox-select-set-options.stories.d.ts +53 -0
  165. package/dist/stories/ox-select-set-options.stories.js +183 -0
  166. package/dist/stories/ox-select-set-options.stories.js.map +1 -0
  167. package/dist/stories/ox-select.stories.d.ts +5 -0
  168. package/dist/stories/ox-select.stories.js +33 -7
  169. package/dist/stories/ox-select.stories.js.map +1 -1
  170. package/dist/tsconfig.tsbuildinfo +1 -1
  171. package/package.json +12 -8
  172. package/src/index.ts +1 -0
  173. package/src/ox-buttons-radio.ts +37 -5
  174. package/src/ox-checkbox.ts +23 -19
  175. package/src/ox-input-3axis.ts +12 -1
  176. package/src/ox-input-3dish.ts +16 -11
  177. package/src/ox-input-angle.ts +8 -1
  178. package/src/ox-input-barcode.ts +11 -8
  179. package/src/ox-input-code.ts +3 -0
  180. package/src/ox-input-color.ts +8 -6
  181. package/src/ox-input-crontab.ts +29 -25
  182. package/src/ox-input-data.ts +15 -6
  183. package/src/ox-input-direction.ts +65 -0
  184. package/src/ox-input-duration.ts +15 -34
  185. package/src/ox-input-file.ts +18 -14
  186. package/src/ox-input-hashtags.ts +14 -16
  187. package/src/ox-input-i18n-label.ts +4 -4
  188. package/src/ox-input-image.ts +2 -2
  189. package/src/ox-input-key-values.ts +6 -6
  190. package/src/ox-input-mass-fraction.ts +6 -5
  191. package/src/ox-input-multiple-colors.ts +2 -2
  192. package/src/ox-input-options.ts +6 -6
  193. package/src/ox-input-partition-keys.ts +6 -6
  194. package/src/ox-input-privilege.ts +13 -16
  195. package/src/ox-input-quantifier.ts +5 -5
  196. package/src/ox-input-range.ts +8 -8
  197. package/src/ox-input-search.ts +5 -6
  198. package/src/ox-input-select-buttons.ts +19 -24
  199. package/src/ox-input-table.ts +1 -1
  200. package/src/ox-input-unit-number.ts +5 -5
  201. package/src/ox-input-value-map.ts +9 -13
  202. package/src/ox-input-value-ranges.ts +7 -7
  203. package/src/ox-input-work-shift.ts +7 -7
  204. package/src/ox-select.ts +60 -13
  205. package/src/ox-zoomable-image.ts +75 -0
  206. package/stories/ox-buttons-radio.stories.ts +96 -0
  207. package/stories/ox-checkbox.stories.ts +61 -14
  208. package/stories/ox-input-3axis.stories.ts +35 -12
  209. package/stories/ox-input-3dish.stories.ts +38 -15
  210. package/stories/ox-input-angle.stories.ts +39 -15
  211. package/stories/ox-input-barcode.stories.ts +37 -18
  212. package/stories/ox-input-code.stories.ts +42 -15
  213. package/stories/ox-input-crontab.stories.ts +43 -14
  214. package/stories/ox-input-data.stories.ts +38 -14
  215. package/stories/ox-input-direction.stories.ts +86 -0
  216. package/stories/ox-input-duration.stories.ts +39 -15
  217. package/stories/ox-input-file.stories.ts +41 -16
  218. package/stories/ox-input-hashtags.stories.ts +42 -12
  219. package/stories/ox-input-i18n-label.stories.ts +55 -31
  220. package/stories/ox-input-key-values.stories.ts +44 -14
  221. package/stories/ox-input-mass-fraction.stories.ts +40 -15
  222. package/stories/ox-input-multiple-colors.stories.ts +34 -151
  223. package/stories/ox-input-options.stories.ts +37 -13
  224. package/stories/ox-input-partition-keys.stories.ts +42 -13
  225. package/stories/ox-input-privilege.stories.ts +45 -20
  226. package/stories/ox-input-quantifier.stories.ts +38 -10
  227. package/stories/ox-input-range.stories.ts +34 -5
  228. package/stories/ox-input-search.stories.ts +37 -12
  229. package/stories/ox-input-select-buttons.stories.ts +40 -16
  230. package/stories/ox-input-unit.stories.ts +43 -14
  231. package/stories/ox-input-value-map.stories.ts +40 -15
  232. package/stories/ox-input-value-ranges.stories.ts +40 -15
  233. package/stories/ox-input-work-shift.stories.ts +39 -15
  234. package/stories/ox-select-set-options.stories.ts +215 -0
  235. package/stories/ox-select.stories.ts +37 -7
  236. package/themes/dark-hc.css +151 -0
  237. package/themes/dark-mc.css +151 -0
  238. package/themes/dark.css +151 -0
  239. package/themes/grist-theme.css +169 -0
  240. package/themes/light-hc.css +151 -0
  241. package/themes/light-mc.css +151 -0
  242. package/themes/light.css +151 -0
  243. package/themes/md-typescale-styles.css +100 -0
  244. package/themes/spacing.css +43 -0
  245. package/themes/state-color.css +6 -0
  246. package/themes/app-theme.css +0 -145
  247. package/themes/input-theme.css +0 -32
@@ -1,16 +1,22 @@
1
1
  import '../src/ox-input-data.js';
2
2
  import { html } from 'lit';
3
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
3
4
  export default {
4
5
  title: 'ox-input-data',
5
6
  component: 'ox-input-data',
6
7
  argTypes: {
7
8
  value: { control: 'text' },
8
9
  name: { control: 'text' },
9
- disabled: { control: 'boolean' }
10
+ disabled: { control: 'boolean' },
11
+ theme: { control: 'select', options: ['light', 'dark'] }
10
12
  }
11
13
  };
12
- const Template = ({ name = 'code', value = '', disabled }) => html `
13
- <link href="/themes/app-theme.css" rel="stylesheet" />
14
+ const Template = ({ name = 'code', value = '', disabled, theme = 'light' }) => html `
15
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
16
+
17
+ <link href="/themes/light.css" rel="stylesheet" />
18
+ <link href="/themes/dark.css" rel="stylesheet" />
19
+ <link href="/themes/spacing.css" rel="stylesheet" />
14
20
 
15
21
  <link
16
22
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -24,24 +30,41 @@ const Template = ({ name = 'code', value = '', disabled }) => html `
24
30
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
25
31
  rel="stylesheet"
26
32
  />
33
+
34
+ <style>
35
+ ${MDTypeScaleStyles.cssText}
36
+ </style>
37
+
27
38
  <style>
28
- body {
39
+ .container {
40
+ height: 500px;
41
+ text-align: center;
42
+ padding: 20px;
43
+
29
44
  }
45
+
30
46
  ox-input-data {
31
47
  height: 300px;
48
+ text-align: start;
32
49
  }
33
50
  </style>
34
51
 
35
- <ox-input-data
36
- @change=${(e) => {
52
+ <script>
53
+ document.body.classList.add('${theme}')
54
+ </script>
55
+
56
+ <div class="container md-typescale-body-large-prominent">
57
+ <ox-input-data
58
+ @change=${(e) => {
37
59
  const value = e.target.value;
38
60
  console.log('value : ', value, typeof value);
39
61
  }}
40
- name=${name}
41
- .value=${value}
42
- ?disabled=${disabled}
43
- >
44
- </ox-input-data>
62
+ name=${name}
63
+ .value=${value}
64
+ ?disabled=${disabled}
65
+ >
66
+ </ox-input-data>
67
+ </div>
45
68
  `;
46
69
  export const Regular = Template.bind({});
47
70
  Regular.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-data.stories.js","sourceRoot":"","sources":["../../stories/ox-input-data.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAcD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;cAwB/E,CAAC,CAAQ,EAAE,EAAE;IACrB,MAAM,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAA;IAClD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;AAC9C,CAAC;WACM,IAAI;aACF,KAAK;gBACF,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,MAAM;CACb,CAAA","sourcesContent":["import '../src/ox-input-data.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-data',\n component: 'ox-input-data',\n argTypes: {\n value: { control: 'text' },\n name: { control: 'text' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: string | number | object\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'code', value = '', disabled }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <style>\n body {\n }\n ox-input-data {\n height: 300px;\n }\n </style>\n\n <ox-input-data\n @change=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n console.log('value : ', value, typeof value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-data>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'data'\n}\n"]}
1
+ {"version":3,"file":"ox-input-data.stories.js","sourceRoot":"","sources":["../../stories/ox-input-data.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBxG,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;;;mCAkBI,KAAK;;;;;gBAKxB,CAAC,CAAQ,EAAE,EAAE;IACrB,MAAM,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAA;IAClD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;AAC9C,CAAC;aACM,IAAI;eACF,KAAK;kBACF,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,MAAM;CACb,CAAA","sourcesContent":["import '../src/ox-input-data.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-data',\n component: 'ox-input-data',\n argTypes: {\n value: { control: 'text' },\n name: { control: 'text' },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: string | number | object\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'code', value = '', disabled, theme = 'light' }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n }\n\n ox-input-data {\n height: 300px;\n text-align: start;\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-data\n @change=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n console.log('value : ', value, typeof value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-data>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'data'\n}\n"]}
@@ -0,0 +1,34 @@
1
+ import '../src/ox-input-direction.js';
2
+ import { TemplateResult } from 'lit';
3
+ declare const _default: {
4
+ title: string;
5
+ component: string;
6
+ argTypes: {
7
+ value: {
8
+ control: string;
9
+ };
10
+ name: {
11
+ control: string;
12
+ };
13
+ disabled: {
14
+ control: string;
15
+ };
16
+ theme: {
17
+ control: string;
18
+ options: string[];
19
+ };
20
+ };
21
+ };
22
+ export default _default;
23
+ interface Story<T> {
24
+ (args: T): TemplateResult;
25
+ args?: Partial<T>;
26
+ argTypes?: Record<string, unknown>;
27
+ }
28
+ interface ArgTypes {
29
+ name?: string;
30
+ value?: object | string;
31
+ disabled?: boolean;
32
+ theme?: string;
33
+ }
34
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,70 @@
1
+ import '../src/ox-input-direction.js';
2
+ import { html } from 'lit';
3
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
4
+ export default {
5
+ title: 'ox-input-direction',
6
+ component: 'ox-input-direction',
7
+ argTypes: {
8
+ value: { control: 'object' },
9
+ name: { control: 'text' },
10
+ disabled: { control: 'boolean' },
11
+ theme: { control: 'select', options: ['light', 'dark'] }
12
+ }
13
+ };
14
+ const Template = ({ name = 'options', value, disabled, theme = 'light' }) => html `
15
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
16
+
17
+ <link href="/themes/light.css" rel="stylesheet" />
18
+ <link href="/themes/dark.css" rel="stylesheet" />
19
+ <link href="/themes/spacing.css" rel="stylesheet" />
20
+
21
+ <link
22
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
23
+ rel="stylesheet"
24
+ />
25
+ <link
26
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
27
+ rel="stylesheet"
28
+ />
29
+ <link
30
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
31
+ rel="stylesheet"
32
+ />
33
+
34
+ <style>
35
+ ${MDTypeScaleStyles.cssText}
36
+ </style>
37
+
38
+ <style>
39
+ .container {
40
+ height: 500px;
41
+ text-align: center;
42
+ padding: 20px;
43
+
44
+ background-color: var(--md-sys-color-primary-container);
45
+ color: var(--md-sys-color-on-primary-container);
46
+ }
47
+ </style>
48
+
49
+ <script>
50
+ document.body.classList.add('${theme}')
51
+ </script>
52
+
53
+ <div class="container">
54
+ <ox-input-direction
55
+ @change=${(e) => {
56
+ console.log(e.target.value);
57
+ }}
58
+ name=${name}
59
+ .value=${value}
60
+ ?disabled=${disabled}
61
+ >
62
+ </ox-input-direction>
63
+ </div>
64
+ `;
65
+ export const Regular = Template.bind({});
66
+ Regular.args = {
67
+ name: 'options',
68
+ value: ''
69
+ };
70
+ //# sourceMappingURL=ox-input-direction.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-input-direction.stories.js","sourceRoot":"","sources":["../../stories/ox-input-direction.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBtG,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;gBAKxB,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;kBACF,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-direction.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-direction',\n component: 'ox-input-direction',\n argTypes: {\n value: { control: 'object' },\n name: { control: 'text' },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: object | string\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'options', value, disabled, theme = 'light' }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container\">\n <ox-input-direction\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-direction>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'options',\n value: ''\n}\n"]}
@@ -14,6 +14,10 @@ declare const _default: {
14
14
  disabled: {
15
15
  control: string;
16
16
  };
17
+ theme: {
18
+ control: string;
19
+ options: string[];
20
+ };
17
21
  };
18
22
  };
19
23
  export default _default;
@@ -26,5 +30,6 @@ interface ArgTypes {
26
30
  name?: string;
27
31
  value?: number;
28
32
  disabled?: boolean;
33
+ theme?: string;
29
34
  }
30
35
  export declare const Regular: Story<ArgTypes>;
@@ -1,17 +1,23 @@
1
1
  import '../src/ox-input-duration.js';
2
2
  import '../src/locale/locale-picker.js';
3
3
  import { html } from 'lit';
4
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
4
5
  export default {
5
6
  title: 'ox-input-duration',
6
7
  component: 'ox-input-duration',
7
8
  argTypes: {
8
9
  value: { control: 'number' },
9
10
  name: { control: 'text' },
10
- disabled: { control: 'boolean' }
11
+ disabled: { control: 'boolean' },
12
+ theme: { control: 'select', options: ['light', 'dark'] }
11
13
  }
12
14
  };
13
- const Template = ({ name = 'duration', value = 3601, disabled }) => html `
14
- <link href="/themes/app-theme.css" rel="stylesheet" />
15
+ const Template = ({ name = 'duration', value = 3601, disabled, theme = 'light' }) => html `
16
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
17
+
18
+ <link href="/themes/light.css" rel="stylesheet" />
19
+ <link href="/themes/dark.css" rel="stylesheet" />
20
+ <link href="/themes/spacing.css" rel="stylesheet" />
15
21
 
16
22
  <link
17
23
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -25,23 +31,40 @@ const Template = ({ name = 'duration', value = 3601, disabled }) => html `
25
31
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
26
32
  rel="stylesheet"
27
33
  />
34
+
28
35
  <style>
29
- body {
36
+ ${MDTypeScaleStyles.cssText}
37
+ </style>
38
+
39
+ <style>
40
+ .container {
41
+ height: 500px;
42
+ text-align: center;
43
+ padding: 20px;
44
+
45
+ background-color: var(--md-sys-color-primary-container);
46
+ color: var(--md-sys-color-on-primary-container);
30
47
  }
31
48
  </style>
32
49
 
33
- <locale-picker></locale-picker>
34
- <br /><br />
50
+ <script>
51
+ document.body.classList.add('${theme}')
52
+ </script>
53
+
54
+ <div class="container md-typescale-body-large-prominent">
55
+ <locale-picker></locale-picker>
56
+ <br /><br />
35
57
 
36
- <ox-input-duration
37
- @change=${(e) => {
58
+ <ox-input-duration
59
+ @change=${(e) => {
38
60
  console.log(e.target.value);
39
61
  }}
40
- name=${name}
41
- .value=${value}
42
- ?disabled=${disabled}
43
- >
44
- </ox-input-duration>
62
+ name=${name}
63
+ .value=${value}
64
+ ?disabled=${disabled}
65
+ >
66
+ </ox-input-duration>
67
+ </div>
45
68
  `;
46
69
  export const Regular = Template.bind({});
47
70
  Regular.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-duration.stories.js","sourceRoot":"","sources":["../../stories/ox-input-duration.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAcD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,UAAU,EAAE,KAAK,GAAG,IAAI,EAAE,QAAQ,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;cAwBrF,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;gBACF,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,IAAI;CACZ,CAAA","sourcesContent":["import '../src/ox-input-duration.js'\nimport '../src/locale/locale-picker.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-duration',\n component: 'ox-input-duration',\n argTypes: {\n value: { control: 'number' },\n name: { control: 'text' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: number\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, disabled }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <style>\n body {\n }\n </style>\n\n <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-duration\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-duration>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'duration',\n value: 3601\n}\n"]}
1
+ {"version":3,"file":"ox-input-duration.stories.js","sourceRoot":"","sources":["../../stories/ox-input-duration.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,UAAU,EAAE,KAAK,GAAG,IAAI,EAAE,QAAQ,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqB9G,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;;;;gBAQxB,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;kBACF,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,IAAI;CACZ,CAAA","sourcesContent":["import '../src/ox-input-duration.js'\nimport '../src/locale/locale-picker.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-duration',\n component: 'ox-input-duration',\n argTypes: {\n value: { control: 'number' },\n name: { control: 'text' },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: number\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, disabled, theme = 'light' }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-duration\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-duration>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'duration',\n value: 3601\n}\n"]}
@@ -31,6 +31,10 @@ declare const _default: {
31
31
  disabled: {
32
32
  control: string;
33
33
  };
34
+ theme: {
35
+ control: string;
36
+ options: string[];
37
+ };
34
38
  };
35
39
  };
36
40
  export default _default;
@@ -49,5 +53,6 @@ interface ArgTypes {
49
53
  hideFileList?: boolean;
50
54
  attachFileList?: boolean;
51
55
  disabled?: boolean;
56
+ theme?: string;
52
57
  }
53
58
  export declare const Regular: Story<ArgTypes>;
@@ -1,5 +1,6 @@
1
1
  import '../src/ox-input-file.js';
2
2
  import { html } from 'lit';
3
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
3
4
  export default {
4
5
  title: 'ox-input-file',
5
6
  component: 'ox-input-file',
@@ -12,11 +13,16 @@ export default {
12
13
  description: { control: 'text' },
13
14
  hideFileList: { control: 'boolean' },
14
15
  attachFileList: { control: 'boolean' },
15
- disabled: { control: 'boolean' }
16
+ disabled: { control: 'boolean' },
17
+ theme: { control: 'select', options: ['light', 'dark'] }
16
18
  }
17
19
  };
18
- const Template = ({ label = 'select files', name = 'file', multiple = true, accept, icon, description, hideFileList = false, attachFileList = false, disabled }) => html `
19
- <link href="/themes/app-theme.css" rel="stylesheet" />
20
+ const Template = ({ label = 'select files', name = 'file', multiple = true, accept, icon, description, hideFileList = false, attachFileList = false, disabled, theme = 'light' }) => html `
21
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
22
+
23
+ <link href="/themes/light.css" rel="stylesheet" />
24
+ <link href="/themes/dark.css" rel="stylesheet" />
25
+ <link href="/themes/spacing.css" rel="stylesheet" />
20
26
 
21
27
  <link
22
28
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -30,23 +36,40 @@ const Template = ({ label = 'select files', name = 'file', multiple = true, acce
30
36
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
31
37
  rel="stylesheet"
32
38
  />
39
+
33
40
  <style>
34
- body {
41
+ ${MDTypeScaleStyles.cssText}
42
+ </style>
43
+
44
+ <style>
45
+ .container {
46
+ height: 500px;
47
+ text-align: center;
48
+ padding: 20px;
49
+
50
+ background-color: var(--md-sys-color-primary-container);
51
+ color: var(--md-sys-color-on-primary-container);
35
52
  }
36
53
  </style>
37
54
 
38
- <ox-input-file
39
- label=${label}
40
- name=${name}
41
- ?multiple=${multiple}
42
- ?hide-filelist=${hideFileList}
43
- ?attach-filelist=${attachFileList}
44
- accept=${accept}
45
- icon=${icon}
46
- description=${description}
47
- ?disabled=${disabled}
48
- >
49
- </ox-input-file>
55
+ <script>
56
+ document.body.classList.add('${theme}')
57
+ </script>
58
+
59
+ <div class="container md-typescale-body-large-prominent">
60
+ <ox-input-file
61
+ label=${label}
62
+ name=${name}
63
+ ?multiple=${multiple}
64
+ ?hide-filelist=${hideFileList}
65
+ ?attach-filelist=${attachFileList}
66
+ accept=${accept}
67
+ icon=${icon}
68
+ description=${description}
69
+ ?disabled=${disabled}
70
+ >
71
+ </ox-input-file>
72
+ </div>
50
73
  `;
51
74
  export const Regular = Template.bind({});
52
75
  Regular.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-file.stories.js","sourceRoot":"","sources":["../../stories/ox-input-file.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC3B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACpC,cAAc,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACtC,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAoBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,KAAK,GAAG,cAAc,EACtB,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,IAAI,EACf,MAAM,EACN,IAAI,EACJ,WAAW,EACX,YAAY,GAAG,KAAK,EACpB,cAAc,GAAG,KAAK,EACtB,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;YAqBR,KAAK;WACN,IAAI;gBACC,QAAQ;qBACH,YAAY;uBACV,cAAc;aACxB,MAAM;WACR,IAAI;kBACG,WAAW;gBACb,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kBAAkB;CAChC,CAAA","sourcesContent":["import '../src/ox-input-file.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-file',\n component: 'ox-input-file',\n argTypes: {\n name: { control: 'text' },\n multiple: { control: 'boolean' },\n accept: { control: 'text' },\n icon: { control: 'text' },\n label: { control: 'text' },\n description: { control: 'text' },\n hideFileList: { control: 'boolean' },\n attachFileList: { control: 'boolean' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n label?: string\n name?: string\n multiple?: boolean\n accept?: string\n icon?: string\n description?: string\n hideFileList?: boolean\n attachFileList?: boolean\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n label = 'select files',\n name = 'file',\n multiple = true,\n accept,\n icon,\n description,\n hideFileList = false,\n attachFileList = false,\n disabled\n}: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <style>\n body {\n }\n </style>\n\n <ox-input-file\n label=${label}\n name=${name}\n ?multiple=${multiple}\n ?hide-filelist=${hideFileList}\n ?attach-filelist=${attachFileList}\n accept=${accept}\n icon=${icon}\n description=${description}\n ?disabled=${disabled}\n >\n </ox-input-file>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'select files',\n name: 'files',\n multiple: true,\n hideFileList: false,\n attachFileList: false,\n accept: '*.*',\n icon: 'upload',\n description: 'drop files here!'\n}\n"]}
1
+ {"version":3,"file":"ox-input-file.stories.js","sourceRoot":"","sources":["../../stories/ox-input-file.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC3B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACpC,cAAc,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACtC,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAqBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,KAAK,GAAG,cAAc,EACtB,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,IAAI,EACf,MAAM,EACN,IAAI,EACJ,WAAW,EACX,YAAY,GAAG,KAAK,EACpB,cAAc,GAAG,KAAK,EACtB,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;cAK1B,KAAK;aACN,IAAI;kBACC,QAAQ;uBACH,YAAY;yBACV,cAAc;eACxB,MAAM;aACR,IAAI;oBACG,WAAW;kBACb,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kBAAkB;CAChC,CAAA","sourcesContent":["import '../src/ox-input-file.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-file',\n component: 'ox-input-file',\n argTypes: {\n name: { control: 'text' },\n multiple: { control: 'boolean' },\n accept: { control: 'text' },\n icon: { control: 'text' },\n label: { control: 'text' },\n description: { control: 'text' },\n hideFileList: { control: 'boolean' },\n attachFileList: { control: 'boolean' },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n label?: string\n name?: string\n multiple?: boolean\n accept?: string\n icon?: string\n description?: string\n hideFileList?: boolean\n attachFileList?: boolean\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n label = 'select files',\n name = 'file',\n multiple = true,\n accept,\n icon,\n description,\n hideFileList = false,\n attachFileList = false,\n disabled,\n theme = 'light'\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-file\n label=${label}\n name=${name}\n ?multiple=${multiple}\n ?hide-filelist=${hideFileList}\n ?attach-filelist=${attachFileList}\n accept=${accept}\n icon=${icon}\n description=${description}\n ?disabled=${disabled}\n >\n </ox-input-file>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'select files',\n name: 'files',\n multiple: true,\n hideFileList: false,\n attachFileList: false,\n accept: '*.*',\n icon: 'upload',\n description: 'drop files here!'\n}\n"]}
@@ -16,6 +16,10 @@ declare const _default: {
16
16
  disabled: {
17
17
  control: string;
18
18
  };
19
+ theme: {
20
+ control: string;
21
+ options: string[];
22
+ };
19
23
  };
20
24
  };
21
25
  export default _default;
@@ -29,5 +33,6 @@ interface ArgTypes {
29
33
  name?: string;
30
34
  value?: string[];
31
35
  disabled?: boolean;
36
+ theme?: string;
32
37
  }
33
38
  export declare const Regular: Story<ArgTypes>;
@@ -1,5 +1,6 @@
1
1
  import '../src/ox-input-hashtags.js';
2
2
  import { html } from 'lit';
3
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
3
4
  export default {
4
5
  title: 'ox-input-hashtags',
5
6
  component: 'ox-input-hashtags',
@@ -7,11 +8,16 @@ export default {
7
8
  placeholder: { control: 'text' },
8
9
  name: { control: 'text' },
9
10
  value: { control: 'array' },
10
- disabled: { control: 'boolean' }
11
+ disabled: { control: 'boolean' },
12
+ theme: { control: 'select', options: ['light', 'dark'] }
11
13
  }
12
14
  };
13
- const Template = ({ placeholder = 'hashtag', name = 'hello', value = [], disabled }) => html `
14
- <link href="/themes/app-theme.css" rel="stylesheet" />
15
+ const Template = ({ placeholder = 'hashtag', name = 'hello', value = [], disabled, theme = 'light' }) => html `
16
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
17
+
18
+ <link href="/themes/light.css" rel="stylesheet" />
19
+ <link href="/themes/dark.css" rel="stylesheet" />
20
+ <link href="/themes/spacing.css" rel="stylesheet" />
15
21
 
16
22
  <link
17
23
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -25,19 +31,36 @@ const Template = ({ placeholder = 'hashtag', name = 'hello', value = [], disable
25
31
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
26
32
  rel="stylesheet"
27
33
  />
34
+
28
35
  <style>
29
- body {
36
+ ${MDTypeScaleStyles.cssText}
37
+ </style>
38
+
39
+ <style>
40
+ .container {
41
+ height: 500px;
42
+ text-align: center;
43
+ padding: 20px;
44
+
45
+ background-color: var(--md-sys-color-primary-container);
46
+ color: var(--md-sys-color-on-primary-container);
30
47
  }
31
48
  </style>
32
49
 
33
- <ox-input-hashtags
34
- @change=${(e) => console.log('changed', e.target.value)}
35
- name=${name}
36
- placeholder=${placeholder}
37
- .value=${value}
38
- ?disabled=${disabled}
39
- >
40
- </ox-input-hashtags>
50
+ <script>
51
+ document.body.classList.add('${theme}')
52
+ </script>
53
+
54
+ <div class="container md-typescale-body-large-prominent">
55
+ <ox-input-hashtags
56
+ @change=${(e) => console.log('changed', e.target.value)}
57
+ name=${name}
58
+ placeholder=${placeholder}
59
+ .value=${value}
60
+ ?disabled=${disabled}
61
+ >
62
+ </ox-input-hashtags>
63
+ </div>
41
64
  `;
42
65
  export const Regular = Template.bind({});
43
66
  Regular.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-hashtags.stories.js","sourceRoot":"","sources":["../../stories/ox-input-hashtags.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;QAC3B,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,WAAW,GAAG,SAAS,EAAE,IAAI,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;cAqBzG,CAAC,CAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAG,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC;WAC7E,IAAI;kBACG,WAAW;aAChB,KAAK;gBACF,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;CACtB,CAAA","sourcesContent":["import '../src/ox-input-hashtags.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-hashtags',\n component: 'ox-input-hashtags',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'array' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n placeholder?: string\n name?: string\n value?: string[]\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({ placeholder = 'hashtag', name = 'hello', value = [], disabled }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <style>\n body {\n }\n </style>\n\n <ox-input-hashtags\n @change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}\n name=${name}\n placeholder=${placeholder}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-hashtags>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'hashtag',\n name: 'hashtag',\n value: ['abc', 'def']\n}\n"]}
1
+ {"version":3,"file":"ox-input-hashtags.stories.js","sourceRoot":"","sources":["../../stories/ox-input-hashtags.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;QAC3B,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,SAAS,EACvB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,EAAE,EACV,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;gBAKxB,CAAC,CAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAG,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC;aAC7E,IAAI;oBACG,WAAW;eAChB,KAAK;kBACF,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;CACtB,CAAA","sourcesContent":["import '../src/ox-input-hashtags.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-hashtags',\n component: 'ox-input-hashtags',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'array' },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n placeholder?: string\n name?: string\n value?: string[]\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'hashtag',\n name = 'hello',\n value = [],\n disabled,\n theme = 'light'\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-hashtags\n @change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}\n name=${name}\n placeholder=${placeholder}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-hashtags>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'hashtag',\n name: 'hashtag',\n value: ['abc', 'def']\n}\n"]}
@@ -13,6 +13,10 @@ declare const _default: {
13
13
  disabled: {
14
14
  control: string;
15
15
  };
16
+ theme: {
17
+ control: string;
18
+ options: string[];
19
+ };
16
20
  };
17
21
  };
18
22
  export default _default;
@@ -25,5 +29,6 @@ interface ArgTypes {
25
29
  name?: string;
26
30
  value?: object;
27
31
  disabled?: boolean;
32
+ theme?: string;
28
33
  }
29
34
  export declare const Regular: Story<ArgTypes>;