@operato/input 2.0.0-alpha.98 → 2.0.0-beta.0

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 (235) hide show
  1. package/CHANGELOG.md +254 -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/ox-buttons-radio.d.ts +9 -5
  7. package/dist/src/ox-buttons-radio.js +43 -11
  8. package/dist/src/ox-buttons-radio.js.map +1 -1
  9. package/dist/src/ox-checkbox.js +23 -19
  10. package/dist/src/ox-checkbox.js.map +1 -1
  11. package/dist/src/ox-input-3axis.js +12 -1
  12. package/dist/src/ox-input-3axis.js.map +1 -1
  13. package/dist/src/ox-input-3dish.js +16 -11
  14. package/dist/src/ox-input-3dish.js.map +1 -1
  15. package/dist/src/ox-input-angle.js +8 -1
  16. package/dist/src/ox-input-angle.js.map +1 -1
  17. package/dist/src/ox-input-barcode.js +11 -8
  18. package/dist/src/ox-input-barcode.js.map +1 -1
  19. package/dist/src/ox-input-code.js +3 -0
  20. package/dist/src/ox-input-code.js.map +1 -1
  21. package/dist/src/ox-input-color.js +8 -6
  22. package/dist/src/ox-input-color.js.map +1 -1
  23. package/dist/src/ox-input-crontab.js +29 -25
  24. package/dist/src/ox-input-crontab.js.map +1 -1
  25. package/dist/src/ox-input-data.js +15 -6
  26. package/dist/src/ox-input-data.js.map +1 -1
  27. package/dist/src/ox-input-duration.js +15 -34
  28. package/dist/src/ox-input-duration.js.map +1 -1
  29. package/dist/src/ox-input-file.js +18 -14
  30. package/dist/src/ox-input-file.js.map +1 -1
  31. package/dist/src/ox-input-hashtags.js +13 -14
  32. package/dist/src/ox-input-hashtags.js.map +1 -1
  33. package/dist/src/ox-input-i18n-label.js +4 -4
  34. package/dist/src/ox-input-i18n-label.js.map +1 -1
  35. package/dist/src/ox-input-image.js +2 -2
  36. package/dist/src/ox-input-image.js.map +1 -1
  37. package/dist/src/ox-input-key-values.js +6 -6
  38. package/dist/src/ox-input-key-values.js.map +1 -1
  39. package/dist/src/ox-input-mass-fraction.js +5 -5
  40. package/dist/src/ox-input-mass-fraction.js.map +1 -1
  41. package/dist/src/ox-input-multiple-colors.js +2 -2
  42. package/dist/src/ox-input-multiple-colors.js.map +1 -1
  43. package/dist/src/ox-input-options.js +6 -6
  44. package/dist/src/ox-input-options.js.map +1 -1
  45. package/dist/src/ox-input-partition-keys.js +6 -6
  46. package/dist/src/ox-input-partition-keys.js.map +1 -1
  47. package/dist/src/ox-input-privilege.js +13 -16
  48. package/dist/src/ox-input-privilege.js.map +1 -1
  49. package/dist/src/ox-input-quantifier.js +5 -5
  50. package/dist/src/ox-input-quantifier.js.map +1 -1
  51. package/dist/src/ox-input-range.js +8 -8
  52. package/dist/src/ox-input-range.js.map +1 -1
  53. package/dist/src/ox-input-search.js +5 -6
  54. package/dist/src/ox-input-search.js.map +1 -1
  55. package/dist/src/ox-input-select-buttons.d.ts +2 -0
  56. package/dist/src/ox-input-select-buttons.js +14 -21
  57. package/dist/src/ox-input-select-buttons.js.map +1 -1
  58. package/dist/src/ox-input-table.js +1 -1
  59. package/dist/src/ox-input-table.js.map +1 -1
  60. package/dist/src/ox-input-unit-number.js +5 -5
  61. package/dist/src/ox-input-unit-number.js.map +1 -1
  62. package/dist/src/ox-input-value-map.js +9 -13
  63. package/dist/src/ox-input-value-map.js.map +1 -1
  64. package/dist/src/ox-input-value-ranges.js +7 -7
  65. package/dist/src/ox-input-value-ranges.js.map +1 -1
  66. package/dist/src/ox-input-work-shift.js +7 -7
  67. package/dist/src/ox-input-work-shift.js.map +1 -1
  68. package/dist/src/ox-select.d.ts +9 -1
  69. package/dist/src/ox-select.js +51 -17
  70. package/dist/src/ox-select.js.map +1 -1
  71. package/dist/src/ox-zoomable-image.d.ts +17 -0
  72. package/dist/src/ox-zoomable-image.js +80 -0
  73. package/dist/src/ox-zoomable-image.js.map +1 -0
  74. package/dist/stories/ox-buttons-radio.stories.d.ts +31 -0
  75. package/dist/stories/ox-buttons-radio.stories.js +81 -0
  76. package/dist/stories/ox-buttons-radio.stories.js.map +1 -0
  77. package/dist/stories/ox-checkbox.stories.d.ts +6 -0
  78. package/dist/stories/ox-checkbox.stories.js +57 -13
  79. package/dist/stories/ox-checkbox.stories.js.map +1 -1
  80. package/dist/stories/ox-input-3axis.stories.d.ts +5 -0
  81. package/dist/stories/ox-input-3axis.stories.js +32 -10
  82. package/dist/stories/ox-input-3axis.stories.js.map +1 -1
  83. package/dist/stories/ox-input-3dish.stories.d.ts +5 -0
  84. package/dist/stories/ox-input-3dish.stories.js +35 -13
  85. package/dist/stories/ox-input-3dish.stories.js.map +1 -1
  86. package/dist/stories/ox-input-angle.stories.d.ts +5 -0
  87. package/dist/stories/ox-input-angle.stories.js +36 -13
  88. package/dist/stories/ox-input-angle.stories.js.map +1 -1
  89. package/dist/stories/ox-input-barcode.stories.d.ts +5 -0
  90. package/dist/stories/ox-input-barcode.stories.js +35 -18
  91. package/dist/stories/ox-input-barcode.stories.js.map +1 -1
  92. package/dist/stories/ox-input-code.stories.d.ts +5 -0
  93. package/dist/stories/ox-input-code.stories.js +38 -13
  94. package/dist/stories/ox-input-code.stories.js.map +1 -1
  95. package/dist/stories/ox-input-crontab.stories.d.ts +5 -0
  96. package/dist/stories/ox-input-crontab.stories.js +35 -12
  97. package/dist/stories/ox-input-crontab.stories.js.map +1 -1
  98. package/dist/stories/ox-input-data.stories.d.ts +5 -0
  99. package/dist/stories/ox-input-data.stories.js +34 -11
  100. package/dist/stories/ox-input-data.stories.js.map +1 -1
  101. package/dist/stories/ox-input-duration.stories.d.ts +5 -0
  102. package/dist/stories/ox-input-duration.stories.js +36 -13
  103. package/dist/stories/ox-input-duration.stories.js.map +1 -1
  104. package/dist/stories/ox-input-file.stories.d.ts +5 -0
  105. package/dist/stories/ox-input-file.stories.js +39 -16
  106. package/dist/stories/ox-input-file.stories.js.map +1 -1
  107. package/dist/stories/ox-input-hashtags.stories.d.ts +5 -0
  108. package/dist/stories/ox-input-hashtags.stories.js +35 -12
  109. package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
  110. package/dist/stories/ox-input-i18n-label.stories.d.ts +5 -0
  111. package/dist/stories/ox-input-i18n-label.stories.js +35 -12
  112. package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
  113. package/dist/stories/ox-input-key-values.stories.d.ts +5 -0
  114. package/dist/stories/ox-input-key-values.stories.js +35 -12
  115. package/dist/stories/ox-input-key-values.stories.js.map +1 -1
  116. package/dist/stories/ox-input-mass-fraction.stories.d.ts +5 -0
  117. package/dist/stories/ox-input-mass-fraction.stories.js +36 -13
  118. package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
  119. package/dist/stories/ox-input-multiple-colors.stories.d.ts +5 -0
  120. package/dist/stories/ox-input-multiple-colors.stories.js +31 -149
  121. package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
  122. package/dist/stories/ox-input-options.stories.d.ts +5 -0
  123. package/dist/stories/ox-input-options.stories.js +34 -11
  124. package/dist/stories/ox-input-options.stories.js.map +1 -1
  125. package/dist/stories/ox-input-partition-keys.stories.d.ts +5 -0
  126. package/dist/stories/ox-input-partition-keys.stories.js +34 -11
  127. package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
  128. package/dist/stories/ox-input-privilege.stories.d.ts +5 -0
  129. package/dist/stories/ox-input-privilege.stories.js +36 -18
  130. package/dist/stories/ox-input-privilege.stories.js.map +1 -1
  131. package/dist/stories/ox-input-quantifier.stories.d.ts +5 -0
  132. package/dist/stories/ox-input-quantifier.stories.js +37 -10
  133. package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
  134. package/dist/stories/ox-input-range.stories.d.ts +5 -0
  135. package/dist/stories/ox-input-range.stories.js +32 -5
  136. package/dist/stories/ox-input-range.stories.js.map +1 -1
  137. package/dist/stories/ox-input-search.stories.d.ts +5 -0
  138. package/dist/stories/ox-input-search.stories.js +35 -12
  139. package/dist/stories/ox-input-search.stories.js.map +1 -1
  140. package/dist/stories/ox-input-select-buttons.stories.d.ts +5 -0
  141. package/dist/stories/ox-input-select-buttons.stories.js +36 -14
  142. package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
  143. package/dist/stories/ox-input-unit.stories.d.ts +5 -0
  144. package/dist/stories/ox-input-unit.stories.js +40 -13
  145. package/dist/stories/ox-input-unit.stories.js.map +1 -1
  146. package/dist/stories/ox-input-value-map.stories.d.ts +5 -0
  147. package/dist/stories/ox-input-value-map.stories.js +36 -13
  148. package/dist/stories/ox-input-value-map.stories.js.map +1 -1
  149. package/dist/stories/ox-input-value-ranges.stories.d.ts +5 -0
  150. package/dist/stories/ox-input-value-ranges.stories.js +36 -13
  151. package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
  152. package/dist/stories/ox-input-work-shift.stories.d.ts +5 -0
  153. package/dist/stories/ox-input-work-shift.stories.js +36 -13
  154. package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
  155. package/dist/stories/ox-select-set-options.stories.d.ts +53 -0
  156. package/dist/stories/ox-select-set-options.stories.js +183 -0
  157. package/dist/stories/ox-select-set-options.stories.js.map +1 -0
  158. package/dist/stories/ox-select.stories.d.ts +5 -0
  159. package/dist/stories/ox-select.stories.js +33 -7
  160. package/dist/stories/ox-select.stories.js.map +1 -1
  161. package/dist/tsconfig.tsbuildinfo +1 -1
  162. package/package.json +7 -7
  163. package/src/ox-buttons-radio.ts +37 -5
  164. package/src/ox-checkbox.ts +23 -19
  165. package/src/ox-input-3axis.ts +12 -1
  166. package/src/ox-input-3dish.ts +16 -11
  167. package/src/ox-input-angle.ts +8 -1
  168. package/src/ox-input-barcode.ts +11 -8
  169. package/src/ox-input-code.ts +3 -0
  170. package/src/ox-input-color.ts +8 -6
  171. package/src/ox-input-crontab.ts +29 -25
  172. package/src/ox-input-data.ts +15 -6
  173. package/src/ox-input-duration.ts +15 -34
  174. package/src/ox-input-file.ts +18 -14
  175. package/src/ox-input-hashtags.ts +14 -16
  176. package/src/ox-input-i18n-label.ts +4 -4
  177. package/src/ox-input-image.ts +2 -2
  178. package/src/ox-input-key-values.ts +6 -6
  179. package/src/ox-input-mass-fraction.ts +5 -5
  180. package/src/ox-input-multiple-colors.ts +2 -2
  181. package/src/ox-input-options.ts +6 -6
  182. package/src/ox-input-partition-keys.ts +6 -6
  183. package/src/ox-input-privilege.ts +13 -16
  184. package/src/ox-input-quantifier.ts +5 -5
  185. package/src/ox-input-range.ts +8 -8
  186. package/src/ox-input-search.ts +5 -6
  187. package/src/ox-input-select-buttons.ts +19 -24
  188. package/src/ox-input-table.ts +1 -1
  189. package/src/ox-input-unit-number.ts +5 -5
  190. package/src/ox-input-value-map.ts +9 -13
  191. package/src/ox-input-value-ranges.ts +7 -7
  192. package/src/ox-input-work-shift.ts +7 -7
  193. package/src/ox-select.ts +60 -13
  194. package/src/ox-zoomable-image.ts +75 -0
  195. package/stories/ox-buttons-radio.stories.ts +96 -0
  196. package/stories/ox-checkbox.stories.ts +61 -14
  197. package/stories/ox-input-3axis.stories.ts +35 -12
  198. package/stories/ox-input-3dish.stories.ts +38 -15
  199. package/stories/ox-input-angle.stories.ts +39 -15
  200. package/stories/ox-input-barcode.stories.ts +37 -18
  201. package/stories/ox-input-code.stories.ts +42 -15
  202. package/stories/ox-input-crontab.stories.ts +43 -14
  203. package/stories/ox-input-data.stories.ts +38 -14
  204. package/stories/ox-input-duration.stories.ts +39 -15
  205. package/stories/ox-input-file.stories.ts +41 -16
  206. package/stories/ox-input-hashtags.stories.ts +42 -12
  207. package/stories/ox-input-i18n-label.stories.ts +55 -31
  208. package/stories/ox-input-key-values.stories.ts +44 -14
  209. package/stories/ox-input-mass-fraction.stories.ts +40 -15
  210. package/stories/ox-input-multiple-colors.stories.ts +34 -151
  211. package/stories/ox-input-options.stories.ts +37 -13
  212. package/stories/ox-input-partition-keys.stories.ts +42 -13
  213. package/stories/ox-input-privilege.stories.ts +45 -20
  214. package/stories/ox-input-quantifier.stories.ts +38 -10
  215. package/stories/ox-input-range.stories.ts +34 -5
  216. package/stories/ox-input-search.stories.ts +37 -12
  217. package/stories/ox-input-select-buttons.stories.ts +40 -16
  218. package/stories/ox-input-unit.stories.ts +43 -14
  219. package/stories/ox-input-value-map.stories.ts +40 -15
  220. package/stories/ox-input-value-ranges.stories.ts +40 -15
  221. package/stories/ox-input-work-shift.stories.ts +39 -15
  222. package/stories/ox-select-set-options.stories.ts +215 -0
  223. package/stories/ox-select.stories.ts +37 -7
  224. package/themes/dark-hc.css +151 -0
  225. package/themes/dark-mc.css +151 -0
  226. package/themes/dark.css +151 -0
  227. package/themes/grist-theme.css +169 -0
  228. package/themes/light-hc.css +151 -0
  229. package/themes/light-mc.css +151 -0
  230. package/themes/light.css +151 -0
  231. package/themes/md-typescale-styles.css +100 -0
  232. package/themes/spacing.css +43 -0
  233. package/themes/state-color.css +6 -0
  234. package/themes/app-theme.css +0 -145
  235. package/themes/input-theme.css +0 -32
@@ -1,5 +1,6 @@
1
1
  import '../src/ox-input-unit-number.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-unit-number',
5
6
  component: 'ox-input-unit-number',
@@ -39,10 +40,17 @@ export default {
39
40
  'K'
40
41
  ]
41
42
  },
42
- disabled: { control: 'boolean' }
43
+ disabled: { control: 'boolean' },
44
+ theme: { control: 'select', options: ['light', 'dark'] }
43
45
  }
44
46
  };
45
- const Template = ({ placeholder = 'unit', name = 'hello', value = 0, stdUnit = 'kg', userUnit, disabled }) => html `
47
+ const Template = ({ placeholder = 'unit', name = 'hello', value = 0, stdUnit = 'kg', userUnit, disabled, theme = 'light' }) => html `
48
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
49
+
50
+ <link href="/themes/light.css" rel="stylesheet" />
51
+ <link href="/themes/dark.css" rel="stylesheet" />
52
+ <link href="/themes/spacing.css" rel="stylesheet" />
53
+
46
54
  <link
47
55
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
48
56
  rel="stylesheet"
@@ -56,18 +64,37 @@ const Template = ({ placeholder = 'unit', name = 'hello', value = 0, stdUnit = '
56
64
  rel="stylesheet"
57
65
  />
58
66
 
59
- <link href="/themes/app-theme.css" rel="stylesheet" />
67
+ <style>
68
+ ${MDTypeScaleStyles.cssText}
69
+ </style>
70
+
71
+ <style>
72
+ .container {
73
+ height: 500px;
74
+ text-align: center;
75
+ padding: 20px;
76
+
77
+ background-color: var(--md-sys-color-primary-container);
78
+ color: var(--md-sys-color-on-primary-container);
79
+ }
80
+ </style>
81
+
82
+ <script>
83
+ document.body.classList.add('${theme}')
84
+ </script>
60
85
 
61
- <ox-input-unit-number
62
- name=${name}
63
- placeholder=${placeholder}
64
- .value=${value}
65
- std-unit=${stdUnit}
66
- user-unit=${userUnit}
67
- @change=${(e) => console.log(e.detail)}
68
- ?disabled=${disabled}
69
- >
70
- </ox-input-unit-number>
86
+ <div class="container md-typescale-body-large-prominent">
87
+ <ox-input-unit-number
88
+ name=${name}
89
+ placeholder=${placeholder}
90
+ .value=${value}
91
+ std-unit=${stdUnit}
92
+ user-unit=${userUnit}
93
+ @change=${(e) => console.log(e.detail)}
94
+ ?disabled=${disabled}
95
+ >
96
+ </ox-input-unit-number>
97
+ </div>
71
98
  `;
72
99
  export const Weight = Template.bind({});
73
100
  Weight.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-unit.stories.js","sourceRoot":"","sources":["../../stories/ox-input-unit.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,sBAAsB;IACjC,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,IAAI;gBACJ,KAAK;gBACL,GAAG;gBACH,OAAO;gBACP,IAAI;gBACJ,IAAI;gBACJ,OAAO;gBACP,OAAO;gBACP,GAAG;gBACH,IAAI;gBACJ,QAAQ;gBACR,WAAW;gBACX,SAAS;gBACT,YAAY;gBACZ,SAAS;gBACT,SAAS;gBACT,GAAG;gBACH,GAAG;gBACH,MAAM;gBACN,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,QAAQ;gBACR,UAAU;gBACV,SAAS;gBACT,GAAG;gBACH,GAAG;aACJ;SACF;QACD,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,MAAM,EACpB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,CAAC,EACT,OAAO,GAAG,IAAI,EACd,QAAQ,EACR,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;WAiBT,IAAI;kBACG,WAAW;aAChB,KAAK;eACH,OAAO;gBACN,QAAQ;cACV,CAAC,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;gBACvC,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACvC,MAAM,CAAC,IAAI,GAAG;IACZ,WAAW,EAAE,QAAQ;IACrB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,IAAI;CACd,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACtC,KAAK,CAAC,IAAI,GAAG;IACX,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,KAAK;CACf,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,IAAI;CACf,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC3C,UAAU,CAAC,IAAI,GAAG;IAChB,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;CACb,CAAA","sourcesContent":["import '../src/ox-input-unit-number.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-unit-number',\n component: 'ox-input-unit-number',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'number' },\n stdUnit: {\n control: 'select',\n options: [\n 'kg',\n 'rad',\n 'm',\n 'g/mol',\n 'm2',\n 'm3',\n 'kg/m3',\n 'm/sec',\n 'N',\n 'Pa',\n 'kg/sec',\n 'kg/m2/sec',\n 'mol/sec',\n 'mol/m2/sec',\n 'Sm3/sec',\n 'Nm3/sec',\n 'J',\n 'W',\n 'W/m2',\n 'J/kg',\n 'J/kg/K',\n 'W/m/K',\n 'W/m2/K',\n 'N sec/m2',\n 'm2 oC/W',\n '%',\n 'K'\n ]\n },\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?: number\n stdUnit: string\n userUnit: string\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'unit',\n name = 'hello',\n value = 0,\n stdUnit = 'kg',\n userUnit,\n disabled\n}: ArgTypes) => html`\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 <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n\n <ox-input-unit-number\n name=${name}\n placeholder=${placeholder}\n .value=${value}\n std-unit=${stdUnit}\n user-unit=${userUnit}\n @change=${(e: CustomEvent) => console.log(e.detail)}\n ?disabled=${disabled}\n >\n </ox-input-unit-number>\n`\n\nexport const Weight = Template.bind({})\nWeight.args = {\n placeholder: 'weight',\n name: 'weight',\n value: 0,\n stdUnit: 'kg'\n}\n\nexport const Angle = Template.bind({})\nAngle.args = {\n placeholder: 'angle',\n name: 'angle',\n value: 0,\n stdUnit: 'rad'\n}\n\nexport const Temperature = Template.bind({})\nTemperature.args = {\n placeholder: 'temperature',\n name: 'temperature',\n value: 0,\n stdUnit: 'K',\n userUnit: '°C'\n}\n\nexport const Percentage = Template.bind({})\nPercentage.args = {\n placeholder: 'percentage',\n name: 'percentage',\n value: 0,\n stdUnit: '%'\n}\n"]}
1
+ {"version":3,"file":"ox-input-unit.stories.js","sourceRoot":"","sources":["../../stories/ox-input-unit.stories.ts"],"names":[],"mappings":"AAAA,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,sBAAsB;IAC7B,SAAS,EAAE,sBAAsB;IACjC,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,IAAI;gBACJ,KAAK;gBACL,GAAG;gBACH,OAAO;gBACP,IAAI;gBACJ,IAAI;gBACJ,OAAO;gBACP,OAAO;gBACP,GAAG;gBACH,IAAI;gBACJ,QAAQ;gBACR,WAAW;gBACX,SAAS;gBACT,YAAY;gBACZ,SAAS;gBACT,SAAS;gBACT,GAAG;gBACH,GAAG;gBACH,MAAM;gBACN,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,QAAQ;gBACR,UAAU;gBACV,SAAS;gBACT,GAAG;gBACH,GAAG;aACJ;SACF;QACD,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;AAkBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,MAAM,EACpB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,CAAC,EACT,OAAO,GAAG,IAAI,EACd,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;aAK3B,IAAI;oBACG,WAAW;eAChB,KAAK;iBACH,OAAO;kBACN,QAAQ;gBACV,CAAC,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;kBACvC,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACvC,MAAM,CAAC,IAAI,GAAG;IACZ,WAAW,EAAE,QAAQ;IACrB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,IAAI;CACd,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACtC,KAAK,CAAC,IAAI,GAAG;IACX,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,KAAK;CACf,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,IAAI;CACf,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC3C,UAAU,CAAC,IAAI,GAAG;IAChB,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;CACb,CAAA","sourcesContent":["import '../src/ox-input-unit-number.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-unit-number',\n component: 'ox-input-unit-number',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'number' },\n stdUnit: {\n control: 'select',\n options: [\n 'kg',\n 'rad',\n 'm',\n 'g/mol',\n 'm2',\n 'm3',\n 'kg/m3',\n 'm/sec',\n 'N',\n 'Pa',\n 'kg/sec',\n 'kg/m2/sec',\n 'mol/sec',\n 'mol/m2/sec',\n 'Sm3/sec',\n 'Nm3/sec',\n 'J',\n 'W',\n 'W/m2',\n 'J/kg',\n 'J/kg/K',\n 'W/m/K',\n 'W/m2/K',\n 'N sec/m2',\n 'm2 oC/W',\n '%',\n 'K'\n ]\n },\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?: number\n stdUnit: string\n userUnit: string\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'unit',\n name = 'hello',\n value = 0,\n stdUnit = 'kg',\n userUnit,\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-unit-number\n name=${name}\n placeholder=${placeholder}\n .value=${value}\n std-unit=${stdUnit}\n user-unit=${userUnit}\n @change=${(e: CustomEvent) => console.log(e.detail)}\n ?disabled=${disabled}\n >\n </ox-input-unit-number>\n </div>\n`\n\nexport const Weight = Template.bind({})\nWeight.args = {\n placeholder: 'weight',\n name: 'weight',\n value: 0,\n stdUnit: 'kg'\n}\n\nexport const Angle = Template.bind({})\nAngle.args = {\n placeholder: 'angle',\n name: 'angle',\n value: 0,\n stdUnit: 'rad'\n}\n\nexport const Temperature = Template.bind({})\nTemperature.args = {\n placeholder: 'temperature',\n name: 'temperature',\n value: 0,\n stdUnit: 'K',\n userUnit: '°C'\n}\n\nexport const Percentage = Template.bind({})\nPercentage.args = {\n placeholder: 'percentage',\n name: 'percentage',\n value: 0,\n stdUnit: '%'\n}\n"]}
@@ -21,6 +21,10 @@ declare const _default: {
21
21
  disabled: {
22
22
  control: string;
23
23
  };
24
+ theme: {
25
+ control: string;
26
+ options: string[];
27
+ };
24
28
  };
25
29
  };
26
30
  export default _default;
@@ -35,5 +39,6 @@ interface ArgTypes {
35
39
  valuetype?: string;
36
40
  keytype?: string;
37
41
  disabled?: boolean;
42
+ theme?: string;
38
43
  }
39
44
  export declare const Regular: Story<ArgTypes>;
@@ -1,5 +1,6 @@
1
1
  import '../src/ox-input-value-map.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-value-map',
5
6
  component: 'ox-input-value-map',
@@ -8,11 +9,16 @@ export default {
8
9
  value: { control: 'object' },
9
10
  keytype: { control: 'select', options: ['string', 'number'] },
10
11
  valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
11
- disabled: { control: 'boolean' }
12
+ disabled: { control: 'boolean' },
13
+ theme: { control: 'select', options: ['light', 'dark'] }
12
14
  }
13
15
  };
14
- const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled }) => html `
15
- <link href="/themes/app-theme.css" rel="stylesheet" />
16
+ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled, theme = 'light' }) => html `
17
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
18
+
19
+ <link href="/themes/light.css" rel="stylesheet" />
20
+ <link href="/themes/dark.css" rel="stylesheet" />
21
+ <link href="/themes/spacing.css" rel="stylesheet" />
16
22
 
17
23
  <link
18
24
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -26,22 +32,39 @@ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype =
26
32
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
27
33
  rel="stylesheet"
28
34
  />
35
+
29
36
  <style>
30
- body {
37
+ ${MDTypeScaleStyles.cssText}
38
+ </style>
39
+
40
+ <style>
41
+ .container {
42
+ height: 500px;
43
+ text-align: center;
44
+ padding: 20px;
45
+
46
+ background-color: var(--md-sys-color-primary-container);
47
+ color: var(--md-sys-color-on-primary-container);
31
48
  }
32
49
  </style>
33
50
 
34
- <ox-input-value-map
35
- @change=${(e) => {
51
+ <script>
52
+ document.body.classList.add('${theme}')
53
+ </script>
54
+
55
+ <div class="container md-typescale-body-large-prominent">
56
+ <ox-input-value-map
57
+ @change=${(e) => {
36
58
  console.log(e.target.value);
37
59
  }}
38
- name=${name}
39
- .value=${value}
40
- keytype=${keytype}
41
- valuetype=${valuetype}
42
- ?disabled=${disabled}
43
- >
44
- </ox-input-value-map>
60
+ name=${name}
61
+ .value=${value}
62
+ keytype=${keytype}
63
+ valuetype=${valuetype}
64
+ ?disabled=${disabled}
65
+ >
66
+ </ox-input-value-map>
67
+ </div>
45
68
  `;
46
69
  export const Regular = Template.bind({});
47
70
  Regular.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-value-map.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-map.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAC3F,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,QAAQ,EAClB,SAAS,GAAG,QAAQ,EACpB,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;cAqBN,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;cACJ,OAAO;gBACL,SAAS;gBACT,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-value-map.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-value-map',\n component: 'ox-input-value-map',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n keytype: { control: 'select', options: ['string', 'number'] },\n valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },\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?: object\n valuetype?: string\n keytype?: string\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'values',\n value = {},\n keytype = 'string',\n valuetype = 'string',\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-value-map\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n keytype=${keytype}\n valuetype=${valuetype}\n ?disabled=${disabled}\n >\n </ox-input-value-map>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
1
+ {"version":3,"file":"ox-input-value-map.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-map.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,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAC3F,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;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,QAAQ,EAClB,SAAS,GAAG,QAAQ,EACpB,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,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;gBACJ,OAAO;kBACL,SAAS;kBACT,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-value-map.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-value-map',\n component: 'ox-input-value-map',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n keytype: { control: 'select', options: ['string', 'number'] },\n valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },\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\n valuetype?: string\n keytype?: string\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'values',\n value = {},\n keytype = 'string',\n valuetype = 'string',\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-value-map\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n keytype=${keytype}\n valuetype=${valuetype}\n ?disabled=${disabled}\n >\n </ox-input-value-map>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
@@ -21,6 +21,10 @@ declare const _default: {
21
21
  disabled: {
22
22
  control: string;
23
23
  };
24
+ theme: {
25
+ control: string;
26
+ options: string[];
27
+ };
24
28
  };
25
29
  };
26
30
  export default _default;
@@ -35,5 +39,6 @@ interface ArgTypes {
35
39
  valuetype?: string;
36
40
  keytype?: string;
37
41
  disabled?: boolean;
42
+ theme?: string;
38
43
  }
39
44
  export declare const Regular: Story<ArgTypes>;
@@ -1,5 +1,6 @@
1
1
  import '../src/ox-input-value-ranges.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-value-ranges',
5
6
  component: 'ox-input-value-ranges',
@@ -8,11 +9,16 @@ export default {
8
9
  value: { control: 'object' },
9
10
  keytype: { control: 'select', options: ['string', 'number'] },
10
11
  valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
11
- disabled: { control: 'boolean' }
12
+ disabled: { control: 'boolean' },
13
+ theme: { control: 'select', options: ['light', 'dark'] }
12
14
  }
13
15
  };
14
- const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled }) => html `
15
- <link href="/themes/app-theme.css" rel="stylesheet" />
16
+ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled, theme = 'light' }) => html `
17
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
18
+
19
+ <link href="/themes/light.css" rel="stylesheet" />
20
+ <link href="/themes/dark.css" rel="stylesheet" />
21
+ <link href="/themes/spacing.css" rel="stylesheet" />
16
22
 
17
23
  <link
18
24
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -26,22 +32,39 @@ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype =
26
32
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
27
33
  rel="stylesheet"
28
34
  />
35
+
29
36
  <style>
30
- body {
37
+ ${MDTypeScaleStyles.cssText}
38
+ </style>
39
+
40
+ <style>
41
+ .container {
42
+ height: 500px;
43
+ text-align: center;
44
+ padding: 20px;
45
+
46
+ background-color: var(--md-sys-color-primary-container);
47
+ color: var(--md-sys-color-on-primary-container);
31
48
  }
32
49
  </style>
33
50
 
34
- <ox-input-value-ranges
35
- @change=${(e) => {
51
+ <script>
52
+ document.body.classList.add('${theme}')
53
+ </script>
54
+
55
+ <div class="container md-typescale-body-large-prominent">
56
+ <ox-input-value-ranges
57
+ @change=${(e) => {
36
58
  console.log(e.target.value);
37
59
  }}
38
- name=${name}
39
- .value=${value}
40
- keytype=${keytype}
41
- valuetype=${valuetype}
42
- ?disabled=${disabled}
43
- >
44
- </ox-input-value-ranges>
60
+ name=${name}
61
+ .value=${value}
62
+ keytype=${keytype}
63
+ valuetype=${valuetype}
64
+ ?disabled=${disabled}
65
+ >
66
+ </ox-input-value-ranges>
67
+ </div>
45
68
  `;
46
69
  export const Regular = Template.bind({});
47
70
  Regular.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-value-ranges.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-ranges.stories.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,uBAAuB;IAClC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAC3F,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,QAAQ,EAClB,SAAS,GAAG,QAAQ,EACpB,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;cAqBN,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;cACJ,OAAO;gBACL,SAAS;gBACT,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-value-ranges.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-value-ranges',\n component: 'ox-input-value-ranges',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n keytype: { control: 'select', options: ['string', 'number'] },\n valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },\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?: object\n valuetype?: string\n keytype?: string\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'values',\n value = {},\n keytype = 'string',\n valuetype = 'string',\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-value-ranges\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n keytype=${keytype}\n valuetype=${valuetype}\n ?disabled=${disabled}\n >\n </ox-input-value-ranges>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
1
+ {"version":3,"file":"ox-input-value-ranges.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-ranges.stories.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,uBAAuB;IAClC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAC3F,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;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,QAAQ,EAClB,SAAS,GAAG,QAAQ,EACpB,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,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;gBACJ,OAAO;kBACL,SAAS;kBACT,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-value-ranges.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-value-ranges',\n component: 'ox-input-value-ranges',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n keytype: { control: 'select', options: ['string', 'number'] },\n valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },\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\n valuetype?: string\n keytype?: string\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'values',\n value = {},\n keytype = 'string',\n valuetype = 'string',\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-value-ranges\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n keytype=${keytype}\n valuetype=${valuetype}\n ?disabled=${disabled}\n >\n </ox-input-value-ranges>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\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?: object;
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-work-shift.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-work-shift',
6
7
  component: 'ox-input-work-shift',
7
8
  argTypes: {
8
9
  value: { control: 'object' },
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 = 'work-shift', value = [], disabled }) => html `
14
- <link href="/themes/app-theme.css" rel="stylesheet" />
15
+ const Template = ({ name = 'work-shift', 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,23 +31,40 @@ const Template = ({ name = 'work-shift', value = [], 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-work-shift
37
- @change=${(e) => {
58
+ <ox-input-work-shift
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-work-shift>
62
+ name=${name}
63
+ .value=${value}
64
+ ?disabled=${disabled}
65
+ >
66
+ </ox-input-work-shift>
67
+ </div>
45
68
  `;
46
69
  export const Regular = Template.bind({});
47
70
  Regular.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-work-shift.stories.js","sourceRoot":"","sources":["../../stories/ox-input-work-shift.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AACtC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,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,YAAY,EAAE,KAAK,GAAG,EAAE,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,YAAY;IAClB,KAAK,EAAE;QACL;YACE,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,CAAC,CAAC;YACZ,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-input-work-shift.js'\nimport '../src/locale/locale-picker.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-work-shift',\n component: 'ox-input-work-shift',\n argTypes: {\n value: { control: 'object' },\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?: object\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'work-shift', 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 <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-work-shift\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-work-shift>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'work-shift',\n value: [\n {\n name: 'DAY',\n fromDate: -1,\n fromTime: '22:00',\n toDate: 0,\n toTime: '06:00'\n },\n {\n name: 'SWING',\n fromDate: 0,\n fromTime: '06:00',\n toDate: 0,\n toTime: '14:00'\n },\n {\n name: 'NIGHT',\n fromDate: 0,\n fromTime: '14:00',\n toDate: 0,\n toTime: '22:00'\n }\n ]\n}\n"]}
1
+ {"version":3,"file":"ox-input-work-shift.stories.js","sourceRoot":"","sources":["../../stories/ox-input-work-shift.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AACtC,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,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,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,YAAY,EAAE,KAAK,GAAG,EAAE,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,YAAY;IAClB,KAAK,EAAE;QACL;YACE,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,CAAC,CAAC;YACZ,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-input-work-shift.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-work-shift',\n component: 'ox-input-work-shift',\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\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'work-shift', 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 md-typescale-body-large-prominent\">\n <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-work-shift\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-work-shift>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'work-shift',\n value: [\n {\n name: 'DAY',\n fromDate: -1,\n fromTime: '22:00',\n toDate: 0,\n toTime: '06:00'\n },\n {\n name: 'SWING',\n fromDate: 0,\n fromTime: '06:00',\n toDate: 0,\n toTime: '14:00'\n },\n {\n name: 'NIGHT',\n fromDate: 0,\n fromTime: '14:00',\n toDate: 0,\n toTime: '22:00'\n }\n ]\n}\n"]}
@@ -0,0 +1,53 @@
1
+ import '../src/ox-select.js';
2
+ import '../src/ox-checkbox.js';
3
+ import { TemplateResult } from 'lit';
4
+ declare const _default: {
5
+ title: string;
6
+ component: string;
7
+ argTypes: {
8
+ placeholder: {
9
+ control: string;
10
+ };
11
+ name: {
12
+ control: string;
13
+ };
14
+ options: {
15
+ control: string;
16
+ };
17
+ multiple: {
18
+ control: string;
19
+ };
20
+ withSearch: {
21
+ control: string;
22
+ };
23
+ disabled: {
24
+ control: string;
25
+ };
26
+ theme: {
27
+ control: string;
28
+ options: string[];
29
+ };
30
+ };
31
+ };
32
+ export default _default;
33
+ interface Story<T> {
34
+ (args: T): TemplateResult;
35
+ args?: Partial<T>;
36
+ argTypes?: Record<string, unknown>;
37
+ }
38
+ interface ArgTypes {
39
+ placeholder?: string;
40
+ name?: string;
41
+ value?: object | string;
42
+ options?: string[] | {
43
+ display: string;
44
+ value: string;
45
+ }[];
46
+ multiple?: boolean;
47
+ withSearch?: boolean;
48
+ disabled?: boolean;
49
+ theme?: string;
50
+ }
51
+ export declare const Regular: Story<ArgTypes>;
52
+ export declare const MultipleSelect: Story<ArgTypes>;
53
+ export declare const MultipleWithCheckbox: Story<ArgTypes>;