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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/CHANGELOG.md +256 -0
  2. package/demo/index-barcode.html +4 -4
  3. package/demo/index-checkbox.html +4 -4
  4. package/demo/index-code.html +4 -4
  5. package/demo/index-options.html +2 -2
  6. package/dist/src/index.d.ts +1 -0
  7. package/dist/src/index.js +1 -0
  8. package/dist/src/index.js.map +1 -1
  9. package/dist/src/ox-buttons-radio.d.ts +9 -5
  10. package/dist/src/ox-buttons-radio.js +43 -11
  11. package/dist/src/ox-buttons-radio.js.map +1 -1
  12. package/dist/src/ox-checkbox.js +23 -19
  13. package/dist/src/ox-checkbox.js.map +1 -1
  14. package/dist/src/ox-input-3axis.js +12 -1
  15. package/dist/src/ox-input-3axis.js.map +1 -1
  16. package/dist/src/ox-input-3dish.js +16 -11
  17. package/dist/src/ox-input-3dish.js.map +1 -1
  18. package/dist/src/ox-input-angle.js +8 -1
  19. package/dist/src/ox-input-angle.js.map +1 -1
  20. package/dist/src/ox-input-barcode.js +11 -8
  21. package/dist/src/ox-input-barcode.js.map +1 -1
  22. package/dist/src/ox-input-code.js +3 -0
  23. package/dist/src/ox-input-code.js.map +1 -1
  24. package/dist/src/ox-input-color.js +8 -6
  25. package/dist/src/ox-input-color.js.map +1 -1
  26. package/dist/src/ox-input-crontab.js +29 -25
  27. package/dist/src/ox-input-crontab.js.map +1 -1
  28. package/dist/src/ox-input-data.js +15 -6
  29. package/dist/src/ox-input-data.js.map +1 -1
  30. package/dist/src/ox-input-direction.d.ts +11 -0
  31. package/dist/src/ox-input-direction.js +60 -0
  32. package/dist/src/ox-input-direction.js.map +1 -0
  33. package/dist/src/ox-input-duration.js +15 -34
  34. package/dist/src/ox-input-duration.js.map +1 -1
  35. package/dist/src/ox-input-file.js +18 -14
  36. package/dist/src/ox-input-file.js.map +1 -1
  37. package/dist/src/ox-input-hashtags.js +13 -14
  38. package/dist/src/ox-input-hashtags.js.map +1 -1
  39. package/dist/src/ox-input-i18n-label.js +4 -4
  40. package/dist/src/ox-input-i18n-label.js.map +1 -1
  41. package/dist/src/ox-input-image.js +2 -2
  42. package/dist/src/ox-input-image.js.map +1 -1
  43. package/dist/src/ox-input-key-values.js +6 -6
  44. package/dist/src/ox-input-key-values.js.map +1 -1
  45. package/dist/src/ox-input-mass-fraction.js +6 -5
  46. package/dist/src/ox-input-mass-fraction.js.map +1 -1
  47. package/dist/src/ox-input-multiple-colors.js +2 -2
  48. package/dist/src/ox-input-multiple-colors.js.map +1 -1
  49. package/dist/src/ox-input-options.js +6 -6
  50. package/dist/src/ox-input-options.js.map +1 -1
  51. package/dist/src/ox-input-partition-keys.js +6 -6
  52. package/dist/src/ox-input-partition-keys.js.map +1 -1
  53. package/dist/src/ox-input-privilege.js +13 -16
  54. package/dist/src/ox-input-privilege.js.map +1 -1
  55. package/dist/src/ox-input-quantifier.js +5 -5
  56. package/dist/src/ox-input-quantifier.js.map +1 -1
  57. package/dist/src/ox-input-range.js +8 -8
  58. package/dist/src/ox-input-range.js.map +1 -1
  59. package/dist/src/ox-input-search.js +5 -6
  60. package/dist/src/ox-input-search.js.map +1 -1
  61. package/dist/src/ox-input-select-buttons.d.ts +2 -0
  62. package/dist/src/ox-input-select-buttons.js +14 -21
  63. package/dist/src/ox-input-select-buttons.js.map +1 -1
  64. package/dist/src/ox-input-table.js +1 -1
  65. package/dist/src/ox-input-table.js.map +1 -1
  66. package/dist/src/ox-input-unit-number.js +5 -5
  67. package/dist/src/ox-input-unit-number.js.map +1 -1
  68. package/dist/src/ox-input-value-map.js +9 -13
  69. package/dist/src/ox-input-value-map.js.map +1 -1
  70. package/dist/src/ox-input-value-ranges.js +7 -7
  71. package/dist/src/ox-input-value-ranges.js.map +1 -1
  72. package/dist/src/ox-input-work-shift.js +7 -7
  73. package/dist/src/ox-input-work-shift.js.map +1 -1
  74. package/dist/src/ox-select.d.ts +9 -1
  75. package/dist/src/ox-select.js +51 -17
  76. package/dist/src/ox-select.js.map +1 -1
  77. package/dist/src/ox-zoomable-image.d.ts +17 -0
  78. package/dist/src/ox-zoomable-image.js +80 -0
  79. package/dist/src/ox-zoomable-image.js.map +1 -0
  80. package/dist/stories/ox-buttons-radio.stories.d.ts +31 -0
  81. package/dist/stories/ox-buttons-radio.stories.js +81 -0
  82. package/dist/stories/ox-buttons-radio.stories.js.map +1 -0
  83. package/dist/stories/ox-checkbox.stories.d.ts +6 -0
  84. package/dist/stories/ox-checkbox.stories.js +57 -13
  85. package/dist/stories/ox-checkbox.stories.js.map +1 -1
  86. package/dist/stories/ox-input-3axis.stories.d.ts +5 -0
  87. package/dist/stories/ox-input-3axis.stories.js +32 -10
  88. package/dist/stories/ox-input-3axis.stories.js.map +1 -1
  89. package/dist/stories/ox-input-3dish.stories.d.ts +5 -0
  90. package/dist/stories/ox-input-3dish.stories.js +35 -13
  91. package/dist/stories/ox-input-3dish.stories.js.map +1 -1
  92. package/dist/stories/ox-input-angle.stories.d.ts +5 -0
  93. package/dist/stories/ox-input-angle.stories.js +36 -13
  94. package/dist/stories/ox-input-angle.stories.js.map +1 -1
  95. package/dist/stories/ox-input-barcode.stories.d.ts +5 -0
  96. package/dist/stories/ox-input-barcode.stories.js +35 -18
  97. package/dist/stories/ox-input-barcode.stories.js.map +1 -1
  98. package/dist/stories/ox-input-code.stories.d.ts +5 -0
  99. package/dist/stories/ox-input-code.stories.js +38 -13
  100. package/dist/stories/ox-input-code.stories.js.map +1 -1
  101. package/dist/stories/ox-input-crontab.stories.d.ts +5 -0
  102. package/dist/stories/ox-input-crontab.stories.js +35 -12
  103. package/dist/stories/ox-input-crontab.stories.js.map +1 -1
  104. package/dist/stories/ox-input-data.stories.d.ts +5 -0
  105. package/dist/stories/ox-input-data.stories.js +34 -11
  106. package/dist/stories/ox-input-data.stories.js.map +1 -1
  107. package/dist/stories/ox-input-direction.stories.d.ts +34 -0
  108. package/dist/stories/ox-input-direction.stories.js +70 -0
  109. package/dist/stories/ox-input-direction.stories.js.map +1 -0
  110. package/dist/stories/ox-input-duration.stories.d.ts +5 -0
  111. package/dist/stories/ox-input-duration.stories.js +36 -13
  112. package/dist/stories/ox-input-duration.stories.js.map +1 -1
  113. package/dist/stories/ox-input-file.stories.d.ts +5 -0
  114. package/dist/stories/ox-input-file.stories.js +39 -16
  115. package/dist/stories/ox-input-file.stories.js.map +1 -1
  116. package/dist/stories/ox-input-hashtags.stories.d.ts +5 -0
  117. package/dist/stories/ox-input-hashtags.stories.js +35 -12
  118. package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
  119. package/dist/stories/ox-input-i18n-label.stories.d.ts +5 -0
  120. package/dist/stories/ox-input-i18n-label.stories.js +35 -12
  121. package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
  122. package/dist/stories/ox-input-key-values.stories.d.ts +5 -0
  123. package/dist/stories/ox-input-key-values.stories.js +35 -12
  124. package/dist/stories/ox-input-key-values.stories.js.map +1 -1
  125. package/dist/stories/ox-input-mass-fraction.stories.d.ts +5 -0
  126. package/dist/stories/ox-input-mass-fraction.stories.js +36 -13
  127. package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
  128. package/dist/stories/ox-input-multiple-colors.stories.d.ts +5 -0
  129. package/dist/stories/ox-input-multiple-colors.stories.js +31 -149
  130. package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
  131. package/dist/stories/ox-input-options.stories.d.ts +5 -0
  132. package/dist/stories/ox-input-options.stories.js +34 -11
  133. package/dist/stories/ox-input-options.stories.js.map +1 -1
  134. package/dist/stories/ox-input-partition-keys.stories.d.ts +5 -0
  135. package/dist/stories/ox-input-partition-keys.stories.js +34 -11
  136. package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
  137. package/dist/stories/ox-input-privilege.stories.d.ts +5 -0
  138. package/dist/stories/ox-input-privilege.stories.js +36 -18
  139. package/dist/stories/ox-input-privilege.stories.js.map +1 -1
  140. package/dist/stories/ox-input-quantifier.stories.d.ts +5 -0
  141. package/dist/stories/ox-input-quantifier.stories.js +37 -10
  142. package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
  143. package/dist/stories/ox-input-range.stories.d.ts +5 -0
  144. package/dist/stories/ox-input-range.stories.js +32 -5
  145. package/dist/stories/ox-input-range.stories.js.map +1 -1
  146. package/dist/stories/ox-input-search.stories.d.ts +5 -0
  147. package/dist/stories/ox-input-search.stories.js +35 -12
  148. package/dist/stories/ox-input-search.stories.js.map +1 -1
  149. package/dist/stories/ox-input-select-buttons.stories.d.ts +5 -0
  150. package/dist/stories/ox-input-select-buttons.stories.js +36 -14
  151. package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
  152. package/dist/stories/ox-input-unit.stories.d.ts +5 -0
  153. package/dist/stories/ox-input-unit.stories.js +40 -13
  154. package/dist/stories/ox-input-unit.stories.js.map +1 -1
  155. package/dist/stories/ox-input-value-map.stories.d.ts +5 -0
  156. package/dist/stories/ox-input-value-map.stories.js +36 -13
  157. package/dist/stories/ox-input-value-map.stories.js.map +1 -1
  158. package/dist/stories/ox-input-value-ranges.stories.d.ts +5 -0
  159. package/dist/stories/ox-input-value-ranges.stories.js +36 -13
  160. package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
  161. package/dist/stories/ox-input-work-shift.stories.d.ts +5 -0
  162. package/dist/stories/ox-input-work-shift.stories.js +36 -13
  163. package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
  164. package/dist/stories/ox-select-set-options.stories.d.ts +53 -0
  165. package/dist/stories/ox-select-set-options.stories.js +183 -0
  166. package/dist/stories/ox-select-set-options.stories.js.map +1 -0
  167. package/dist/stories/ox-select.stories.d.ts +5 -0
  168. package/dist/stories/ox-select.stories.js +33 -7
  169. package/dist/stories/ox-select.stories.js.map +1 -1
  170. package/dist/tsconfig.tsbuildinfo +1 -1
  171. package/package.json +12 -8
  172. package/src/index.ts +1 -0
  173. package/src/ox-buttons-radio.ts +37 -5
  174. package/src/ox-checkbox.ts +23 -19
  175. package/src/ox-input-3axis.ts +12 -1
  176. package/src/ox-input-3dish.ts +16 -11
  177. package/src/ox-input-angle.ts +8 -1
  178. package/src/ox-input-barcode.ts +11 -8
  179. package/src/ox-input-code.ts +3 -0
  180. package/src/ox-input-color.ts +8 -6
  181. package/src/ox-input-crontab.ts +29 -25
  182. package/src/ox-input-data.ts +15 -6
  183. package/src/ox-input-direction.ts +65 -0
  184. package/src/ox-input-duration.ts +15 -34
  185. package/src/ox-input-file.ts +18 -14
  186. package/src/ox-input-hashtags.ts +14 -16
  187. package/src/ox-input-i18n-label.ts +4 -4
  188. package/src/ox-input-image.ts +2 -2
  189. package/src/ox-input-key-values.ts +6 -6
  190. package/src/ox-input-mass-fraction.ts +6 -5
  191. package/src/ox-input-multiple-colors.ts +2 -2
  192. package/src/ox-input-options.ts +6 -6
  193. package/src/ox-input-partition-keys.ts +6 -6
  194. package/src/ox-input-privilege.ts +13 -16
  195. package/src/ox-input-quantifier.ts +5 -5
  196. package/src/ox-input-range.ts +8 -8
  197. package/src/ox-input-search.ts +5 -6
  198. package/src/ox-input-select-buttons.ts +19 -24
  199. package/src/ox-input-table.ts +1 -1
  200. package/src/ox-input-unit-number.ts +5 -5
  201. package/src/ox-input-value-map.ts +9 -13
  202. package/src/ox-input-value-ranges.ts +7 -7
  203. package/src/ox-input-work-shift.ts +7 -7
  204. package/src/ox-select.ts +60 -13
  205. package/src/ox-zoomable-image.ts +75 -0
  206. package/stories/ox-buttons-radio.stories.ts +96 -0
  207. package/stories/ox-checkbox.stories.ts +61 -14
  208. package/stories/ox-input-3axis.stories.ts +35 -12
  209. package/stories/ox-input-3dish.stories.ts +38 -15
  210. package/stories/ox-input-angle.stories.ts +39 -15
  211. package/stories/ox-input-barcode.stories.ts +37 -18
  212. package/stories/ox-input-code.stories.ts +42 -15
  213. package/stories/ox-input-crontab.stories.ts +43 -14
  214. package/stories/ox-input-data.stories.ts +38 -14
  215. package/stories/ox-input-direction.stories.ts +86 -0
  216. package/stories/ox-input-duration.stories.ts +39 -15
  217. package/stories/ox-input-file.stories.ts +41 -16
  218. package/stories/ox-input-hashtags.stories.ts +42 -12
  219. package/stories/ox-input-i18n-label.stories.ts +55 -31
  220. package/stories/ox-input-key-values.stories.ts +44 -14
  221. package/stories/ox-input-mass-fraction.stories.ts +40 -15
  222. package/stories/ox-input-multiple-colors.stories.ts +34 -151
  223. package/stories/ox-input-options.stories.ts +37 -13
  224. package/stories/ox-input-partition-keys.stories.ts +42 -13
  225. package/stories/ox-input-privilege.stories.ts +45 -20
  226. package/stories/ox-input-quantifier.stories.ts +38 -10
  227. package/stories/ox-input-range.stories.ts +34 -5
  228. package/stories/ox-input-search.stories.ts +37 -12
  229. package/stories/ox-input-select-buttons.stories.ts +40 -16
  230. package/stories/ox-input-unit.stories.ts +43 -14
  231. package/stories/ox-input-value-map.stories.ts +40 -15
  232. package/stories/ox-input-value-ranges.stories.ts +40 -15
  233. package/stories/ox-input-work-shift.stories.ts +39 -15
  234. package/stories/ox-select-set-options.stories.ts +215 -0
  235. package/stories/ox-select.stories.ts +37 -7
  236. package/themes/dark-hc.css +151 -0
  237. package/themes/dark-mc.css +151 -0
  238. package/themes/dark.css +151 -0
  239. package/themes/grist-theme.css +169 -0
  240. package/themes/light-hc.css +151 -0
  241. package/themes/light-mc.css +151 -0
  242. package/themes/light.css +151 -0
  243. package/themes/md-typescale-styles.css +100 -0
  244. package/themes/spacing.css +43 -0
  245. package/themes/state-color.css +6 -0
  246. package/themes/app-theme.css +0 -145
  247. package/themes/input-theme.css +0 -32
@@ -1,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({})
@@ -1,6 +1,7 @@
1
1
  import '../src/ox-input-quantifier.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
  import { OxInputQuantifier } from '../src/ox-input-quantifier.js'
6
7
 
@@ -10,7 +11,8 @@ export default {
10
11
  argTypes: {
11
12
  name: { control: 'text' },
12
13
  value: { control: 'array' },
13
- disabled: { control: 'boolean' }
14
+ disabled: { control: 'boolean' },
15
+ theme: { control: 'select', options: ['light', 'dark'] }
14
16
  }
15
17
  }
16
18
 
@@ -24,10 +26,15 @@ interface ArgTypes {
24
26
  name?: string
25
27
  value?: number[]
26
28
  disabled?: boolean
29
+ theme?: string
27
30
  }
28
31
 
29
- const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled }: ArgTypes) => html`
30
- <link href="/themes/app-theme.css" rel="stylesheet" />
32
+ const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled, theme = 'light' }: ArgTypes) => html`
33
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
34
+
35
+ <link href="/themes/light.css" rel="stylesheet" />
36
+ <link href="/themes/dark.css" rel="stylesheet" />
37
+ <link href="/themes/spacing.css" rel="stylesheet" />
31
38
 
32
39
  <link
33
40
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -42,13 +49,34 @@ const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled }: Arg
42
49
  rel="stylesheet"
43
50
  />
44
51
 
45
- <ox-input-quantifier
46
- name=${name}
47
- .value=${value}
48
- @change=${(e: Event) => console.log((e.target as OxInputQuantifier).value)}
49
- ?disabled=${disabled}
50
- >
51
- </ox-input-quantifier>
52
+ <style>
53
+ ${MDTypeScaleStyles.cssText}
54
+ </style>
55
+
56
+ <style>
57
+ .container {
58
+ height: 500px;
59
+ text-align: center;
60
+ padding: 20px;
61
+
62
+ background-color: var(--md-sys-color-primary-container);
63
+ color: var(--md-sys-color-on-primary-container);
64
+ }
65
+ </style>
66
+
67
+ <script>
68
+ document.body.classList.add('${theme}')
69
+ </script>
70
+
71
+ <div class="container md-typescale-body-large-prominent">
72
+ <ox-input-quantifier
73
+ name=${name}
74
+ .value=${value}
75
+ @change=${(e: Event) => console.log((e.target as OxInputQuantifier).value)}
76
+ ?disabled=${disabled}
77
+ >
78
+ </ox-input-quantifier>
79
+ </div>
52
80
  `
53
81
 
54
82
  export const Regular = Template.bind({})
@@ -1,6 +1,7 @@
1
1
  import '../src/ox-input-range.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-range',
@@ -11,7 +12,8 @@ export default {
11
12
  step: { control: 'number' },
12
13
  min: { control: 'number' },
13
14
  max: { control: 'number' },
14
- disabled: { control: 'boolean' }
15
+ disabled: { control: 'boolean' },
16
+ theme: { control: 'select', options: ['light', 'dark'] }
15
17
  }
16
18
  }
17
19
 
@@ -28,6 +30,7 @@ interface ArgTypes {
28
30
  min?: number
29
31
  max?: number
30
32
  disabled?: boolean
33
+ theme?: string
31
34
  }
32
35
 
33
36
  const Template: Story<ArgTypes> = ({
@@ -36,9 +39,14 @@ const Template: Story<ArgTypes> = ({
36
39
  step = 1,
37
40
  min = 0,
38
41
  max = 100,
39
- disabled
42
+ disabled,
43
+ theme = 'light'
40
44
  }: ArgTypes) => html`
41
- <link href="/themes/app-theme.css" rel="stylesheet" />
45
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
46
+
47
+ <link href="/themes/light.css" rel="stylesheet" />
48
+ <link href="/themes/dark.css" rel="stylesheet" />
49
+ <link href="/themes/spacing.css" rel="stylesheet" />
42
50
 
43
51
  <link
44
52
  href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
@@ -53,8 +61,29 @@ const Template: Story<ArgTypes> = ({
53
61
  rel="stylesheet"
54
62
  />
55
63
 
56
- <ox-input-range name=${name} value=${value} step=${step} min=${min} max=${max} ?disabled=${disabled}>
57
- </ox-input-range>
64
+ <style>
65
+ ${MDTypeScaleStyles.cssText}
66
+ </style>
67
+
68
+ <style>
69
+ .container {
70
+ height: 500px;
71
+ text-align: center;
72
+ padding: 20px;
73
+
74
+ background-color: var(--md-sys-color-primary-container);
75
+ color: var(--md-sys-color-on-primary-container);
76
+ }
77
+ </style>
78
+
79
+ <script>
80
+ document.body.classList.add('${theme}')
81
+ </script>
82
+
83
+ <div class="container md-typescale-body-large-prominent">
84
+ <ox-input-range name=${name} value=${value} step=${step} min=${min} max=${max} ?disabled=${disabled}>
85
+ </ox-input-range>
86
+ </div>
58
87
  `
59
88
 
60
89
  export const Regular = Template.bind({})