@operato/input 1.0.0-beta.8 → 1.0.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 (186) hide show
  1. package/.storybook/main.js +2 -2
  2. package/.storybook/server.mjs +4 -4
  3. package/CHANGELOG.md +416 -0
  4. package/demo/index-multiple-colors.html +4 -1
  5. package/demo/index-partition-keys.html +2 -5
  6. package/demo/index-select.html +1 -1
  7. package/demo/index.html +4 -0
  8. package/dist/src/index.d.ts +4 -2
  9. package/dist/src/index.js +4 -2
  10. package/dist/src/index.js.map +1 -1
  11. package/dist/src/locales/en.d.ts +8 -0
  12. package/dist/src/locales/en.js +8 -0
  13. package/dist/src/locales/en.js.map +1 -1
  14. package/dist/src/locales/ko.d.ts +8 -0
  15. package/dist/src/locales/ko.js +8 -0
  16. package/dist/src/locales/ko.js.map +1 -1
  17. package/dist/src/locales/ms.d.ts +8 -0
  18. package/dist/src/locales/ms.js +8 -0
  19. package/dist/src/locales/ms.js.map +1 -1
  20. package/dist/src/locales/zh.d.ts +8 -0
  21. package/dist/src/locales/zh.js +8 -0
  22. package/dist/src/locales/zh.js.map +1 -1
  23. package/dist/src/ox-input-3dish.js +24 -8
  24. package/dist/src/ox-input-3dish.js.map +1 -1
  25. package/dist/src/ox-input-barcode.d.ts +5 -2
  26. package/dist/src/ox-input-barcode.js +61 -31
  27. package/dist/src/ox-input-barcode.js.map +1 -1
  28. package/dist/src/ox-input-color.js +16 -11
  29. package/dist/src/ox-input-color.js.map +1 -1
  30. package/dist/src/ox-input-crontab.js +28 -10
  31. package/dist/src/ox-input-crontab.js.map +1 -1
  32. package/dist/src/ox-input-data.js +1 -1
  33. package/dist/src/ox-input-data.js.map +1 -1
  34. package/dist/src/ox-input-duration.d.ts +13 -0
  35. package/dist/src/ox-input-duration.js +163 -0
  36. package/dist/src/ox-input-duration.js.map +1 -0
  37. package/dist/src/ox-input-file.js +5 -3
  38. package/dist/src/ox-input-file.js.map +1 -1
  39. package/dist/src/ox-input-key-values.d.ts +41 -0
  40. package/dist/src/ox-input-key-values.js +233 -0
  41. package/dist/src/ox-input-key-values.js.map +1 -0
  42. package/dist/src/ox-input-multiple-colors.d.ts +1 -0
  43. package/dist/src/ox-input-multiple-colors.js +29 -21
  44. package/dist/src/ox-input-multiple-colors.js.map +1 -1
  45. package/dist/src/ox-input-options.d.ts +1 -0
  46. package/dist/src/ox-input-options.js +55 -14
  47. package/dist/src/ox-input-options.js.map +1 -1
  48. package/dist/src/ox-input-partition-keys.d.ts +1 -0
  49. package/dist/src/ox-input-partition-keys.js +51 -23
  50. package/dist/src/ox-input-partition-keys.js.map +1 -1
  51. package/dist/src/ox-input-quantifier.d.ts +11 -0
  52. package/dist/src/ox-input-quantifier.js +67 -0
  53. package/dist/src/ox-input-quantifier.js.map +1 -0
  54. package/dist/src/ox-input-range.js +35 -38
  55. package/dist/src/ox-input-range.js.map +1 -1
  56. package/dist/src/ox-input-search.d.ts +1 -0
  57. package/dist/src/ox-input-search.js +27 -3
  58. package/dist/src/ox-input-search.js.map +1 -1
  59. package/dist/src/ox-input-unit.d.ts +17 -0
  60. package/dist/src/ox-input-unit.js +122 -0
  61. package/dist/src/ox-input-unit.js.map +1 -0
  62. package/dist/src/ox-input-value-map.d.ts +2 -2
  63. package/dist/src/ox-input-value-map.js +51 -15
  64. package/dist/src/ox-input-value-map.js.map +1 -1
  65. package/dist/src/ox-input-value-ranges.d.ts +2 -2
  66. package/dist/src/ox-input-value-ranges.js +50 -23
  67. package/dist/src/ox-input-value-ranges.js.map +1 -1
  68. package/dist/src/ox-input-work-shift.js +79 -44
  69. package/dist/src/ox-input-work-shift.js.map +1 -1
  70. package/dist/src/ox-select.js +12 -3
  71. package/dist/src/ox-select.js.map +1 -1
  72. package/dist/stories/ox-checkbox.stories.d.ts +39 -0
  73. package/dist/stories/ox-checkbox.stories.js +44 -0
  74. package/dist/stories/ox-checkbox.stories.js.map +1 -0
  75. package/dist/stories/ox-input-3dish.stories.d.ts +26 -0
  76. package/dist/stories/ox-input-3dish.stories.js +59 -0
  77. package/dist/stories/ox-input-3dish.stories.js.map +1 -0
  78. package/dist/stories/ox-input-barcode.stories.d.ts +43 -0
  79. package/dist/stories/ox-input-barcode.stories.js +59 -0
  80. package/dist/stories/ox-input-barcode.stories.js.map +1 -0
  81. package/dist/stories/ox-input-crontab.stories.d.ts +25 -0
  82. package/dist/stories/ox-input-crontab.stories.js +35 -0
  83. package/dist/stories/ox-input-crontab.stories.js.map +1 -0
  84. package/dist/stories/ox-input-duration.stories.d.ts +26 -0
  85. package/dist/stories/ox-input-duration.stories.js +37 -0
  86. package/dist/stories/ox-input-duration.stories.js.map +1 -0
  87. package/dist/stories/ox-input-file.stories.d.ts +49 -0
  88. package/dist/stories/ox-input-file.stories.js +48 -0
  89. package/dist/stories/ox-input-file.stories.js.map +1 -0
  90. package/dist/stories/{index.stories.d.ts → ox-input-key-values.stories.d.ts} +7 -11
  91. package/dist/stories/ox-input-key-values.stories.js +49 -0
  92. package/dist/stories/ox-input-key-values.stories.js.map +1 -0
  93. package/dist/stories/ox-input-multiple-colors.stories.d.ts +20 -0
  94. package/dist/stories/ox-input-multiple-colors.stories.js +167 -0
  95. package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -0
  96. package/dist/stories/ox-input-options.stories.d.ts +25 -0
  97. package/dist/stories/ox-input-options.stories.js +33 -0
  98. package/dist/stories/ox-input-options.stories.js.map +1 -0
  99. package/dist/stories/ox-input-partition-keys.stories.d.ts +25 -0
  100. package/dist/stories/ox-input-partition-keys.stories.js +37 -0
  101. package/dist/stories/ox-input-partition-keys.stories.js.map +1 -0
  102. package/dist/stories/ox-input-quantifier.stories.d.ts +25 -0
  103. package/dist/stories/ox-input-quantifier.stories.js +27 -0
  104. package/dist/stories/ox-input-quantifier.stories.js.map +1 -0
  105. package/dist/stories/ox-input-range.stories.d.ts +37 -0
  106. package/dist/stories/ox-input-range.stories.js +28 -0
  107. package/dist/stories/ox-input-range.stories.js.map +1 -0
  108. package/dist/stories/ox-input-search.stories.d.ts +33 -0
  109. package/dist/stories/ox-input-search.stories.js +35 -0
  110. package/dist/stories/ox-input-search.stories.js.map +1 -0
  111. package/dist/stories/ox-input-unit.stories.d.ts +40 -0
  112. package/dist/stories/ox-input-unit.stories.js +42 -0
  113. package/dist/stories/ox-input-unit.stories.js.map +1 -0
  114. package/dist/stories/ox-input-value-map.stories.d.ts +35 -0
  115. package/dist/stories/ox-input-value-map.stories.js +37 -0
  116. package/dist/stories/ox-input-value-map.stories.js.map +1 -0
  117. package/dist/stories/ox-input-value-ranges.stories.d.ts +35 -0
  118. package/dist/stories/ox-input-value-ranges.stories.js +37 -0
  119. package/dist/stories/ox-input-value-ranges.stories.js.map +1 -0
  120. package/dist/stories/ox-input-work-shift.stories.d.ts +26 -0
  121. package/dist/stories/ox-input-work-shift.stories.js +59 -0
  122. package/dist/stories/ox-input-work-shift.stories.js.map +1 -0
  123. package/dist/stories/ox-select.stories.d.ts +30 -0
  124. package/dist/stories/ox-select.stories.js +83 -0
  125. package/dist/stories/ox-select.stories.js.map +1 -0
  126. package/dist/tsconfig.tsbuildinfo +1 -1
  127. package/package.json +16 -13
  128. package/src/index.ts +4 -2
  129. package/src/locales/en.ts +8 -0
  130. package/src/locales/ko.ts +8 -0
  131. package/src/locales/ms.ts +8 -0
  132. package/src/locales/zh.ts +8 -0
  133. package/src/ox-input-3dish.ts +24 -8
  134. package/src/ox-input-barcode.ts +67 -34
  135. package/src/ox-input-color.ts +17 -11
  136. package/src/ox-input-crontab.ts +30 -10
  137. package/src/ox-input-data.ts +2 -2
  138. package/src/ox-input-duration.ts +168 -0
  139. package/src/ox-input-file.ts +7 -6
  140. package/src/ox-input-key-values.ts +270 -0
  141. package/src/ox-input-multiple-colors.ts +29 -21
  142. package/src/ox-input-options.ts +54 -13
  143. package/src/ox-input-partition-keys.ts +51 -22
  144. package/src/ox-input-quantifier.ts +62 -0
  145. package/src/ox-input-range.ts +35 -38
  146. package/src/ox-input-search.ts +29 -3
  147. package/src/ox-input-unit.ts +123 -0
  148. package/src/ox-input-value-map.ts +52 -16
  149. package/src/ox-input-value-ranges.ts +52 -25
  150. package/src/ox-input-work-shift.ts +81 -44
  151. package/src/ox-select.ts +19 -5
  152. package/stories/ox-checkbox.stories.ts +69 -0
  153. package/stories/ox-input-3dish.stories.ts +73 -0
  154. package/stories/ox-input-barcode.stories.ts +85 -0
  155. package/stories/ox-input-code.stories.ts_ +51 -0
  156. package/stories/ox-input-crontab.stories.ts +49 -0
  157. package/stories/ox-input-duration.stories.ts +51 -0
  158. package/stories/ox-input-file.stories.ts +77 -0
  159. package/stories/ox-input-key-values.stories.ts +64 -0
  160. package/stories/ox-input-multiple-colors.stories.ts +178 -0
  161. package/stories/ox-input-options.stories.ts +47 -0
  162. package/stories/ox-input-partition-keys.stories.ts +51 -0
  163. package/stories/ox-input-quantifier.stories.ts +43 -0
  164. package/stories/ox-input-range.stories.ts +45 -0
  165. package/stories/ox-input-search.stories.ts +56 -0
  166. package/stories/ox-input-unit.stories.ts +66 -0
  167. package/stories/ox-input-value-map.stories.ts +58 -0
  168. package/stories/ox-input-value-ranges.stories.ts +58 -0
  169. package/stories/ox-input-work-shift.stories.ts +73 -0
  170. package/stories/ox-select.stories.ts +101 -0
  171. package/themes/app-theme.css +142 -0
  172. package/themes/input-theme.css +19 -0
  173. package/translations/en.json +45 -1
  174. package/translations/ko.json +43 -1
  175. package/translations/ms.json +43 -1
  176. package/translations/zh.json +43 -1
  177. package/xliff/en.xlf +24 -0
  178. package/xliff/ko.xlf +32 -0
  179. package/xliff/ms.xlf +24 -0
  180. package/xliff/zh.xlf +24 -0
  181. package/dist/src/ox-input-id.d.ts +0 -11
  182. package/dist/src/ox-input-id.js +0 -68
  183. package/dist/src/ox-input-id.js.map +0 -1
  184. package/dist/stories/index.stories.js +0 -33
  185. package/dist/stories/index.stories.js.map +0 -1
  186. package/stories/index.stories.ts +0 -52
@@ -0,0 +1,56 @@
1
+ import '../src/ox-input-search.js'
2
+
3
+ import { html, TemplateResult } from 'lit'
4
+
5
+ export default {
6
+ title: 'ox-input-search',
7
+ component: 'ox-input-search',
8
+ argTypes: {
9
+ placeholder: { control: 'text' },
10
+ name: { control: 'text' },
11
+ value: { control: 'text' },
12
+ selectAfterChange: { control: 'boolean' }
13
+ }
14
+ }
15
+
16
+ interface Story<T> {
17
+ (args: T): TemplateResult
18
+ args?: Partial<T>
19
+ argTypes?: Record<string, unknown>
20
+ }
21
+
22
+ interface ArgTypes {
23
+ placeholder?: string
24
+ name?: string
25
+ value?: string
26
+ selectAfterChange?: boolean
27
+ }
28
+
29
+ const Template: Story<ArgTypes> = ({
30
+ placeholder = 'Search',
31
+ name = 'hello',
32
+ value = '',
33
+ selectAfterChange
34
+ }: ArgTypes) => html`
35
+ <link href="/themes/app-theme.css" rel="stylesheet" />
36
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
37
+ <style>
38
+ body {
39
+ }
40
+ </style>
41
+
42
+ <ox-input-search
43
+ @change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}
44
+ ?select-after-change=${selectAfterChange}
45
+ name=${name}
46
+ .checked=${value}
47
+ >
48
+ </ox-input-search>
49
+ `
50
+
51
+ export const Regular = Template.bind({})
52
+ Regular.args = {
53
+ placeholder: 'label',
54
+ name: 'label',
55
+ selectAfterChange: false
56
+ }
@@ -0,0 +1,66 @@
1
+ import '../src/ox-input-unit.js'
2
+
3
+ import { html, TemplateResult } from 'lit'
4
+
5
+ export default {
6
+ title: 'ox-input-unit',
7
+ component: 'ox-input-unit',
8
+ argTypes: {
9
+ placeholder: { control: 'text' },
10
+ name: { control: 'text' },
11
+ value: { control: 'number' },
12
+ stdUnit: { control: 'select', options: ['kg', 'rad'] },
13
+ userUnit: { control: 'select', options: ['mg', 'g', 'ton', 'degree'] }
14
+ }
15
+ }
16
+
17
+ interface Story<T> {
18
+ (args: T): TemplateResult
19
+ args?: Partial<T>
20
+ argTypes?: Record<string, unknown>
21
+ }
22
+
23
+ interface ArgTypes {
24
+ placeholder?: string
25
+ name?: string
26
+ value?: number
27
+ stdUnit: string
28
+ userUnit?: string
29
+ }
30
+
31
+ const Template: Story<ArgTypes> = ({
32
+ placeholder = 'unit',
33
+ name = 'hello',
34
+ value = 0,
35
+ stdUnit = 'kg',
36
+ userUnit
37
+ }: ArgTypes) => html`
38
+ <link href="/themes/app-theme.css" rel="stylesheet" />
39
+ <ox-input-unit
40
+ name=${name}
41
+ placeholder=${placeholder}
42
+ .value=${value}
43
+ std-unit=${stdUnit}
44
+ user-unit=${userUnit}
45
+ @change=${(e: CustomEvent) => console.log(e.detail)}
46
+ >
47
+ </ox-input-unit>
48
+ `
49
+
50
+ export const Weight = Template.bind({})
51
+ Weight.args = {
52
+ placeholder: 'weight',
53
+ name: 'weight',
54
+ value: 0,
55
+ stdUnit: 'kg',
56
+ userUnit: 'g'
57
+ }
58
+
59
+ export const Angle = Template.bind({})
60
+ Angle.args = {
61
+ placeholder: 'angle',
62
+ name: 'angle',
63
+ value: 0,
64
+ stdUnit: 'rad',
65
+ userUnit: 'degree'
66
+ }
@@ -0,0 +1,58 @@
1
+ import '../src/ox-input-value-map.js'
2
+
3
+ import { html, TemplateResult } from 'lit'
4
+
5
+ export default {
6
+ title: 'ox-input-value-map',
7
+ component: 'ox-input-value-map',
8
+ argTypes: {
9
+ name: { control: 'text' },
10
+ value: { control: 'object' },
11
+ keytype: { control: 'select', options: ['string', 'number'] },
12
+ valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] }
13
+ }
14
+ }
15
+
16
+ interface Story<T> {
17
+ (args: T): TemplateResult
18
+ args?: Partial<T>
19
+ argTypes?: Record<string, unknown>
20
+ }
21
+
22
+ interface ArgTypes {
23
+ name?: string
24
+ value?: object
25
+ valuetype?: string
26
+ keytype?: string
27
+ }
28
+
29
+ const Template: Story<ArgTypes> = ({
30
+ name = 'values',
31
+ value = {},
32
+ keytype = 'string',
33
+ valuetype = 'string'
34
+ }: ArgTypes) => html`
35
+ <link href="/themes/app-theme.css" rel="stylesheet" />
36
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
37
+ <style>
38
+ body {
39
+ }
40
+ </style>
41
+
42
+ <ox-input-value-map
43
+ @change=${(e: Event) => {
44
+ console.log((e.target as HTMLInputElement).value)
45
+ }}
46
+ name=${name}
47
+ .value=${value}
48
+ keytype=${keytype}
49
+ valuetype=${valuetype}
50
+ >
51
+ </ox-input-value-map>
52
+ `
53
+
54
+ export const Regular = Template.bind({})
55
+ Regular.args = {
56
+ name: 'values',
57
+ value: {}
58
+ }
@@ -0,0 +1,58 @@
1
+ import '../src/ox-input-value-ranges.js'
2
+
3
+ import { html, TemplateResult } from 'lit'
4
+
5
+ export default {
6
+ title: 'ox-input-value-ranges',
7
+ component: 'ox-input-value-ranges',
8
+ argTypes: {
9
+ name: { control: 'text' },
10
+ value: { control: 'object' },
11
+ keytype: { control: 'select', options: ['string', 'number'] },
12
+ valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] }
13
+ }
14
+ }
15
+
16
+ interface Story<T> {
17
+ (args: T): TemplateResult
18
+ args?: Partial<T>
19
+ argTypes?: Record<string, unknown>
20
+ }
21
+
22
+ interface ArgTypes {
23
+ name?: string
24
+ value?: object
25
+ valuetype?: string
26
+ keytype?: string
27
+ }
28
+
29
+ const Template: Story<ArgTypes> = ({
30
+ name = 'values',
31
+ value = {},
32
+ keytype = 'string',
33
+ valuetype = 'string'
34
+ }: ArgTypes) => html`
35
+ <link href="/themes/app-theme.css" rel="stylesheet" />
36
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
37
+ <style>
38
+ body {
39
+ }
40
+ </style>
41
+
42
+ <ox-input-value-ranges
43
+ @change=${(e: Event) => {
44
+ console.log((e.target as HTMLInputElement).value)
45
+ }}
46
+ name=${name}
47
+ .value=${value}
48
+ keytype=${keytype}
49
+ valuetype=${valuetype}
50
+ >
51
+ </ox-input-value-ranges>
52
+ `
53
+
54
+ export const Regular = Template.bind({})
55
+ Regular.args = {
56
+ name: 'values',
57
+ value: {}
58
+ }
@@ -0,0 +1,73 @@
1
+ import '../src/ox-input-work-shift.js'
2
+ import '../src/locale/locale-picker.js'
3
+
4
+ import { html, TemplateResult } from 'lit'
5
+
6
+ export default {
7
+ title: 'ox-input-work-shift',
8
+ component: 'ox-input-work-shift',
9
+ argTypes: {
10
+ value: { control: 'object' },
11
+ name: { control: 'text' }
12
+ }
13
+ }
14
+
15
+ interface Story<T> {
16
+ (args: T): TemplateResult
17
+ args?: Partial<T>
18
+ argTypes?: Record<string, unknown>
19
+ }
20
+
21
+ interface ArgTypes {
22
+ name?: string
23
+ value?: object
24
+ }
25
+
26
+ const Template: Story<ArgTypes> = ({ name = 'work-shift', value = [] }: ArgTypes) => html`
27
+ <link href="/themes/app-theme.css" rel="stylesheet" />
28
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
29
+ <style>
30
+ body {
31
+ }
32
+ </style>
33
+
34
+ <locale-picker></locale-picker>
35
+ <br /><br />
36
+
37
+ <ox-input-work-shift
38
+ @change=${(e: Event) => {
39
+ console.log((e.target as HTMLInputElement).value)
40
+ }}
41
+ name=${name}
42
+ .value=${value}
43
+ >
44
+ </ox-input-work-shift>
45
+ `
46
+
47
+ export const Regular = Template.bind({})
48
+ Regular.args = {
49
+ name: 'work-shift',
50
+ value: [
51
+ {
52
+ name: 'DAY',
53
+ fromDate: -1,
54
+ fromTime: '22:00',
55
+ toDate: 0,
56
+ toTime: '06:00'
57
+ },
58
+ {
59
+ name: 'SWING',
60
+ fromDate: 0,
61
+ fromTime: '06:00',
62
+ toDate: 0,
63
+ toTime: '14:00'
64
+ },
65
+ {
66
+ name: 'NIGHT',
67
+ fromDate: 0,
68
+ fromTime: '14:00',
69
+ toDate: 0,
70
+ toTime: '22:00'
71
+ }
72
+ ]
73
+ }
@@ -0,0 +1,101 @@
1
+ import '../src/ox-select.js'
2
+ import '../src/ox-checkbox.js'
3
+
4
+ import { html, TemplateResult } from 'lit'
5
+
6
+ export default {
7
+ title: 'ox-select',
8
+ component: 'ox-select',
9
+ argTypes: {
10
+ placeholder: { control: 'text' },
11
+ name: { control: 'text' }
12
+ }
13
+ }
14
+
15
+ interface Story<T> {
16
+ (args: T): TemplateResult
17
+ args?: Partial<T>
18
+ argTypes?: Record<string, unknown>
19
+ }
20
+
21
+ interface ArgTypes {
22
+ placeholder?: string
23
+ name?: string
24
+ value?: object | string
25
+ slot?: TemplateResult
26
+ }
27
+
28
+ const Template: Story<ArgTypes> = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot }: ArgTypes) => html`
29
+ <link href="/themes/app-theme.css" rel="stylesheet" />
30
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
31
+
32
+ <ox-select
33
+ name=${name}
34
+ @change=${(e: Event) => {
35
+ console.log((e.target as HTMLInputElement).value)
36
+ }}
37
+ placeholder=${placeholder}
38
+ .value=${value}
39
+ >
40
+ ${slot}
41
+ </ox-select>
42
+ `
43
+
44
+ export const Regular = Template.bind({})
45
+ Regular.args = {
46
+ placeholder: 'single select',
47
+ name: 'label',
48
+ value: '',
49
+ slot: html`
50
+ <ox-popup-list align-left nowrap>
51
+ <div option value="A">LABEL-A</div>
52
+ <div option value="B">LABEL-B</div>
53
+ <div option value="C">LABEL-C</div>
54
+ <div option value="TOO LONG VALUE">LABEL-TOO LONG VALUE</div>
55
+ </ox-popup-list>
56
+ `
57
+ }
58
+
59
+ export const MultipleSelect = Template.bind({})
60
+ MultipleSelect.args = {
61
+ placeholder: 'multiple select',
62
+ name: 'multiple',
63
+ value: ['B', 'TOO LONG VALUE'],
64
+ slot: html`
65
+ <ox-popup-list multiple with-search>
66
+ <div option value="A">A</div>
67
+ <div option value="B">B</div>
68
+ <div option value="C">C</div>
69
+ <div option value="TOO LONG VALUE" />TOO LONG VALUE</div>
70
+ </ox-popup-list>
71
+ `
72
+ }
73
+
74
+ export const MultipleWithCheckbox = Template.bind({})
75
+ MultipleWithCheckbox.args = {
76
+ placeholder: 'multiple with checkbox',
77
+ name: 'multiple',
78
+ value: ['B', 'C', 'F'],
79
+ slot: html`
80
+ <ox-popup-list attr-selected="checked" multiple with-search>
81
+ <ox-checkbox
82
+ option
83
+ @change=${(e: Event) => {
84
+ const target = e.target as HTMLInputElement
85
+ const options = target.parentElement!.querySelectorAll('[option]')
86
+ console.log(options)
87
+ options.forEach(option => ((option as HTMLInputElement).checked = target.checked))
88
+ }}
89
+ >set all</ox-checkbox
90
+ >
91
+ <ox-checkbox option value="A">LABEL-A</ox-checkbox>
92
+ <ox-checkbox option value="B">LABEL-B</ox-checkbox>
93
+ <ox-checkbox option value="C" checked>LABEL-C</ox-checkbox>
94
+ <ox-checkbox option value="D">LABEL-D</ox-checkbox>
95
+ <ox-checkbox option value="E">LABEL-E</ox-checkbox>
96
+ <ox-checkbox option value="F">LABEL-F</ox-checkbox>
97
+ <ox-checkbox option value="G">LABEL-G</ox-checkbox>
98
+ <ox-checkbox option value="TOO LONG VALUE">TOO LONG VALUE</ox-checkbox>
99
+ </ox-popup-list>
100
+ `
101
+ }
@@ -0,0 +1,142 @@
1
+ body {
2
+ /* theme color */
3
+ --primary-color-rgb: 56, 162, 91;
4
+ --primary-color: rgb(var(--primary-color-rgb));
5
+ --secondary-color-rgb: 71, 97, 114;
6
+ --secondary-color: rgb(var(--secondary-color-rgb));
7
+ --focus-color: var(--theme-white-color);
8
+ --primary-background-color: var(--secondary-color);
9
+ --secondary-background-color: #183936;
10
+ --main-section-background-color: #f7f6f4;
11
+ --theme-white-color: #fff;
12
+ --theme-black-color: rgba(0, 0, 0, 0.9);
13
+
14
+ --focus-background-color: var(--primary-color);
15
+ --primary-text-color: var(--theme-black-color);
16
+ --secondary-text-color: #218f62;
17
+
18
+ --opacity-dark-color: rgba(0, 0, 0, 0.4);
19
+ --opacity-light-color: rgba(255, 255, 255, 0.8);
20
+
21
+ /* status color */
22
+ --status-success-color: #35a24a;
23
+ --status-warning-color: #ee8d03;
24
+ --status-danger-color: #d14946;
25
+ --status-info-color: #398ace;
26
+
27
+ /* common style */
28
+ --border-radius: 4px;
29
+ --border-dark-color: 1px solid rgba(0, 0, 0, 0.15);
30
+ --border-light-color: 1px solid rgba(255, 255, 255, 0.3);
31
+
32
+ --box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
33
+
34
+ --theme-font: 'Noto', Helvetica;
35
+
36
+ --margin-default: 9px;
37
+ --margin-narrow: 4px;
38
+ --margin-wide: 15px;
39
+ --padding-default: var(--margin-default);
40
+ --padding-narrow: var(--margin-narrow);
41
+ --padding-wide: var(--margin-wide);
42
+
43
+ --scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
44
+ --scrollbar-thumb-hover-color: var(--primary-color);
45
+
46
+ --fontsize-default: 14px;
47
+ --fontsize-small: 13px;
48
+ --fontsize-large: 16px;
49
+
50
+ /* app layout style */
51
+ --app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
52
+
53
+ /* title & description style */
54
+ --title-margin: var(--margin-narrow) 0;
55
+ --title-font: bold 24px var(--theme-font);
56
+ --title-text-color: var(--secondary-color);
57
+ --title-font-mobile: bold 20px var(--theme-font);
58
+
59
+ --page-description-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
60
+ --page-description-font: normal var(--fontsize-default) / 1.2rem var(--theme-font);
61
+ --page-description-color: var(--secondary-text-color);
62
+
63
+ --subtitle-padding: 12px 5px 3px 5px;
64
+ --subtitle-font: bold 18px var(--theme-font);
65
+ --subtitle-text-color: var(--primary-color);
66
+ --subtitle-border-bottom: 1px solid var(--primary-color);
67
+
68
+ /* icon style */
69
+ --icon-tiny-size: 24px;
70
+ --icon-default-size: 36px;
71
+ --icon-big-size: 48px;
72
+ --icon-default-color: var(--theme-white-color);
73
+
74
+ /* material design component themes */
75
+ --mdc-theme-on-primary: var(--theme-white-color);
76
+ --mdc-theme-primary: var(--secondary-text-color);
77
+ --mdc-theme-on-secondary: var(--theme-white-color);
78
+ --mdc-theme-secondary: var(--primary-color);
79
+ --mdc-button-outline-color: var(--primary-color);
80
+ --mdc-danger-button-primary-color: var(--status-danger-color);
81
+ --mdc-danger-button-outline-color: var(--status-danger-color);
82
+ --mdc-button-outline-width: 1px;
83
+ --mdc-button-horizontal-padding: 16px;
84
+
85
+ /* button style */
86
+ --button-background-color: #fafbfc;
87
+ --button-background-focus-color: var(--primary-color);
88
+ --button-border: var(--border-dark-color);
89
+ --button-border-radius: var(--border-radius);
90
+ --button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
91
+ --button-padding: var(--padding-default);
92
+ --button-color: var(--secondary-color);
93
+ --button-font: normal 15px var(--theme-font);
94
+ --button-text-transform: capitalize;
95
+ --button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
96
+ --button-activ-border: 1px solid var(--primary-color);
97
+
98
+ --button-primary-background-color: var(--primary-color);
99
+ --button-primary-active-background-color: var(--status-success-color);
100
+ --button-primary-padding: var(--margin-default) var(--margin-wide);
101
+ --button-primary-color: var(--theme-white-color);
102
+ --button-primary-font: bold 16px var(--theme-font);
103
+
104
+ /* table style */
105
+ --th-padding: var(--padding-default) 0 var(--padding-default) var(--padding-default);
106
+ --th-border-top: 2px solid var(--secondary-color);
107
+ --th-text-transform: capitalize;
108
+ --th-font: bold var(--fontsize-small) var(--theme-font);
109
+ --th-color: rgba(var(--secondary-color-rgb), 0.8);
110
+
111
+ --tr-background-color: var(--theme-white-color);
112
+ --tr-background-odd-color: rgba(255, 255, 255, 0.4);
113
+ --tr-background-hover-color: #e1f5fe;
114
+ --td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
115
+ --td-padding: var(--padding-default);
116
+ --td-font: normal 13px var(--theme-font);
117
+ --td-color: var(--secondary-color);
118
+
119
+ /* form style */
120
+ --label-font: normal var(--fontsize-default) var(--theme-font);
121
+ --label-color: var(--secondary-color);
122
+ --label-text-transform: capitalize;
123
+ --input-margin: var(--margin-narrow) 0;
124
+ --input-padding: var(--padding-default);
125
+ --input-min-width: 200px;
126
+ --input-font: normal var(--fontsize-default) var(--theme-font);
127
+ --input-hint-font: normal var(--fontsize-small) var(--theme-font);
128
+ --input-hint-color: #666;
129
+ --input-container-max-width: 900px;
130
+ --fieldset-margin: var(--padding-wide) 0;
131
+ --fieldset-padding: 0 var(--padding-wide) var(--padding-wide) var(--padding-wide);
132
+ --legend-padding: var(--padding-default) 0;
133
+ --legend-color: var(--secondary-text-color);
134
+ --legend-font: bold 16px var(--theme-font);
135
+ }
136
+
137
+ @media only screen and (max-width: 460px) {
138
+ body {
139
+ /* subtitle style */
140
+ --subtitle-margin: 0;
141
+ }
142
+ }
@@ -0,0 +1,19 @@
1
+ body {
2
+ --ox-input-border: 1px solid rgba(0, 0, 0, 0.1);
3
+ --ox-input-border-radius: var(--border-radius);
4
+ --ox-input-padding: var(--input-padding);
5
+ --ox-input-font: normal 15px var(--theme-font);
6
+ --ox-input-color: var(--secondary-color);
7
+ }
8
+
9
+ @media screen and (max-width: 480px) {
10
+ body {
11
+ }
12
+ }
13
+
14
+ @media (min-width: 481px) and (max-width: 1024px) {
15
+ body {
16
+ --ox-input-font: normal 16px var(--theme-font);
17
+ --ox-input-padding: 4px 5px;
18
+ }
19
+ }
@@ -1 +1,45 @@
1
- {}
1
+ {
2
+ "label.daily": "daily",
3
+ "label.days": "days",
4
+ "label.day-of-month": "day of month",
5
+ "label.day-of-week": "day of week",
6
+ "label.examples": "examples",
7
+ "label.hour": "hour",
8
+ "label.hourly": "hourly",
9
+ "label.hours": "hours",
10
+ "label.minute": "minute",
11
+ "label.minute by minute": "minute by minute",
12
+ "label.minutes": "minutes",
13
+ "label.month": "month",
14
+ "label.monthly": "monthly",
15
+ "label.second": "second",
16
+ "label.second by second": "second by second",
17
+ "label.seconds": "seconds",
18
+ "label.weekly": "weekly",
19
+ "label.yearly": "yearly",
20
+ "text.allowed values": "allowed values",
21
+ "text.any value": "any value",
22
+ "text.every 12 hours": "every 12 hours",
23
+ "text.every 15 minutes": "every 15 minutes",
24
+ "text.every 15 seconds": "every 15 seconds",
25
+ "text.every 2 hours": "every 2 hours",
26
+ "text.every 2 minutes": "every 2 minutes",
27
+ "text.every 2 seconds": "every 2 seconds",
28
+ "text.every 30 seconds": "every 30 seconds",
29
+ "text.every christmas": "every christmas",
30
+ "text.every day": "every day",
31
+ "text.every half hour": "every half hour",
32
+ "text.every hour during working time": "every hour during working time",
33
+ "text.every hour": "every hour",
34
+ "text.every minute": "every minute",
35
+ "text.every second": "every second",
36
+ "text.every sunday": "every sunday",
37
+ "text.every sunday(2)": "every sunday(2)",
38
+ "text.every weekday": "every weekday",
39
+ "text.range of values": "range of values",
40
+ "text.step values": "step values",
41
+ "text.the first day of every month": "the first day of every month",
42
+ "text.the first day of every year": "the first day of every year",
43
+ "text.value list separator": "value list separator",
44
+ "text.10 am on every payday": "10 am on every payday"
45
+ }
@@ -1 +1,43 @@
1
- {}
1
+ {
2
+ "label.daily": "일간",
3
+ "label.days": "일",
4
+ "label.day-of-month": "날짜",
5
+ "label.day-of-week": "요일",
6
+ "label.examples": "예시",
7
+ "label.hour": "시간",
8
+ "label.hourly": "시간단위",
9
+ "label.hours": "시간",
10
+ "label.minute": "분",
11
+ "label.minutes": "분",
12
+ "label.month": "월",
13
+ "label.monthly": "월간",
14
+ "label.second": "초",
15
+ "label.seconds": "초",
16
+ "label.weekly": "주간",
17
+ "label.yearly": "연간",
18
+ "text.allowed values": "허용된 값",
19
+ "text.any value": "아무값",
20
+ "text.every 12 hours": "매 12시간마다",
21
+ "text.every 15 minutes": "매 15분마다",
22
+ "text.every 15 seconds": "매 15초마다",
23
+ "text.every 2 hours": "매 2시간마다",
24
+ "text.every 2 minutes": "매 2분마다",
25
+ "text.every 2 seconds": "매 2초마다",
26
+ "text.every 30 seconds": "매 30초마다",
27
+ "text.every christmas": "매 크리스마스마다",
28
+ "text.every day": "매일",
29
+ "text.every half hour": "매 30분마다",
30
+ "text.every hour during working time": "근무 시간 동안 매시간마다",
31
+ "text.every hour": "매시간",
32
+ "text.every minute": "매분",
33
+ "text.every second": "매초",
34
+ "text.every sunday": "매주 일요일마다",
35
+ "text.every sunday(2)": "매주 일요일마다(2)",
36
+ "text.every weekday": "평일마다",
37
+ "text.range of values": "값의 범위",
38
+ "text.step values": "단계 값",
39
+ "text.the first day of every month": "매월 1일마다",
40
+ "text.the first day of every year": "매년 1월 1일마다",
41
+ "text.value list separator": "값 구분자",
42
+ "text.10 am on every payday": "월급날 오전 10시마다"
43
+ }