@operato/input 7.0.0-rc.11 → 7.0.0-rc.13

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 (144) hide show
  1. package/.storybook/preview.js +52 -0
  2. package/CHANGELOG.md +11 -0
  3. package/dist/stories/ox-buttons-radio.stories.d.ts +0 -5
  4. package/dist/stories/ox-buttons-radio.stories.js +3 -9
  5. package/dist/stories/ox-buttons-radio.stories.js.map +1 -1
  6. package/dist/stories/ox-checkbox.stories.d.ts +0 -5
  7. package/dist/stories/ox-checkbox.stories.js +3 -9
  8. package/dist/stories/ox-checkbox.stories.js.map +1 -1
  9. package/dist/stories/ox-input-3axis.stories.d.ts +0 -5
  10. package/dist/stories/ox-input-3axis.stories.js +2 -7
  11. package/dist/stories/ox-input-3axis.stories.js.map +1 -1
  12. package/dist/stories/ox-input-3dish.stories.d.ts +0 -5
  13. package/dist/stories/ox-input-3dish.stories.js +2 -7
  14. package/dist/stories/ox-input-3dish.stories.js.map +1 -1
  15. package/dist/stories/ox-input-angle.stories.d.ts +0 -5
  16. package/dist/stories/ox-input-angle.stories.js +2 -7
  17. package/dist/stories/ox-input-angle.stories.js.map +1 -1
  18. package/dist/stories/ox-input-barcode.stories.d.ts +0 -5
  19. package/dist/stories/ox-input-barcode.stories.js +2 -7
  20. package/dist/stories/ox-input-barcode.stories.js.map +1 -1
  21. package/dist/stories/ox-input-code.stories.d.ts +0 -5
  22. package/dist/stories/ox-input-code.stories.js +2 -7
  23. package/dist/stories/ox-input-code.stories.js.map +1 -1
  24. package/dist/stories/ox-input-crontab.stories.d.ts +0 -5
  25. package/dist/stories/ox-input-crontab.stories.js +2 -7
  26. package/dist/stories/ox-input-crontab.stories.js.map +1 -1
  27. package/dist/stories/ox-input-data.stories.d.ts +0 -5
  28. package/dist/stories/ox-input-data.stories.js +2 -8
  29. package/dist/stories/ox-input-data.stories.js.map +1 -1
  30. package/dist/stories/ox-input-direction.stories.d.ts +0 -5
  31. package/dist/stories/ox-input-direction.stories.js +2 -7
  32. package/dist/stories/ox-input-direction.stories.js.map +1 -1
  33. package/dist/stories/ox-input-duration.stories.d.ts +0 -5
  34. package/dist/stories/ox-input-duration.stories.js +2 -7
  35. package/dist/stories/ox-input-duration.stories.js.map +1 -1
  36. package/dist/stories/ox-input-file.stories.d.ts +0 -5
  37. package/dist/stories/ox-input-file.stories.js +2 -7
  38. package/dist/stories/ox-input-file.stories.js.map +1 -1
  39. package/dist/stories/ox-input-hashtags.stories.d.ts +0 -5
  40. package/dist/stories/ox-input-hashtags.stories.js +2 -7
  41. package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
  42. package/dist/stories/ox-input-i18n-label.stories.d.ts +0 -5
  43. package/dist/stories/ox-input-i18n-label.stories.js +2 -7
  44. package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
  45. package/dist/stories/ox-input-key-values.stories.d.ts +0 -5
  46. package/dist/stories/ox-input-key-values.stories.js +2 -7
  47. package/dist/stories/ox-input-key-values.stories.js.map +1 -1
  48. package/dist/stories/ox-input-mass-fraction.stories.d.ts +0 -5
  49. package/dist/stories/ox-input-mass-fraction.stories.js +2 -7
  50. package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
  51. package/dist/stories/ox-input-multiple-colors.stories.d.ts +0 -5
  52. package/dist/stories/ox-input-multiple-colors.stories.js +2 -7
  53. package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
  54. package/dist/stories/ox-input-options.stories.d.ts +0 -5
  55. package/dist/stories/ox-input-options.stories.js +2 -7
  56. package/dist/stories/ox-input-options.stories.js.map +1 -1
  57. package/dist/stories/ox-input-partition-keys.stories.d.ts +0 -5
  58. package/dist/stories/ox-input-partition-keys.stories.js +2 -7
  59. package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
  60. package/dist/stories/ox-input-privilege.stories.d.ts +0 -5
  61. package/dist/stories/ox-input-privilege.stories.js +2 -7
  62. package/dist/stories/ox-input-privilege.stories.js.map +1 -1
  63. package/dist/stories/ox-input-quantifier.stories.d.ts +0 -5
  64. package/dist/stories/ox-input-quantifier.stories.js +2 -7
  65. package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
  66. package/dist/stories/ox-input-range.stories.d.ts +0 -5
  67. package/dist/stories/ox-input-range.stories.js +2 -7
  68. package/dist/stories/ox-input-range.stories.js.map +1 -1
  69. package/dist/stories/ox-input-search.stories.d.ts +0 -5
  70. package/dist/stories/ox-input-search.stories.js +2 -7
  71. package/dist/stories/ox-input-search.stories.js.map +1 -1
  72. package/dist/stories/ox-input-select-buttons.stories.d.ts +0 -5
  73. package/dist/stories/ox-input-select-buttons.stories.js +2 -7
  74. package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
  75. package/dist/stories/ox-input-table-column-config.stories.d.ts +0 -5
  76. package/dist/stories/ox-input-table-column-config.stories.js +2 -7
  77. package/dist/stories/ox-input-table-column-config.stories.js.map +1 -1
  78. package/dist/stories/ox-input-unit.stories.d.ts +0 -5
  79. package/dist/stories/ox-input-unit.stories.js +2 -7
  80. package/dist/stories/ox-input-unit.stories.js.map +1 -1
  81. package/dist/stories/ox-input-value-map.stories.d.ts +0 -5
  82. package/dist/stories/ox-input-value-map.stories.js +2 -7
  83. package/dist/stories/ox-input-value-map.stories.js.map +1 -1
  84. package/dist/stories/ox-input-value-ranges.stories.d.ts +0 -5
  85. package/dist/stories/ox-input-value-ranges.stories.js +2 -7
  86. package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
  87. package/dist/stories/ox-input-work-shift.stories.d.ts +0 -5
  88. package/dist/stories/ox-input-work-shift.stories.js +2 -7
  89. package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
  90. package/dist/stories/ox-select-set-options.stories.d.ts +0 -5
  91. package/dist/stories/ox-select-set-options.stories.js +2 -7
  92. package/dist/stories/ox-select-set-options.stories.js.map +1 -1
  93. package/dist/stories/ox-select.stories.d.ts +0 -5
  94. package/dist/stories/ox-select.stories.js +2 -7
  95. package/dist/stories/ox-select.stories.js.map +1 -1
  96. package/dist/tsconfig.tsbuildinfo +1 -1
  97. package/package.json +6 -6
  98. package/stories/ox-buttons-radio.stories.ts +3 -10
  99. package/stories/ox-checkbox.stories.ts +3 -12
  100. package/stories/ox-input-3axis.stories.ts +2 -8
  101. package/stories/ox-input-3dish.stories.ts +2 -8
  102. package/stories/ox-input-angle.stories.ts +2 -8
  103. package/stories/ox-input-barcode.stories.ts +2 -9
  104. package/stories/ox-input-code.stories.ts +2 -9
  105. package/stories/ox-input-crontab.stories.ts +2 -13
  106. package/stories/ox-input-data.stories.ts +2 -9
  107. package/stories/ox-input-direction.stories.ts +2 -8
  108. package/stories/ox-input-duration.stories.ts +2 -8
  109. package/stories/ox-input-file.stories.ts +2 -9
  110. package/stories/ox-input-hashtags.stories.ts +2 -14
  111. package/stories/ox-input-i18n-label.stories.ts +2 -8
  112. package/stories/ox-input-key-values.stories.ts +2 -14
  113. package/stories/ox-input-mass-fraction.stories.ts +2 -9
  114. package/stories/ox-input-multiple-colors.stories.ts +2 -8
  115. package/stories/ox-input-options.stories.ts +2 -8
  116. package/stories/ox-input-partition-keys.stories.ts +2 -13
  117. package/stories/ox-input-privilege.stories.ts +2 -14
  118. package/stories/ox-input-quantifier.stories.ts +2 -8
  119. package/stories/ox-input-range.stories.ts +2 -9
  120. package/stories/ox-input-search.stories.ts +2 -9
  121. package/stories/ox-input-select-buttons.stories.ts +2 -9
  122. package/stories/ox-input-table-column-config.stories.ts +2 -13
  123. package/stories/ox-input-unit.stories.ts +2 -9
  124. package/stories/ox-input-value-map.stories.ts +2 -9
  125. package/stories/ox-input-value-ranges.stories.ts +2 -9
  126. package/stories/ox-input-work-shift.stories.ts +2 -8
  127. package/stories/ox-select-set-options.stories.ts +2 -9
  128. package/stories/ox-select.stories.ts +2 -9
  129. package/themes/app-theme.css +138 -0
  130. package/themes/calendar-theme.css +59 -0
  131. package/themes/dark.css +0 -100
  132. package/themes/grist-theme.css +44 -40
  133. package/themes/layout-theme.css +94 -0
  134. package/themes/light.css +3 -103
  135. package/themes/material-theme.css +23 -0
  136. package/themes/oops-theme.css +22 -0
  137. package/themes/report-theme.css +47 -0
  138. package/themes/spacing.css +7 -27
  139. package/themes/state-color.css +1 -1
  140. package/themes/tooltip-theme.css +11 -0
  141. package/themes/dark-hc.css +0 -151
  142. package/themes/dark-mc.css +0 -151
  143. package/themes/light-hc.css +0 -151
  144. package/themes/light-mc.css +0 -151
@@ -9,8 +9,7 @@ export default {
9
9
  argTypes: {
10
10
  value: { control: 'object' },
11
11
  name: { control: 'text' },
12
- disabled: { control: 'boolean' },
13
- theme: { control: 'select', options: ['light', 'dark'] }
12
+ disabled: { control: 'boolean' }
14
13
  }
15
14
  }
16
15
 
@@ -24,10 +23,9 @@ interface ArgTypes {
24
23
  name?: string
25
24
  value?: object
26
25
  disabled?: boolean
27
- theme?: string
28
26
  }
29
27
 
30
- const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled, theme = 'light' }: ArgTypes) => html`
28
+ const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled }: ArgTypes) => html`
31
29
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
32
30
 
33
31
  <link href="/themes/light.css" rel="stylesheet" />
@@ -62,10 +60,6 @@ const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled, the
62
60
  }
63
61
  </style>
64
62
 
65
- <script>
66
- document.body.classList.add('${theme}')
67
- </script>
68
-
69
63
  <div class="container md-typescale-body-large-prominent">
70
64
  <ox-input-options
71
65
  @change=${(e: Event) => {
@@ -9,8 +9,7 @@ export default {
9
9
  argTypes: {
10
10
  value: { control: 'object' },
11
11
  name: { control: 'text' },
12
- disabled: { control: 'boolean' },
13
- theme: { control: 'select', options: ['light', 'dark'] }
12
+ disabled: { control: 'boolean' }
14
13
  }
15
14
  }
16
15
 
@@ -24,15 +23,9 @@ interface ArgTypes {
24
23
  name?: string
25
24
  value?: object
26
25
  disabled?: boolean
27
- theme?: string
28
26
  }
29
27
 
30
- const Template: Story<ArgTypes> = ({
31
- name = 'partition-keys',
32
- value = {},
33
- disabled,
34
- theme = 'light'
35
- }: ArgTypes) => html`
28
+ const Template: Story<ArgTypes> = ({ name = 'partition-keys', value = {}, disabled }: ArgTypes) => html`
36
29
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
37
30
 
38
31
  <link href="/themes/light.css" rel="stylesheet" />
@@ -67,10 +60,6 @@ const Template: Story<ArgTypes> = ({
67
60
  }
68
61
  </style>
69
62
 
70
- <script>
71
- document.body.classList.add('${theme}')
72
- </script>
73
-
74
63
  <div class="container md-typescale-body-large-prominent">
75
64
  <ox-input-partition-keys
76
65
  @change=${(e: Event) => {
@@ -10,8 +10,7 @@ export default {
10
10
  argTypes: {
11
11
  value: { control: 'number' },
12
12
  name: { control: 'text' },
13
- disabled: { control: 'boolean' },
14
- theme: { control: 'select', options: ['light', 'dark'] }
13
+ disabled: { control: 'boolean' }
15
14
  }
16
15
  }
17
16
 
@@ -31,16 +30,9 @@ interface ArgTypes {
31
30
  super: boolean
32
31
  } | null
33
32
  disabled?: boolean
34
- theme?: string
35
33
  }
36
34
 
37
- const Template: Story<ArgTypes> = ({
38
- name = 'privilege',
39
- value = null,
40
- privileges,
41
- disabled,
42
- theme = 'light'
43
- }: ArgTypes) => html`
35
+ const Template: Story<ArgTypes> = ({ name = 'privilege', value = null, privileges, disabled }: ArgTypes) => html`
44
36
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
45
37
 
46
38
  <link href="/themes/light.css" rel="stylesheet" />
@@ -75,10 +67,6 @@ const Template: Story<ArgTypes> = ({
75
67
  }
76
68
  </style>
77
69
 
78
- <script>
79
- document.body.classList.add('${theme}')
80
- </script>
81
-
82
70
  <div class="container md-typescale-body-large-prominent">
83
71
  <locale-picker></locale-picker>
84
72
  <br /><br />
@@ -11,8 +11,7 @@ export default {
11
11
  argTypes: {
12
12
  name: { control: 'text' },
13
13
  value: { control: 'array' },
14
- disabled: { control: 'boolean' },
15
- theme: { control: 'select', options: ['light', 'dark'] }
14
+ disabled: { control: 'boolean' }
16
15
  }
17
16
  }
18
17
 
@@ -26,10 +25,9 @@ interface ArgTypes {
26
25
  name?: string
27
26
  value?: number[]
28
27
  disabled?: boolean
29
- theme?: string
30
28
  }
31
29
 
32
- const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled, theme = 'light' }: ArgTypes) => html`
30
+ const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled }: ArgTypes) => html`
33
31
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
34
32
 
35
33
  <link href="/themes/light.css" rel="stylesheet" />
@@ -64,10 +62,6 @@ const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled, theme
64
62
  }
65
63
  </style>
66
64
 
67
- <script>
68
- document.body.classList.add('${theme}')
69
- </script>
70
-
71
65
  <div class="container md-typescale-body-large-prominent">
72
66
  <ox-input-quantifier
73
67
  name=${name}
@@ -12,8 +12,7 @@ export default {
12
12
  step: { control: 'number' },
13
13
  min: { control: 'number' },
14
14
  max: { control: 'number' },
15
- disabled: { control: 'boolean' },
16
- theme: { control: 'select', options: ['light', 'dark'] }
15
+ disabled: { control: 'boolean' }
17
16
  }
18
17
  }
19
18
 
@@ -30,7 +29,6 @@ interface ArgTypes {
30
29
  min?: number
31
30
  max?: number
32
31
  disabled?: boolean
33
- theme?: string
34
32
  }
35
33
 
36
34
  const Template: Story<ArgTypes> = ({
@@ -39,8 +37,7 @@ const Template: Story<ArgTypes> = ({
39
37
  step = 1,
40
38
  min = 0,
41
39
  max = 100,
42
- disabled,
43
- theme = 'light'
40
+ disabled
44
41
  }: ArgTypes) => html`
45
42
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
46
43
 
@@ -76,10 +73,6 @@ const Template: Story<ArgTypes> = ({
76
73
  }
77
74
  </style>
78
75
 
79
- <script>
80
- document.body.classList.add('${theme}')
81
- </script>
82
-
83
76
  <div class="container md-typescale-body-large-prominent">
84
77
  <ox-input-range name=${name} value=${value} step=${step} min=${min} max=${max} ?disabled=${disabled}>
85
78
  </ox-input-range>
@@ -12,8 +12,7 @@ export default {
12
12
  name: { control: 'text' },
13
13
  value: { control: 'text' },
14
14
  selectAfterChange: { control: 'boolean' },
15
- disabled: { control: 'boolean' },
16
- theme: { control: 'select', options: ['light', 'dark'] }
15
+ disabled: { control: 'boolean' }
17
16
  }
18
17
  }
19
18
 
@@ -29,7 +28,6 @@ interface ArgTypes {
29
28
  value?: string
30
29
  selectAfterChange?: boolean
31
30
  disabled?: boolean
32
- theme?: string
33
31
  }
34
32
 
35
33
  const Template: Story<ArgTypes> = ({
@@ -37,8 +35,7 @@ const Template: Story<ArgTypes> = ({
37
35
  name = 'hello',
38
36
  value = '',
39
37
  selectAfterChange,
40
- disabled,
41
- theme = 'light'
38
+ disabled
42
39
  }: ArgTypes) => html`
43
40
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
44
41
 
@@ -74,10 +71,6 @@ const Template: Story<ArgTypes> = ({
74
71
  }
75
72
  </style>
76
73
 
77
- <script>
78
- document.body.classList.add('${theme}')
79
- </script>
80
-
81
74
  <div class="container md-typescale-body-large-prominent">
82
75
  <ox-input-search
83
76
  @change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}
@@ -11,8 +11,7 @@ export default {
11
11
  options: { control: 'object' },
12
12
  multiple: { control: 'boolean' },
13
13
  name: { control: 'text' },
14
- disabled: { control: 'boolean' },
15
- theme: { control: 'select', options: ['light', 'dark'] }
14
+ disabled: { control: 'boolean' }
16
15
  }
17
16
  }
18
17
 
@@ -28,7 +27,6 @@ interface ArgTypes {
28
27
  options: object
29
28
  multiple?: boolean
30
29
  disabled?: boolean
31
- theme?: string
32
30
  }
33
31
 
34
32
  const Template: Story<ArgTypes> = ({
@@ -36,8 +34,7 @@ const Template: Story<ArgTypes> = ({
36
34
  value,
37
35
  multiple = false,
38
36
  options = [],
39
- disabled,
40
- theme = 'light'
37
+ disabled
41
38
  }: ArgTypes) => html`
42
39
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
43
40
 
@@ -73,10 +70,6 @@ const Template: Story<ArgTypes> = ({
73
70
  }
74
71
  </style>
75
72
 
76
- <script>
77
- document.body.classList.add('${theme}')
78
- </script>
79
-
80
73
  <div class="container">
81
74
  <ox-input-select-buttons
82
75
  @change=${(e: Event) => {
@@ -9,8 +9,7 @@ export default {
9
9
  argTypes: {
10
10
  name: { control: 'text' },
11
11
  value: { control: 'object' },
12
- disabled: { control: 'boolean' },
13
- theme: { control: 'select', options: ['light', 'dark'] }
12
+ disabled: { control: 'boolean' }
14
13
  }
15
14
  }
16
15
 
@@ -24,15 +23,9 @@ interface ArgTypes {
24
23
  name?: string
25
24
  value?: object
26
25
  disabled?: boolean
27
- theme?: string
28
26
  }
29
27
 
30
- const Template: Story<ArgTypes> = ({
31
- name = 'table-column-config',
32
- value = {},
33
- disabled,
34
- theme = 'light'
35
- }: ArgTypes) => html`
28
+ const Template: Story<ArgTypes> = ({ name = 'table-column-config', value = {}, disabled }: ArgTypes) => html`
36
29
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
37
30
 
38
31
  <link href="/themes/light.css" rel="stylesheet" />
@@ -67,10 +60,6 @@ const Template: Story<ArgTypes> = ({
67
60
  }
68
61
  </style>
69
62
 
70
- <script>
71
- document.body.classList.add('${theme}')
72
- </script>
73
-
74
63
  <div class="container md-typescale-body-large-prominent">
75
64
  <ox-input-table-column-config
76
65
  @change=${(e: Event) => {
@@ -42,8 +42,7 @@ export default {
42
42
  'K'
43
43
  ]
44
44
  },
45
- disabled: { control: 'boolean' },
46
- theme: { control: 'select', options: ['light', 'dark'] }
45
+ disabled: { control: 'boolean' }
47
46
  }
48
47
  }
49
48
 
@@ -60,7 +59,6 @@ interface ArgTypes {
60
59
  stdUnit: string
61
60
  userUnit: string
62
61
  disabled?: boolean
63
- theme?: string
64
62
  }
65
63
 
66
64
  const Template: Story<ArgTypes> = ({
@@ -69,8 +67,7 @@ const Template: Story<ArgTypes> = ({
69
67
  value = 0,
70
68
  stdUnit = 'kg',
71
69
  userUnit,
72
- disabled,
73
- theme = 'light'
70
+ disabled
74
71
  }: ArgTypes) => html`
75
72
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
76
73
 
@@ -106,10 +103,6 @@ const Template: Story<ArgTypes> = ({
106
103
  }
107
104
  </style>
108
105
 
109
- <script>
110
- document.body.classList.add('${theme}')
111
- </script>
112
-
113
106
  <div class="container md-typescale-body-large-prominent">
114
107
  <ox-input-unit-number
115
108
  name=${name}
@@ -11,8 +11,7 @@ export default {
11
11
  value: { control: 'object' },
12
12
  keytype: { control: 'select', options: ['string', 'number'] },
13
13
  valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
14
- disabled: { control: 'boolean' },
15
- theme: { control: 'select', options: ['light', 'dark'] }
14
+ disabled: { control: 'boolean' }
16
15
  }
17
16
  }
18
17
 
@@ -28,7 +27,6 @@ interface ArgTypes {
28
27
  valuetype?: string
29
28
  keytype?: string
30
29
  disabled?: boolean
31
- theme?: string
32
30
  }
33
31
 
34
32
  const Template: Story<ArgTypes> = ({
@@ -36,8 +34,7 @@ const Template: Story<ArgTypes> = ({
36
34
  value = {},
37
35
  keytype = 'string',
38
36
  valuetype = 'string',
39
- disabled,
40
- theme = 'light'
37
+ disabled
41
38
  }: ArgTypes) => html`
42
39
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
43
40
 
@@ -73,10 +70,6 @@ const Template: Story<ArgTypes> = ({
73
70
  }
74
71
  </style>
75
72
 
76
- <script>
77
- document.body.classList.add('${theme}')
78
- </script>
79
-
80
73
  <div class="container md-typescale-body-large-prominent">
81
74
  <ox-input-value-map
82
75
  @change=${(e: Event) => {
@@ -11,8 +11,7 @@ export default {
11
11
  value: { control: 'object' },
12
12
  keytype: { control: 'select', options: ['string', 'number'] },
13
13
  valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
14
- disabled: { control: 'boolean' },
15
- theme: { control: 'select', options: ['light', 'dark'] }
14
+ disabled: { control: 'boolean' }
16
15
  }
17
16
  }
18
17
 
@@ -28,7 +27,6 @@ interface ArgTypes {
28
27
  valuetype?: string
29
28
  keytype?: string
30
29
  disabled?: boolean
31
- theme?: string
32
30
  }
33
31
 
34
32
  const Template: Story<ArgTypes> = ({
@@ -36,8 +34,7 @@ const Template: Story<ArgTypes> = ({
36
34
  value = {},
37
35
  keytype = 'string',
38
36
  valuetype = 'string',
39
- disabled,
40
- theme = 'light'
37
+ disabled
41
38
  }: ArgTypes) => html`
42
39
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
43
40
 
@@ -73,10 +70,6 @@ const Template: Story<ArgTypes> = ({
73
70
  }
74
71
  </style>
75
72
 
76
- <script>
77
- document.body.classList.add('${theme}')
78
- </script>
79
-
80
73
  <div class="container md-typescale-body-large-prominent">
81
74
  <ox-input-value-ranges
82
75
  @change=${(e: Event) => {
@@ -10,8 +10,7 @@ export default {
10
10
  argTypes: {
11
11
  value: { control: 'object' },
12
12
  name: { control: 'text' },
13
- disabled: { control: 'boolean' },
14
- theme: { control: 'select', options: ['light', 'dark'] }
13
+ disabled: { control: 'boolean' }
15
14
  }
16
15
  }
17
16
 
@@ -25,10 +24,9 @@ interface ArgTypes {
25
24
  name?: string
26
25
  value?: object
27
26
  disabled?: boolean
28
- theme?: string
29
27
  }
30
28
 
31
- const Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], disabled, theme = 'light' }: ArgTypes) => html`
29
+ const Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], disabled }: ArgTypes) => html`
32
30
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
33
31
 
34
32
  <link href="/themes/light.css" rel="stylesheet" />
@@ -63,10 +61,6 @@ const Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], disabled,
63
61
  }
64
62
  </style>
65
63
 
66
- <script>
67
- document.body.classList.add('${theme}')
68
- </script>
69
-
70
64
  <div class="container md-typescale-body-large-prominent">
71
65
  <locale-picker></locale-picker>
72
66
  <br /><br />
@@ -14,8 +14,7 @@ export default {
14
14
  options: { control: 'object' },
15
15
  multiple: { control: 'boolean' },
16
16
  withSearch: { control: 'boolean' },
17
- disabled: { control: 'boolean' },
18
- theme: { control: 'select', options: ['light', 'dark'] }
17
+ disabled: { control: 'boolean' }
19
18
  }
20
19
  }
21
20
 
@@ -33,7 +32,6 @@ interface ArgTypes {
33
32
  multiple?: boolean
34
33
  withSearch?: boolean
35
34
  disabled?: boolean
36
- theme?: string
37
35
  }
38
36
 
39
37
  const Template: Story<ArgTypes> = ({
@@ -43,8 +41,7 @@ const Template: Story<ArgTypes> = ({
43
41
  options = [],
44
42
  multiple,
45
43
  withSearch,
46
- disabled,
47
- theme = 'light'
44
+ disabled
48
45
  }: ArgTypes) => html`
49
46
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
50
47
 
@@ -80,10 +77,6 @@ const Template: Story<ArgTypes> = ({
80
77
  }
81
78
  </style>
82
79
 
83
- <script>
84
- document.body.classList.add('${theme}')
85
- </script>
86
-
87
80
  <div class="container md-typescale-body-large-prominent">
88
81
  <ox-select
89
82
  name=${name}
@@ -10,8 +10,7 @@ export default {
10
10
  argTypes: {
11
11
  placeholder: { control: 'text' },
12
12
  name: { control: 'text' },
13
- disabled: { control: 'boolean' },
14
- theme: { control: 'select', options: ['light', 'dark'] }
13
+ disabled: { control: 'boolean' }
15
14
  }
16
15
  }
17
16
 
@@ -27,7 +26,6 @@ interface ArgTypes {
27
26
  value?: object | string
28
27
  slot?: TemplateResult
29
28
  disabled?: boolean
30
- theme?: string
31
29
  }
32
30
 
33
31
  const Template: Story<ArgTypes> = ({
@@ -35,8 +33,7 @@ const Template: Story<ArgTypes> = ({
35
33
  name = 'hello',
36
34
  value = '',
37
35
  slot,
38
- disabled,
39
- theme = 'light'
36
+ disabled
40
37
  }: ArgTypes) => html`
41
38
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
42
39
 
@@ -72,10 +69,6 @@ const Template: Story<ArgTypes> = ({
72
69
  }
73
70
  </style>
74
71
 
75
- <script>
76
- document.body.classList.add('${theme}')
77
- </script>
78
-
79
72
  <div class="container md-typescale-body-large-prominent">
80
73
  <ox-select
81
74
  name=${name}
@@ -0,0 +1,138 @@
1
+ body {
2
+ /* theme color */
3
+ --primary-color: var(--md-sys-color-primary);
4
+ --secondary-color: var(--md-sys-color-secondary);
5
+ --focus-color: var(--md-sys-color-on-primary);
6
+ --primary-background-color: var(--md-sys-color-primary-container);
7
+ --secondary-background-color: var(--md-sys-color-secondary-container);
8
+
9
+ --focus-background-color: var(--md-sys-color-primary);
10
+ --primary-text-color: var(--md-sys-color-on-primary);
11
+ --secondary-text-color: var(--md-sys-color-on-secondary);
12
+
13
+ /* common style */
14
+ --border-radius: 4px;
15
+ --border-dim-color: 1px solid rgba(0, 0, 0, 0.15);
16
+ --border-light-color: 1px solid rgba(255, 255, 255, 0.3);
17
+
18
+ --box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
19
+
20
+ --theme-font: 'Noto', Helvetica;
21
+
22
+ --margin-default: var(--spacing-medium, 8px);
23
+ --margin-narrow: var(--spacing-small, 4px);
24
+ --margin-wide: var(--spacing-large, 12px);
25
+ --padding-default: var(--spacing-medium, 8px);
26
+ --padding-narrow: var(--spacing-small, 4px);
27
+ --padding-wide: var(--spacing-large, 12px);
28
+
29
+ --scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
30
+ --scrollbar-thumb-hover-color: var(--md-sys-color-primary);
31
+
32
+ --fontsize-default: 14px;
33
+ --fontsize-small: 13px;
34
+ --fontsize-large: 16px;
35
+
36
+ /* app layout style */
37
+ --app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
38
+
39
+ /* title & description style */
40
+ --title-margin: var(--margin-narrow) 0;
41
+ --title-font: bold 24px var(--theme-font);
42
+ --title-text-color: var(--md-sys-color-secondary);
43
+ --title-font-mobile: bold 20px var(--theme-font);
44
+
45
+ --page-description-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
46
+ --page-description-font: normal var(--fontsize-default) / 1.2rem var(--theme-font);
47
+ --page-description-color: var(--md-sys-color-primary);
48
+
49
+ --subtitle-padding: 12px 5px 3px 5px;
50
+ --subtitle-font: bold 18px var(--theme-font);
51
+ --subtitle-text-color: var(--md-sys-color-primary);
52
+ --subtitle-border-bottom: 1px solid var(--md-sys-color-primary);
53
+
54
+ /* icon style */
55
+ --icon-tiny-size: var(--icon-size-medium, 24px);
56
+ --icon-default-size: var(--icon-size-large, 32px);
57
+ --icon-big-size: var(--icon-size-huge, 48px);
58
+ --icon-default-color: var(--md-sys-color-on-primary);
59
+
60
+ /* material design component themes */
61
+ --mdc-theme-on-primary: var(--md-sys-color-on-primary);
62
+ --mdc-theme-primary: var(--secondary-text-color);
63
+ --mdc-theme-on-secondary: var(--md-sys-color-on-primary);
64
+ --mdc-theme-secondary: var(--md-sys-color-primary);
65
+ --mdc-button-outline-color: var(--md-sys-color-primary);
66
+ --mdc-danger-button-primary-color: var(--status-danger-color);
67
+ --mdc-danger-button-outline-color: var(--status-danger-color);
68
+ --mdc-button-outline-width: 1px;
69
+ --mdc-button-horizontal-padding: 16px;
70
+
71
+ /* button style */
72
+ --button-background-color: var(--md-sys-color-surface-variant);
73
+ --button-background-focus-color: var(--md-sys-color-primary);
74
+ --button-border: var(--border-dim-color);
75
+ --button-border-radius: var(--border-radius);
76
+ --button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
77
+ --button-padding: calc(var(--padding-narrow) * 1.5) var(--padding-wide);
78
+ --button-color: var(--md-sys-color-secondary);
79
+ --button-font: 600 var(--fontsize-default) var(--theme-font);
80
+ --button-text-transform: capitalize;
81
+ --button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
82
+ --button-activ-border: 1px solid var(--md-sys-color-primary);
83
+ --button-activ-background-color: var(--md-sys-color-primary);
84
+ --button-activ-color: var(--md-sys-color-on-primary);
85
+ --iconbtn-padding: var(--padding-narrow);
86
+
87
+ --button-primary-background-color: var(--md-sys-color-primary);
88
+ --button-primary-active-background-color: var(--status-success-color);
89
+ --button-primary-padding: var(--margin-default) var(--margin-wide);
90
+ --button-primary-color: var(--md-sys-color-on-primary);
91
+ --button-primary-font: bold 16px var(--theme-font);
92
+
93
+ /* table style */
94
+ --th-padding: var(--padding-default);
95
+ --th-border-top: 2px solid var(--md-sys-color-secondary);
96
+ --th-text-transform: capitalize;
97
+ --th-font: bold var(--fontsize-small) var(--theme-font);
98
+ --th-color: var(--md-sys-color-secondary);
99
+
100
+ --tr-background-color: var(--md-sys-color-surface-variant);
101
+ --tr-background-odd-color: rgba(255, 255, 255, 0.4);
102
+ --tr-background-hover-color: #e1f5fe;
103
+ --td-border-line: 1px solid rgba(0, 0, 0, 0.05);
104
+ --td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
105
+ --td-padding: var(--padding-default);
106
+ --td-font: normal 13px var(--theme-font);
107
+ --td-color: var(--md-sys-color-secondary);
108
+
109
+ --label-cell-background-color: var(--md-sys-color-surface); /* th or td common background color */
110
+
111
+ /* form style */
112
+ --label-font: normal var(--fontsize-default) var(--theme-font);
113
+ --label-color: var(--md-sys-color-on-surface);
114
+ --label-text-transform: capitalize;
115
+ --input-margin: var(--margin-narrow) 0;
116
+ --input-padding: 6px 2px;
117
+ --input-min-width: 200px;
118
+ --input-font: normal var(--fontsize-default) var(--theme-font);
119
+ --input-hint-font: normal var(--fontsize-small) var(--theme-font);
120
+ --input-hint-color: #666;
121
+ --input-container-max-width: 900px;
122
+ --fieldset-margin: var(--padding-wide) 0;
123
+ --fieldset-padding: 0 var(--padding-wide) var(--padding-wide) var(--padding-wide);
124
+ --legend-padding: var(--padding-default) 0;
125
+ --legend-color: var(--md-sys-color-secondary);
126
+ --legend-font: bold 16px var(--theme-font);
127
+ }
128
+
129
+ body.dark {
130
+ caret-color: white;
131
+ }
132
+
133
+ @media only screen and (max-width: 460px) {
134
+ body {
135
+ /* subtitle style */
136
+ --subtitle-margin: 0;
137
+ }
138
+ }