@operato/input 2.0.0-alpha.146 → 2.0.0-alpha.149

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 (229) hide show
  1. package/CHANGELOG.md +38 -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 +12 -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 +1 -1
  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 +3 -5
  54. package/dist/src/ox-input-search.js.map +1 -1
  55. package/dist/src/ox-input-select-buttons.js +1 -1
  56. package/dist/src/ox-input-select-buttons.js.map +1 -1
  57. package/dist/src/ox-input-table.js +1 -1
  58. package/dist/src/ox-input-table.js.map +1 -1
  59. package/dist/src/ox-input-unit-number.js +5 -5
  60. package/dist/src/ox-input-unit-number.js.map +1 -1
  61. package/dist/src/ox-input-value-map.js +6 -6
  62. package/dist/src/ox-input-value-map.js.map +1 -1
  63. package/dist/src/ox-input-value-ranges.js +7 -7
  64. package/dist/src/ox-input-value-ranges.js.map +1 -1
  65. package/dist/src/ox-input-work-shift.js +7 -7
  66. package/dist/src/ox-input-work-shift.js.map +1 -1
  67. package/dist/src/ox-select.js +4 -4
  68. package/dist/src/ox-select.js.map +1 -1
  69. package/dist/stories/ox-buttons-radio.stories.d.ts +31 -0
  70. package/dist/stories/ox-buttons-radio.stories.js +81 -0
  71. package/dist/stories/ox-buttons-radio.stories.js.map +1 -0
  72. package/dist/stories/ox-checkbox.stories.d.ts +6 -0
  73. package/dist/stories/ox-checkbox.stories.js +57 -13
  74. package/dist/stories/ox-checkbox.stories.js.map +1 -1
  75. package/dist/stories/ox-input-3axis.stories.d.ts +5 -0
  76. package/dist/stories/ox-input-3axis.stories.js +32 -10
  77. package/dist/stories/ox-input-3axis.stories.js.map +1 -1
  78. package/dist/stories/ox-input-3dish.stories.d.ts +5 -0
  79. package/dist/stories/ox-input-3dish.stories.js +35 -13
  80. package/dist/stories/ox-input-3dish.stories.js.map +1 -1
  81. package/dist/stories/ox-input-angle.stories.d.ts +5 -0
  82. package/dist/stories/ox-input-angle.stories.js +36 -13
  83. package/dist/stories/ox-input-angle.stories.js.map +1 -1
  84. package/dist/stories/ox-input-barcode.stories.d.ts +5 -0
  85. package/dist/stories/ox-input-barcode.stories.js +35 -18
  86. package/dist/stories/ox-input-barcode.stories.js.map +1 -1
  87. package/dist/stories/ox-input-code.stories.d.ts +5 -0
  88. package/dist/stories/ox-input-code.stories.js +38 -13
  89. package/dist/stories/ox-input-code.stories.js.map +1 -1
  90. package/dist/stories/ox-input-crontab.stories.d.ts +5 -0
  91. package/dist/stories/ox-input-crontab.stories.js +35 -12
  92. package/dist/stories/ox-input-crontab.stories.js.map +1 -1
  93. package/dist/stories/ox-input-data.stories.d.ts +5 -0
  94. package/dist/stories/ox-input-data.stories.js +34 -11
  95. package/dist/stories/ox-input-data.stories.js.map +1 -1
  96. package/dist/stories/ox-input-duration.stories.d.ts +5 -0
  97. package/dist/stories/ox-input-duration.stories.js +36 -13
  98. package/dist/stories/ox-input-duration.stories.js.map +1 -1
  99. package/dist/stories/ox-input-file.stories.d.ts +5 -0
  100. package/dist/stories/ox-input-file.stories.js +39 -16
  101. package/dist/stories/ox-input-file.stories.js.map +1 -1
  102. package/dist/stories/ox-input-hashtags.stories.d.ts +5 -0
  103. package/dist/stories/ox-input-hashtags.stories.js +35 -12
  104. package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
  105. package/dist/stories/ox-input-i18n-label.stories.d.ts +5 -0
  106. package/dist/stories/ox-input-i18n-label.stories.js +35 -12
  107. package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
  108. package/dist/stories/ox-input-key-values.stories.d.ts +5 -0
  109. package/dist/stories/ox-input-key-values.stories.js +35 -12
  110. package/dist/stories/ox-input-key-values.stories.js.map +1 -1
  111. package/dist/stories/ox-input-mass-fraction.stories.d.ts +5 -0
  112. package/dist/stories/ox-input-mass-fraction.stories.js +36 -13
  113. package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
  114. package/dist/stories/ox-input-multiple-colors.stories.d.ts +5 -0
  115. package/dist/stories/ox-input-multiple-colors.stories.js +31 -149
  116. package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
  117. package/dist/stories/ox-input-options.stories.d.ts +5 -0
  118. package/dist/stories/ox-input-options.stories.js +34 -11
  119. package/dist/stories/ox-input-options.stories.js.map +1 -1
  120. package/dist/stories/ox-input-partition-keys.stories.d.ts +5 -0
  121. package/dist/stories/ox-input-partition-keys.stories.js +34 -11
  122. package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
  123. package/dist/stories/ox-input-privilege.stories.d.ts +5 -0
  124. package/dist/stories/ox-input-privilege.stories.js +36 -18
  125. package/dist/stories/ox-input-privilege.stories.js.map +1 -1
  126. package/dist/stories/ox-input-quantifier.stories.d.ts +5 -0
  127. package/dist/stories/ox-input-quantifier.stories.js +37 -10
  128. package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
  129. package/dist/stories/ox-input-range.stories.d.ts +5 -0
  130. package/dist/stories/ox-input-range.stories.js +32 -5
  131. package/dist/stories/ox-input-range.stories.js.map +1 -1
  132. package/dist/stories/ox-input-search.stories.d.ts +5 -0
  133. package/dist/stories/ox-input-search.stories.js +35 -12
  134. package/dist/stories/ox-input-search.stories.js.map +1 -1
  135. package/dist/stories/ox-input-select-buttons.stories.d.ts +5 -0
  136. package/dist/stories/ox-input-select-buttons.stories.js +36 -14
  137. package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
  138. package/dist/stories/ox-input-unit.stories.d.ts +5 -0
  139. package/dist/stories/ox-input-unit.stories.js +40 -13
  140. package/dist/stories/ox-input-unit.stories.js.map +1 -1
  141. package/dist/stories/ox-input-value-map.stories.d.ts +5 -0
  142. package/dist/stories/ox-input-value-map.stories.js +36 -13
  143. package/dist/stories/ox-input-value-map.stories.js.map +1 -1
  144. package/dist/stories/ox-input-value-ranges.stories.d.ts +5 -0
  145. package/dist/stories/ox-input-value-ranges.stories.js +36 -13
  146. package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
  147. package/dist/stories/ox-input-work-shift.stories.d.ts +5 -0
  148. package/dist/stories/ox-input-work-shift.stories.js +36 -13
  149. package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
  150. package/dist/stories/ox-select-set-options.stories.d.ts +5 -0
  151. package/dist/stories/ox-select-set-options.stories.js +29 -4
  152. package/dist/stories/ox-select-set-options.stories.js.map +1 -1
  153. package/dist/stories/ox-select.stories.d.ts +5 -0
  154. package/dist/stories/ox-select.stories.js +29 -5
  155. package/dist/stories/ox-select.stories.js.map +1 -1
  156. package/dist/tsconfig.tsbuildinfo +1 -1
  157. package/package.json +5 -5
  158. package/src/ox-buttons-radio.ts +37 -5
  159. package/src/ox-checkbox.ts +23 -19
  160. package/src/ox-input-3axis.ts +12 -1
  161. package/src/ox-input-3dish.ts +16 -11
  162. package/src/ox-input-angle.ts +8 -1
  163. package/src/ox-input-barcode.ts +12 -8
  164. package/src/ox-input-code.ts +3 -0
  165. package/src/ox-input-color.ts +8 -6
  166. package/src/ox-input-crontab.ts +29 -25
  167. package/src/ox-input-data.ts +15 -6
  168. package/src/ox-input-duration.ts +15 -34
  169. package/src/ox-input-file.ts +18 -14
  170. package/src/ox-input-hashtags.ts +14 -16
  171. package/src/ox-input-i18n-label.ts +4 -4
  172. package/src/ox-input-image.ts +1 -1
  173. package/src/ox-input-key-values.ts +6 -6
  174. package/src/ox-input-mass-fraction.ts +5 -5
  175. package/src/ox-input-multiple-colors.ts +2 -2
  176. package/src/ox-input-options.ts +6 -6
  177. package/src/ox-input-partition-keys.ts +6 -6
  178. package/src/ox-input-privilege.ts +13 -16
  179. package/src/ox-input-quantifier.ts +5 -5
  180. package/src/ox-input-range.ts +8 -8
  181. package/src/ox-input-search.ts +3 -5
  182. package/src/ox-input-select-buttons.ts +1 -1
  183. package/src/ox-input-table.ts +1 -1
  184. package/src/ox-input-unit-number.ts +5 -5
  185. package/src/ox-input-value-map.ts +6 -6
  186. package/src/ox-input-value-ranges.ts +7 -7
  187. package/src/ox-input-work-shift.ts +7 -7
  188. package/src/ox-select.ts +4 -4
  189. package/stories/ox-buttons-radio.stories.ts +96 -0
  190. package/stories/ox-checkbox.stories.ts +61 -14
  191. package/stories/ox-input-3axis.stories.ts +35 -12
  192. package/stories/ox-input-3dish.stories.ts +38 -15
  193. package/stories/ox-input-angle.stories.ts +39 -15
  194. package/stories/ox-input-barcode.stories.ts +37 -18
  195. package/stories/ox-input-code.stories.ts +42 -15
  196. package/stories/ox-input-crontab.stories.ts +43 -14
  197. package/stories/ox-input-data.stories.ts +38 -14
  198. package/stories/ox-input-duration.stories.ts +39 -15
  199. package/stories/ox-input-file.stories.ts +41 -16
  200. package/stories/ox-input-hashtags.stories.ts +42 -12
  201. package/stories/ox-input-i18n-label.stories.ts +55 -31
  202. package/stories/ox-input-key-values.stories.ts +44 -14
  203. package/stories/ox-input-mass-fraction.stories.ts +40 -15
  204. package/stories/ox-input-multiple-colors.stories.ts +34 -151
  205. package/stories/ox-input-options.stories.ts +37 -13
  206. package/stories/ox-input-partition-keys.stories.ts +42 -13
  207. package/stories/ox-input-privilege.stories.ts +45 -20
  208. package/stories/ox-input-quantifier.stories.ts +38 -10
  209. package/stories/ox-input-range.stories.ts +34 -5
  210. package/stories/ox-input-search.stories.ts +37 -12
  211. package/stories/ox-input-select-buttons.stories.ts +40 -16
  212. package/stories/ox-input-unit.stories.ts +43 -14
  213. package/stories/ox-input-value-map.stories.ts +40 -15
  214. package/stories/ox-input-value-ranges.stories.ts +40 -15
  215. package/stories/ox-input-work-shift.stories.ts +39 -15
  216. package/stories/ox-select-set-options.stories.ts +31 -4
  217. package/stories/ox-select.stories.ts +31 -5
  218. package/themes/dark-hc.css +151 -0
  219. package/themes/dark-mc.css +151 -0
  220. package/themes/dark.css +151 -0
  221. package/themes/grist-theme.css +169 -0
  222. package/themes/light-hc.css +151 -0
  223. package/themes/light-mc.css +151 -0
  224. package/themes/light.css +151 -0
  225. package/themes/md-typescale-styles.css +100 -0
  226. package/themes/spacing.css +43 -0
  227. package/themes/state-color.css +6 -0
  228. package/themes/app-theme.css +0 -145
  229. package/themes/input-theme.css +0 -32
@@ -1,6 +1,7 @@
1
1
  import '../src/ox-input-key-values.js'
2
2
 
3
3
  import { html, TemplateResult } from 'lit'
4
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
4
5
 
5
6
  export default {
6
7
  title: 'ox-input-key-values',
@@ -9,7 +10,8 @@ export default {
9
10
  name: { control: 'text' },
10
11
  value: { control: 'object' },
11
12
  options: { control: 'object' },
12
- disabled: { control: 'boolean' }
13
+ disabled: { control: 'boolean' },
14
+ theme: { control: 'select', options: ['light', 'dark'] }
13
15
  }
14
16
  }
15
17
 
@@ -24,10 +26,21 @@ interface ArgTypes {
24
26
  value?: object
25
27
  options?: object
26
28
  disabled?: boolean
29
+ theme?: string
27
30
  }
28
31
 
29
- const Template: Story<ArgTypes> = ({ name = 'key-values', value = {}, options = [], disabled }: ArgTypes) => html`
30
- <link href="/themes/app-theme.css" rel="stylesheet" />
32
+ const Template: Story<ArgTypes> = ({
33
+ name = 'key-values',
34
+ value = {},
35
+ options = [],
36
+ disabled,
37
+ theme = 'light'
38
+ }: ArgTypes) => html`
39
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
40
+
41
+ <link href="/themes/light.css" rel="stylesheet" />
42
+ <link href="/themes/dark.css" rel="stylesheet" />
43
+ <link href="/themes/spacing.css" rel="stylesheet" />
31
44
 
32
45
  <link
33
46
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -41,21 +54,38 @@ const Template: Story<ArgTypes> = ({ name = 'key-values', value = {}, options =
41
54
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
42
55
  rel="stylesheet"
43
56
  />
57
+
44
58
  <style>
45
- body {
59
+ ${MDTypeScaleStyles.cssText}
60
+ </style>
61
+
62
+ <style>
63
+ .container {
64
+ height: 500px;
65
+ text-align: center;
66
+ padding: 20px;
67
+
68
+ background-color: var(--md-sys-color-primary-container);
69
+ color: var(--md-sys-color-on-primary-container);
46
70
  }
47
71
  </style>
48
72
 
49
- <ox-input-key-values
50
- @change=${(e: Event) => {
51
- console.log((e.target as HTMLInputElement).value)
52
- }}
53
- name=${name}
54
- .value=${value}
55
- .options=${options}
56
- ?disabled=${disabled}
57
- >
58
- </ox-input-key-values>
73
+ <script>
74
+ document.body.classList.add('${theme}')
75
+ </script>
76
+
77
+ <div class="container md-typescale-body-large-prominent">
78
+ <ox-input-key-values
79
+ @change=${(e: Event) => {
80
+ console.log((e.target as HTMLInputElement).value)
81
+ }}
82
+ name=${name}
83
+ .value=${value}
84
+ .options=${options}
85
+ ?disabled=${disabled}
86
+ >
87
+ </ox-input-key-values>
88
+ </div>
59
89
  `
60
90
 
61
91
  export const Regular = Template.bind({})
@@ -1,6 +1,7 @@
1
1
  import '../src/ox-input-mass-fraction.js'
2
2
 
3
3
  import { html, TemplateResult } from 'lit'
4
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
4
5
 
5
6
  export default {
6
7
  title: 'ox-input-mass-fraction',
@@ -10,7 +11,8 @@ export default {
10
11
  value: { control: 'object' },
11
12
  defaultValue: { control: 'object' },
12
13
  composable: { control: 'boolean' },
13
- disabled: { control: 'boolean' }
14
+ disabled: { control: 'boolean' },
15
+ theme: { control: 'select', options: ['light', 'dark'] }
14
16
  }
15
17
  }
16
18
 
@@ -26,6 +28,7 @@ interface ArgTypes {
26
28
  defaultValue?: object
27
29
  composable?: boolean
28
30
  disabled?: boolean
31
+ theme?: string
29
32
  }
30
33
 
31
34
  const Template: Story<ArgTypes> = ({
@@ -33,9 +36,14 @@ const Template: Story<ArgTypes> = ({
33
36
  value = {},
34
37
  defaultValue = {},
35
38
  composable = true,
36
- disabled
39
+ disabled,
40
+ theme = 'light'
37
41
  }: ArgTypes) => html`
38
- <link href="/themes/app-theme.css" rel="stylesheet" />
42
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
43
+
44
+ <link href="/themes/light.css" rel="stylesheet" />
45
+ <link href="/themes/dark.css" rel="stylesheet" />
46
+ <link href="/themes/spacing.css" rel="stylesheet" />
39
47
 
40
48
  <link
41
49
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -49,22 +57,39 @@ const Template: Story<ArgTypes> = ({
49
57
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
50
58
  rel="stylesheet"
51
59
  />
60
+
52
61
  <style>
53
- body {
62
+ ${MDTypeScaleStyles.cssText}
63
+ </style>
64
+
65
+ <style>
66
+ .container {
67
+ height: 500px;
68
+ text-align: center;
69
+ padding: 20px;
70
+
71
+ background-color: var(--md-sys-color-primary-container);
72
+ color: var(--md-sys-color-on-primary-container);
54
73
  }
55
74
  </style>
56
75
 
57
- <ox-input-mass-fraction
58
- @change=${(e: Event) => {
59
- console.log((e.target as HTMLInputElement).value)
60
- }}
61
- name=${name}
62
- .value=${value}
63
- .defaultValue=${defaultValue}
64
- ?composable=${composable}
65
- ?disabled=${disabled}
66
- >
67
- </ox-input-mass-fraction>
76
+ <script>
77
+ document.body.classList.add('${theme}')
78
+ </script>
79
+
80
+ <div class="container md-typescale-body-large-prominent">
81
+ <ox-input-mass-fraction
82
+ @change=${(e: Event) => {
83
+ console.log((e.target as HTMLInputElement).value)
84
+ }}
85
+ name=${name}
86
+ .value=${value}
87
+ .defaultValue=${defaultValue}
88
+ ?composable=${composable}
89
+ ?disabled=${disabled}
90
+ >
91
+ </ox-input-mass-fraction>
92
+ </div>
68
93
  `
69
94
 
70
95
  export const Regular = Template.bind({})
@@ -1,13 +1,15 @@
1
1
  import '../src/ox-input-multiple-colors.js'
2
2
 
3
3
  import { html, TemplateResult } from 'lit'
4
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
4
5
 
5
6
  export default {
6
7
  title: 'ox-input-multiple-colors',
7
8
  component: 'ox-input-multiple-colors',
8
9
  argTypes: {
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
15
 
@@ -19,9 +21,16 @@ interface Story<T> {
19
21
 
20
22
  interface ArgTypes {
21
23
  disabled: boolean
24
+ theme?: string
22
25
  }
23
26
 
24
- const Template: Story<ArgTypes> = ({ disabled }: ArgTypes) => html`
27
+ const Template: Story<ArgTypes> = ({ disabled, theme = 'light' }: ArgTypes) => html`
28
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
29
+
30
+ <link href="/themes/light.css" rel="stylesheet" />
31
+ <link href="/themes/dark.css" rel="stylesheet" />
32
+ <link href="/themes/spacing.css" rel="stylesheet" />
33
+
25
34
  <link
26
35
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
27
36
  rel="stylesheet"
@@ -36,160 +45,34 @@ const Template: Story<ArgTypes> = ({ disabled }: ArgTypes) => html`
36
45
  />
37
46
 
38
47
  <style>
39
- body {
40
- /* theme color */
41
- --primary-color-rgb: 56, 162, 91;
42
- --primary-color: rgb(var(--primary-color-rgb));
43
- --secondary-color-rgb: 71, 97, 114;
44
- --secondary-color: rgb(var(--secondary-color-rgb));
45
- --focus-color: var(--theme-white-color);
46
- --primary-background-color: var(--secondary-color);
47
- --secondary-background-color: #183936;
48
- --main-section-background-color: #f7f6f4;
49
- --theme-white-color: #fff;
50
- --theme-black-color: rgba(0, 0, 0, 0.9);
51
-
52
- --focus-background-color: var(--primary-color);
53
- --primary-text-color: var(--theme-black-color);
54
- --secondary-text-color: #218f62;
55
-
56
- --opacity-dark-color: rgba(0, 0, 0, 0.4);
57
- --opacity-light-color: rgba(255, 255, 255, 0.8);
58
-
59
- /* status color */
60
- --status-success-color: #35a24a;
61
- --status-warning-color: #ee8d03;
62
- --status-danger-color: #d14946;
63
- --status-info-color: #398ace;
64
-
65
- /* common style */
66
- --border-radius: 4px;
67
- --border-dark-color: 1px solid rgba(0, 0, 0, 0.15);
68
- --border-light-color: 1px solid rgba(255, 255, 255, 0.3);
69
-
70
- --box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
71
-
72
- --theme-font: 'Noto', Helvetica;
73
-
74
- --margin-default: 9px;
75
- --margin-narrow: 4px;
76
- --margin-wide: 15px;
77
- --padding-default: var(--margin-default);
78
- --padding-narrow: var(--margin-narrow);
79
- --padding-wide: var(--margin-wide);
80
-
81
- --scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
82
- --scrollbar-thumb-hover-color: var(--primary-color);
83
-
84
- --fontsize-default: 14px;
85
- --fontsize-small: 13px;
86
- --fontsize-large: 16px;
87
-
88
- /* app layout style */
89
- --app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
90
-
91
- /* title & description style */
92
- --title-margin: var(--margin-narrow) 0;
93
- --title-font: bold 24px var(--theme-font);
94
- --title-text-color: var(--secondary-color);
95
- --title-font-mobile: bold 20px var(--theme-font);
96
-
97
- --page-description-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
98
- --page-description-font: normal var(--fontsize-default) / 1.2rem var(--theme-font);
99
- --page-description-color: var(--secondary-text-color);
100
-
101
- --subtitle-padding: 12px 5px 3px 5px;
102
- --subtitle-font: bold 18px var(--theme-font);
103
- --subtitle-text-color: var(--primary-color);
104
- --subtitle-border-bottom: 1px solid var(--primary-color);
105
-
106
- /* icon style */
107
- --icon-tiny-size: 24px;
108
- --icon-default-size: 36px;
109
- --icon-big-size: 48px;
110
- --icon-default-color: var(--theme-white-color);
111
-
112
- /* material design component themes */
113
- --md-theme-on-primary: var(--theme-white-color);
114
- --md-theme-primary: var(--secondary-text-color);
115
- --md-theme-on-secondary: var(--theme-white-color);
116
- --md-theme-secondary: var(--primary-color);
117
- --md-button-outline-color: var(--primary-color);
118
- --md-danger-button-primary-color: var(--status-danger-color);
119
- --md-danger-button-outline-color: var(--status-danger-color);
120
- --md-button-outline-width: 1px;
121
-
122
- /* button style */
123
- --button-background-color: #fafbfc;
124
- --button-background-focus-color: var(--primary-color);
125
- --button-border: var(--border-dark-color);
126
- --button-border-radius: var(--border-radius);
127
- --button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
128
- --button-padding: var(--padding-default);
129
- --button-color: var(--secondary-color);
130
- --button-font: normal 15px var(--theme-font);
131
- --button-text-transform: capitalize;
132
- --button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
133
- --button-activ-border: 1px solid var(--primary-color);
134
-
135
- --button-primary-background-color: var(--primary-color);
136
- --button-primary-active-background-color: var(--status-success-color);
137
- --button-primary-padding: var(--margin-default) var(--margin-wide);
138
- --button-primary-color: var(--theme-white-color);
139
- --button-primary-font: bold 16px var(--theme-font);
140
-
141
- /* table style */
142
- --th-padding: var(--padding-default);
143
- --th-border-top: 2px solid var(--secondary-color);
144
- --th-text-transform: capitalize;
145
- --th-font: bold var(--fontsize-small) var(--theme-font);
146
- --th-color: rgba(var(--secondary-color-rgb), 0.8);
147
-
148
- --tr-background-color: var(--theme-white-color);
149
- --tr-background-odd-color: rgba(255, 255, 255, 0.4);
150
- --tr-background-hover-color: #e1f5fe;
151
- --td-border-line: 1px solid rgba(0, 0, 0, 0.05);
152
- --td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
153
- --td-padding: var(--padding-default);
154
- --td-font: normal 13px var(--theme-font);
155
- --td-color: var(--secondary-color);
156
-
157
- --label-cell-background-color: #f6f6f6; /* th or td common background color */
48
+ ${MDTypeScaleStyles.cssText}
49
+ </style>
158
50
 
159
- /* form style */
160
- --label-font: normal var(--fontsize-default) var(--theme-font);
161
- --label-color: var(--secondary-color);
162
- --label-text-transform: capitalize;
163
- --input-margin: var(--margin-narrow) 0;
164
- --input-padding: 6px 2px;
165
- --input-min-width: 200px;
166
- --input-font: normal var(--fontsize-default) var(--theme-font);
167
- --input-hint-font: normal var(--fontsize-small) var(--theme-font);
168
- --input-hint-color: #666;
169
- --input-container-max-width: 900px;
170
- --fieldset-margin: var(--padding-wide) 0;
171
- --fieldset-padding: 0 var(--padding-wide) var(--padding-wide) var(--padding-wide);
172
- --legend-padding: var(--padding-default) 0;
173
- --legend-color: var(--secondary-text-color);
174
- --legend-font: bold 16px var(--theme-font);
175
- }
51
+ <style>
52
+ .container {
53
+ height: 500px;
54
+ text-align: center;
55
+ padding: 20px;
176
56
 
177
- @media only screen and (max-width: 460px) {
178
- body {
179
- /* subtitle style */
180
- --subtitle-margin: 0;
181
- }
57
+ background-color: var(--md-sys-color-primary-container);
58
+ color: var(--md-sys-color-on-primary-container);
182
59
  }
183
60
  </style>
184
61
 
185
- <ox-input-multiple-colors
186
- .value=${['red', 'yellow']}
187
- @change=${(e: Event) => {
188
- console.log((e.target as HTMLInputElement).value)
189
- }}
190
- ?disabled=${disabled}
191
- >
192
- </ox-input-multiple-colors>
62
+ <script>
63
+ document.body.classList.add('${theme}')
64
+ </script>
65
+
66
+ <div class="container md-typescale-body-large-prominent">
67
+ <ox-input-multiple-colors
68
+ .value=${['red', 'yellow']}
69
+ @change=${(e: Event) => {
70
+ console.log((e.target as HTMLInputElement).value)
71
+ }}
72
+ ?disabled=${disabled}
73
+ >
74
+ </ox-input-multiple-colors>
75
+ </div>
193
76
  `
194
77
 
195
78
  export const Regular = Template.bind({})
@@ -1,6 +1,7 @@
1
1
  import '../src/ox-input-options.js'
2
2
 
3
3
  import { html, TemplateResult } from 'lit'
4
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
4
5
 
5
6
  export default {
6
7
  title: 'ox-input-options',
@@ -8,7 +9,8 @@ export default {
8
9
  argTypes: {
9
10
  value: { control: 'object' },
10
11
  name: { control: 'text' },
11
- disabled: { control: 'boolean' }
12
+ disabled: { control: 'boolean' },
13
+ theme: { control: 'select', options: ['light', 'dark'] }
12
14
  }
13
15
  }
14
16
 
@@ -22,10 +24,15 @@ interface ArgTypes {
22
24
  name?: string
23
25
  value?: object
24
26
  disabled?: boolean
27
+ theme?: string
25
28
  }
26
29
 
27
- const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled }: ArgTypes) => html`
28
- <link href="/themes/app-theme.css" rel="stylesheet" />
30
+ const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled, theme = 'light' }: ArgTypes) => html`
31
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
32
+
33
+ <link href="/themes/light.css" rel="stylesheet" />
34
+ <link href="/themes/dark.css" rel="stylesheet" />
35
+ <link href="/themes/spacing.css" rel="stylesheet" />
29
36
 
30
37
  <link
31
38
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -39,20 +46,37 @@ const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled }: A
39
46
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
40
47
  rel="stylesheet"
41
48
  />
49
+
42
50
  <style>
43
- body {
51
+ ${MDTypeScaleStyles.cssText}
52
+ </style>
53
+
54
+ <style>
55
+ .container {
56
+ height: 500px;
57
+ text-align: center;
58
+ padding: 20px;
59
+
60
+ background-color: var(--md-sys-color-primary-container);
61
+ color: var(--md-sys-color-on-primary-container);
44
62
  }
45
63
  </style>
46
64
 
47
- <ox-input-options
48
- @change=${(e: Event) => {
49
- console.log((e.target as HTMLInputElement).value)
50
- }}
51
- name=${name}
52
- .value=${value}
53
- ?disabled=${disabled}
54
- >
55
- </ox-input-options>
65
+ <script>
66
+ document.body.classList.add('${theme}')
67
+ </script>
68
+
69
+ <div class="container md-typescale-body-large-prominent">
70
+ <ox-input-options
71
+ @change=${(e: Event) => {
72
+ console.log((e.target as HTMLInputElement).value)
73
+ }}
74
+ name=${name}
75
+ .value=${value}
76
+ ?disabled=${disabled}
77
+ >
78
+ </ox-input-options>
79
+ </div>
56
80
  `
57
81
 
58
82
  export const Regular = Template.bind({})
@@ -1,6 +1,7 @@
1
1
  import '../src/ox-input-partition-keys.js'
2
2
 
3
3
  import { html, TemplateResult } from 'lit'
4
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
4
5
 
5
6
  export default {
6
7
  title: 'ox-input-partition-keys',
@@ -8,7 +9,8 @@ export default {
8
9
  argTypes: {
9
10
  value: { control: 'object' },
10
11
  name: { control: 'text' },
11
- disabled: { control: 'boolean' }
12
+ disabled: { control: 'boolean' },
13
+ theme: { control: 'select', options: ['light', 'dark'] }
12
14
  }
13
15
  }
14
16
 
@@ -22,10 +24,20 @@ interface ArgTypes {
22
24
  name?: string
23
25
  value?: object
24
26
  disabled?: boolean
27
+ theme?: string
25
28
  }
26
29
 
27
- const Template: Story<ArgTypes> = ({ name = 'partition-keys', value = {}, disabled }: ArgTypes) => html`
28
- <link href="/themes/app-theme.css" rel="stylesheet" />
30
+ const Template: Story<ArgTypes> = ({
31
+ name = 'partition-keys',
32
+ value = {},
33
+ disabled,
34
+ theme = 'light'
35
+ }: ArgTypes) => html`
36
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
37
+
38
+ <link href="/themes/light.css" rel="stylesheet" />
39
+ <link href="/themes/dark.css" rel="stylesheet" />
40
+ <link href="/themes/spacing.css" rel="stylesheet" />
29
41
 
30
42
  <link
31
43
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -39,20 +51,37 @@ const Template: Story<ArgTypes> = ({ name = 'partition-keys', value = {}, disabl
39
51
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
40
52
  rel="stylesheet"
41
53
  />
54
+
42
55
  <style>
43
- body {
56
+ ${MDTypeScaleStyles.cssText}
57
+ </style>
58
+
59
+ <style>
60
+ .container {
61
+ height: 500px;
62
+ text-align: center;
63
+ padding: 20px;
64
+
65
+ background-color: var(--md-sys-color-primary-container);
66
+ color: var(--md-sys-color-on-primary-container);
44
67
  }
45
68
  </style>
46
69
 
47
- <ox-input-partition-keys
48
- @change=${(e: Event) => {
49
- console.log((e.target as HTMLInputElement).value)
50
- }}
51
- name=${name}
52
- .value=${value}
53
- ?disabled=${disabled}
54
- >
55
- </ox-input-partition-keys>
70
+ <script>
71
+ document.body.classList.add('${theme}')
72
+ </script>
73
+
74
+ <div class="container md-typescale-body-large-prominent">
75
+ <ox-input-partition-keys
76
+ @change=${(e: Event) => {
77
+ console.log((e.target as HTMLInputElement).value)
78
+ }}
79
+ name=${name}
80
+ .value=${value}
81
+ ?disabled=${disabled}
82
+ >
83
+ </ox-input-partition-keys>
84
+ </div>
56
85
  `
57
86
 
58
87
  export const Regular = Template.bind({})
@@ -2,6 +2,7 @@ import '../src/ox-input-privilege.js'
2
2
  import '../src/locale/locale-picker.js'
3
3
 
4
4
  import { html, TemplateResult } from 'lit'
5
+ import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
5
6
 
6
7
  export default {
7
8
  title: 'ox-input-privilege',
@@ -9,7 +10,8 @@ export default {
9
10
  argTypes: {
10
11
  value: { control: 'number' },
11
12
  name: { control: 'text' },
12
- disabled: { control: 'boolean' }
13
+ disabled: { control: 'boolean' },
14
+ theme: { control: 'select', options: ['light', 'dark'] }
13
15
  }
14
16
  }
15
17
 
@@ -29,10 +31,21 @@ interface ArgTypes {
29
31
  super: boolean
30
32
  } | null
31
33
  disabled?: boolean
34
+ theme?: string
32
35
  }
33
36
 
34
- const Template: Story<ArgTypes> = ({ name = 'privilege', value = null, privileges, disabled }: ArgTypes) => html`
35
- <link href="/themes/app-theme.css" rel="stylesheet" />
37
+ const Template: Story<ArgTypes> = ({
38
+ name = 'privilege',
39
+ value = null,
40
+ privileges,
41
+ disabled,
42
+ theme = 'light'
43
+ }: ArgTypes) => html`
44
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
45
+
46
+ <link href="/themes/light.css" rel="stylesheet" />
47
+ <link href="/themes/dark.css" rel="stylesheet" />
48
+ <link href="/themes/spacing.css" rel="stylesheet" />
36
49
 
37
50
  <link
38
51
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -46,29 +59,41 @@ const Template: Story<ArgTypes> = ({ name = 'privilege', value = null, privilege
46
59
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
47
60
  rel="stylesheet"
48
61
  />
62
+
49
63
  <style>
50
- body {
51
- }
64
+ ${MDTypeScaleStyles.cssText}
65
+ </style>
52
66
 
53
- ox-input-privilege {
54
- width: 100%;
55
- min-height: 500px;
67
+ <style>
68
+ .container {
69
+ height: 500px;
70
+ text-align: center;
71
+ padding: 20px;
72
+
73
+ background-color: var(--md-sys-color-primary-container);
74
+ color: var(--md-sys-color-on-primary-container);
56
75
  }
57
76
  </style>
58
77
 
59
- <locale-picker></locale-picker>
60
- <br /><br />
78
+ <script>
79
+ document.body.classList.add('${theme}')
80
+ </script>
81
+
82
+ <div class="container md-typescale-body-large-prominent">
83
+ <locale-picker></locale-picker>
84
+ <br /><br />
61
85
 
62
- <ox-input-privilege
63
- @change=${(e: Event) => {
64
- console.log((e.target as HTMLInputElement).value)
65
- }}
66
- name=${name}
67
- .value=${value}
68
- .privileges=${privileges}
69
- ?disabled=${disabled}
70
- >
71
- </ox-input-privilege>
86
+ <ox-input-privilege
87
+ @change=${(e: Event) => {
88
+ console.log((e.target as HTMLInputElement).value)
89
+ }}
90
+ name=${name}
91
+ .value=${value}
92
+ .privileges=${privileges}
93
+ ?disabled=${disabled}
94
+ >
95
+ </ox-input-privilege>
96
+ </div>
72
97
  `
73
98
 
74
99
  export const Regular = Template.bind({})