@operato/input 7.1.30 → 7.1.32

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 (119) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +7 -7
  4. package/.editorconfig +0 -29
  5. package/.storybook/main.js +0 -3
  6. package/.storybook/preview.js +0 -52
  7. package/.storybook/server.mjs +0 -8
  8. package/demo/index-3dish.html +0 -38
  9. package/demo/index-angle.html +0 -36
  10. package/demo/index-barcode.html +0 -68
  11. package/demo/index-button-radio.html +0 -42
  12. package/demo/index-checkbox.html +0 -69
  13. package/demo/index-code.html +0 -61
  14. package/demo/index-color-gradient.html +0 -35
  15. package/demo/index-color-stops.html +0 -62
  16. package/demo/index-color.html +0 -35
  17. package/demo/index-crontab.html +0 -37
  18. package/demo/index-file.html +0 -41
  19. package/demo/index-image.html +0 -40
  20. package/demo/index-multiple-colors.html +0 -52
  21. package/demo/index-options.html +0 -43
  22. package/demo/index-partition-keys.html +0 -79
  23. package/demo/index-range.html +0 -40
  24. package/demo/index-select.html +0 -136
  25. package/demo/index-stack.html +0 -33
  26. package/demo/index-table.html +0 -50
  27. package/demo/index-value-map.html +0 -80
  28. package/demo/index-value-ranges.html +0 -80
  29. package/demo/index-work-shift.html +0 -59
  30. package/demo/index.html +0 -54
  31. package/src/index.ts +0 -34
  32. package/src/locale/locale-codes.ts +0 -18
  33. package/src/locale/locale-picker.ts +0 -43
  34. package/src/locale/localization.ts +0 -15
  35. package/src/locales/en.ts +0 -30
  36. package/src/locales/ko.ts +0 -30
  37. package/src/locales/ms.ts +0 -30
  38. package/src/locales/zh.ts +0 -30
  39. package/src/ox-buttons-radio.ts +0 -140
  40. package/src/ox-checkbox.ts +0 -181
  41. package/src/ox-form-field.ts +0 -53
  42. package/src/ox-input-3axis.ts +0 -77
  43. package/src/ox-input-3dish.ts +0 -211
  44. package/src/ox-input-angle.ts +0 -73
  45. package/src/ox-input-barcode.ts +0 -318
  46. package/src/ox-input-code.ts +0 -139
  47. package/src/ox-input-color-gradient.ts +0 -349
  48. package/src/ox-input-color-stops.ts +0 -525
  49. package/src/ox-input-color.ts +0 -338
  50. package/src/ox-input-container.ts +0 -32
  51. package/src/ox-input-crontab.ts +0 -595
  52. package/src/ox-input-data.ts +0 -219
  53. package/src/ox-input-direction.ts +0 -65
  54. package/src/ox-input-duration.ts +0 -175
  55. package/src/ox-input-file.ts +0 -209
  56. package/src/ox-input-hashtags.ts +0 -185
  57. package/src/ox-input-i18n-label.ts +0 -140
  58. package/src/ox-input-image.ts +0 -168
  59. package/src/ox-input-key-values.ts +0 -301
  60. package/src/ox-input-layout/ox-input-card-layout.ts +0 -58
  61. package/src/ox-input-layout/ox-input-grid-layout.ts +0 -64
  62. package/src/ox-input-layout/ox-input-layout.ts +0 -77
  63. package/src/ox-input-mass-fraction.ts +0 -437
  64. package/src/ox-input-multiple-colors.ts +0 -135
  65. package/src/ox-input-options.ts +0 -216
  66. package/src/ox-input-partition-keys.ts +0 -303
  67. package/src/ox-input-privilege.ts +0 -163
  68. package/src/ox-input-quantifier.ts +0 -62
  69. package/src/ox-input-range.ts +0 -146
  70. package/src/ox-input-scene-component-id.ts +0 -73
  71. package/src/ox-input-search.ts +0 -126
  72. package/src/ox-input-select-buttons.ts +0 -75
  73. package/src/ox-input-signature.ts +0 -180
  74. package/src/ox-input-stack.ts +0 -136
  75. package/src/ox-input-table-column-config.ts +0 -211
  76. package/src/ox-input-table.ts +0 -404
  77. package/src/ox-input-textarea.ts +0 -86
  78. package/src/ox-input-unit-number.ts +0 -354
  79. package/src/ox-input-value-map.ts +0 -342
  80. package/src/ox-input-value-ranges.ts +0 -363
  81. package/src/ox-input-work-shift.ts +0 -290
  82. package/src/ox-select.ts +0 -219
  83. package/src/ox-zoomable-image.ts +0 -75
  84. package/stories/ox-buttons-radio.stories.ts +0 -89
  85. package/stories/ox-checkbox.stories.ts +0 -111
  86. package/stories/ox-input-3axis.stories.ts +0 -77
  87. package/stories/ox-input-3dish.stories.ts +0 -106
  88. package/stories/ox-input-angle.stories.ts +0 -84
  89. package/stories/ox-input-barcode.stories.ts +0 -117
  90. package/stories/ox-input-code.stories.ts +0 -99
  91. package/stories/ox-input-crontab.stories.ts +0 -82
  92. package/stories/ox-input-data.stories.ts +0 -82
  93. package/stories/ox-input-direction.stories.ts +0 -80
  94. package/stories/ox-input-duration.stories.ts +0 -84
  95. package/stories/ox-input-file.stories.ts +0 -111
  96. package/stories/ox-input-hashtags.stories.ts +0 -82
  97. package/stories/ox-input-i18n-label.stories.ts +0 -103
  98. package/stories/ox-input-key-values.stories.ts +0 -97
  99. package/stories/ox-input-mass-fraction.stories.ts +0 -102
  100. package/stories/ox-input-multiple-colors.stories.ts +0 -72
  101. package/stories/ox-input-options.stories.ts +0 -80
  102. package/stories/ox-input-partition-keys.stories.ts +0 -84
  103. package/stories/ox-input-privilege.stories.ts +0 -108
  104. package/stories/ox-input-quantifier.stories.ts +0 -80
  105. package/stories/ox-input-range.stories.ts +0 -89
  106. package/stories/ox-input-search.stories.ts +0 -91
  107. package/stories/ox-input-select-buttons.stories.ts +0 -118
  108. package/stories/ox-input-signature.stories.ts +0 -75
  109. package/stories/ox-input-table-column-config.stories.ts +0 -109
  110. package/stories/ox-input-unit.stories.ts +0 -151
  111. package/stories/ox-input-value-map.stories.ts +0 -92
  112. package/stories/ox-input-value-ranges.stories.ts +0 -92
  113. package/stories/ox-input-work-shift.stories.ts +0 -106
  114. package/stories/ox-select-set-options.stories.ts +0 -208
  115. package/stories/ox-select.stories.ts +0 -181
  116. package/tsconfig.json +0 -25
  117. package/web-dev-server.config.mjs +0 -27
  118. package/web-test-runner.config.mjs +0 -41
  119. package/yarn-error.log +0 -17084
@@ -1,84 +0,0 @@
1
- import '../src/ox-input-angle.js'
2
- import '../src/locale/locale-picker.js'
3
-
4
- import { html, TemplateResult } from 'lit'
5
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
6
-
7
- export default {
8
- title: 'ox-input-angle',
9
- component: 'ox-input-angle',
10
- argTypes: {
11
- value: { control: 'number' },
12
- name: { control: 'text' },
13
- disabled: { control: 'boolean' }
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
- name?: string
25
- value?: number
26
- disabled?: boolean
27
- }
28
-
29
- const Template: Story<ArgTypes> = ({ name = '3dish', value = 0, disabled }: ArgTypes) => html`
30
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
31
-
32
- <link href="/themes/light.css" rel="stylesheet" />
33
- <link href="/themes/dark.css" rel="stylesheet" />
34
- <link href="/themes/spacing.css" rel="stylesheet" />
35
-
36
- <link
37
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
38
- rel="stylesheet"
39
- />
40
- <link
41
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
42
- rel="stylesheet"
43
- />
44
- <link
45
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
46
- rel="stylesheet"
47
- />
48
-
49
- <style>
50
- ${MDTypeScaleStyles.cssText}
51
- </style>
52
-
53
- <style>
54
- .container {
55
- height: 500px;
56
- text-align: center;
57
- padding: 20px;
58
-
59
- background-color: var(--md-sys-color-primary-container);
60
- color: var(--md-sys-color-on-primary-container);
61
- }
62
- </style>
63
-
64
- <div class="container md-typescale-body-large-prominent">
65
- <locale-picker></locale-picker>
66
- <br /><br />
67
-
68
- <ox-input-angle
69
- @change=${(e: Event) => {
70
- console.log((e.target as HTMLInputElement).value)
71
- }}
72
- name=${name}
73
- .value=${value}
74
- ?disabled=${disabled}
75
- >
76
- </ox-input-angle>
77
- </div>
78
- `
79
-
80
- export const Regular = Template.bind({})
81
- Regular.args = {
82
- name: 'angle',
83
- value: 0
84
- }
@@ -1,117 +0,0 @@
1
- import '../src/ox-input-barcode.js'
2
-
3
- import { html, TemplateResult } from 'lit'
4
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
5
-
6
- export default {
7
- title: 'ox-input-barcode',
8
- component: 'ox-input-barcode',
9
- argTypes: {
10
- name: { control: 'text' },
11
- value: { control: 'text' },
12
- scannable: { control: 'boolean' },
13
- withoutEnter: { control: 'boolean' },
14
- englishOnly: { control: 'boolean' },
15
- selectAfterChange: { control: 'boolean' },
16
- disabled: { control: 'boolean' }
17
- }
18
- }
19
-
20
- interface Story<T> {
21
- (args: T): TemplateResult
22
- args?: Partial<T>
23
- argTypes?: Record<string, unknown>
24
- }
25
-
26
- interface ArgTypes {
27
- name?: string
28
- value?: string
29
- scannable?: boolean
30
- withoutEnter?: boolean
31
- englishOnly?: boolean
32
- selectAfterChange?: boolean
33
- disabled?: boolean
34
- }
35
-
36
- const Template: Story<ArgTypes> = ({
37
- name = 'barcode',
38
- scannable = true,
39
- withoutEnter = true,
40
- englishOnly = false,
41
- selectAfterChange = false,
42
- disabled
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" />
49
-
50
- <link
51
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
52
- rel="stylesheet"
53
- />
54
- <link
55
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
56
- rel="stylesheet"
57
- />
58
- <link
59
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
60
- rel="stylesheet"
61
- />
62
-
63
- <style>
64
- ${MDTypeScaleStyles.cssText}
65
- </style>
66
-
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);
75
- }
76
- </style>
77
-
78
- <div class="container md-typescale-body-large-prominent">
79
- <ox-input-barcode
80
- name=${name}
81
- ?without-enter=${withoutEnter}
82
- ?scannable=${scannable}
83
- ?english-only=${englishOnly}
84
- ?select-after-change=${selectAfterChange}
85
- @change=${(e: CustomEvent) => console.log((e.target as HTMLInputElement).value)}
86
- ?disabled=${disabled}
87
- >
88
- </ox-input-barcode>
89
- </div>
90
- `
91
-
92
- export const Regular = Template.bind({})
93
- Regular.args = {
94
- name: 'barcode',
95
- scannable: true,
96
- withoutEnter: true,
97
- englishOnly: false,
98
- selectAfterChange: false
99
- }
100
-
101
- export const EnglishOnly = Template.bind({})
102
- EnglishOnly.args = {
103
- name: 'barcode',
104
- scannable: true,
105
- withoutEnter: true,
106
- englishOnly: true,
107
- selectAfterChange: false
108
- }
109
-
110
- export const selectAfterChange = Template.bind({})
111
- selectAfterChange.args = {
112
- name: 'barcode',
113
- scannable: true,
114
- withoutEnter: true,
115
- englishOnly: true,
116
- selectAfterChange: true
117
- }
@@ -1,99 +0,0 @@
1
- import '../src/ox-input-code.js'
2
-
3
- import { html, TemplateResult } from 'lit'
4
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
5
-
6
- export default {
7
- title: 'ox-input-code',
8
- component: 'ox-input-code',
9
- argTypes: {
10
- value: { control: 'text' },
11
- name: { control: 'text' },
12
- language: { control: 'select', options: ['javascript', 'sql', 'json'] },
13
- showLineNumbers: { control: 'boolean' },
14
- disabled: { control: 'boolean' }
15
- }
16
- }
17
-
18
- interface Story<T> {
19
- (args: T): TemplateResult
20
- args?: Partial<T>
21
- argTypes?: Record<string, unknown>
22
- }
23
-
24
- interface ArgTypes {
25
- name?: string
26
- value?: string
27
- language: 'javascript' | 'sql' | 'json'
28
- showLineNumbers?: boolean
29
- disabled?: boolean
30
- }
31
-
32
- const Template: Story<ArgTypes> = ({
33
- name = 'code',
34
- language = 'javascript',
35
- value = '',
36
- showLineNumbers,
37
- disabled
38
- }: ArgTypes) => html`
39
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
40
-
41
- <link href="/themes/light.css" rel="stylesheet" />
42
- <link href="/themes/dark.css" rel="stylesheet" />
43
- <link href="/themes/spacing.css" rel="stylesheet" />
44
-
45
- <link
46
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
47
- rel="stylesheet"
48
- />
49
- <link
50
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
51
- rel="stylesheet"
52
- />
53
- <link
54
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
55
- rel="stylesheet"
56
- />
57
-
58
- <style>
59
- ${MDTypeScaleStyles.cssText}
60
- </style>
61
-
62
- <style>
63
- .container {
64
- height: 500px;
65
- text-align: center;
66
- padding: 20px;
67
-
68
- background-color: var(--md-sys-color-primary-container);
69
- color: var(--md-sys-color-on-primary-container);
70
- }
71
-
72
- ox-input-code {
73
- height: 300px;
74
- text-align: start;
75
- }
76
- </style>
77
-
78
- <div class="container md-typescale-body-large-prominent">
79
- <ox-input-code
80
- @change=${(e: Event) => {
81
- console.log((e.target as HTMLInputElement).value)
82
- }}
83
- name=${name}
84
- language=${language}
85
- .value=${value}
86
- ?show-line-numbers=${showLineNumbers}
87
- ?disabled=${disabled}
88
- >
89
- </ox-input-code>
90
- </div>
91
- `
92
-
93
- export const Regular = Template.bind({})
94
- Regular.args = {
95
- name: 'code',
96
- value: '',
97
- language: 'javascript',
98
- showLineNumbers: true
99
- }
@@ -1,82 +0,0 @@
1
- import '../src/ox-input-crontab.js'
2
-
3
- import { html, TemplateResult } from 'lit'
4
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
5
-
6
- export default {
7
- title: 'ox-input-crontab',
8
- component: 'ox-input-crontab',
9
- argTypes: {
10
- value: { control: 'text' },
11
- name: { control: 'text' },
12
- disabled: { 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
- name?: string
24
- value?: string
25
- disabled?: boolean
26
- }
27
-
28
- const Template: Story<ArgTypes> = ({ name = 'crontab', value = '* * * * * *', disabled }: ArgTypes) => html`
29
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
30
-
31
- <link href="/themes/light.css" rel="stylesheet" />
32
- <link href="/themes/dark.css" rel="stylesheet" />
33
- <link href="/themes/spacing.css" rel="stylesheet" />
34
-
35
- <link
36
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
37
- rel="stylesheet"
38
- />
39
- <link
40
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
41
- rel="stylesheet"
42
- />
43
- <link
44
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
45
- rel="stylesheet"
46
- />
47
-
48
- <style>
49
- ${MDTypeScaleStyles.cssText}
50
- </style>
51
-
52
- <style>
53
- .container {
54
- height: 500px;
55
- text-align: center;
56
- padding: 20px;
57
-
58
- background-color: var(--md-sys-color-primary-container);
59
- color: var(--md-sys-color-on-primary-container);
60
- }
61
- </style>
62
-
63
- <div class="container md-typescale-body-large-prominent">
64
- <br /><br />
65
-
66
- <ox-input-crontab
67
- @change=${(e: Event) => {
68
- console.log((e.target as HTMLInputElement).value)
69
- }}
70
- name=${name}
71
- .value=${value}
72
- ?disabled=${disabled}
73
- >
74
- </ox-input-crontab>
75
- </div>
76
- `
77
-
78
- export const Regular = Template.bind({})
79
- Regular.args = {
80
- name: 'crontab',
81
- value: '* * * * * *'
82
- }
@@ -1,82 +0,0 @@
1
- import '../src/ox-input-data.js'
2
-
3
- import { html, TemplateResult } from 'lit'
4
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
5
-
6
- export default {
7
- title: 'ox-input-data',
8
- component: 'ox-input-data',
9
- argTypes: {
10
- value: { control: 'text' },
11
- name: { control: 'text' },
12
- disabled: { 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
- name?: string
24
- value?: string | number | object
25
- disabled?: boolean
26
- }
27
-
28
- const Template: Story<ArgTypes> = ({ name = 'code', value = '', disabled }: ArgTypes) => html`
29
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
30
-
31
- <link href="/themes/light.css" rel="stylesheet" />
32
- <link href="/themes/dark.css" rel="stylesheet" />
33
- <link href="/themes/spacing.css" rel="stylesheet" />
34
-
35
- <link
36
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
37
- rel="stylesheet"
38
- />
39
- <link
40
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
41
- rel="stylesheet"
42
- />
43
- <link
44
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
45
- rel="stylesheet"
46
- />
47
-
48
- <style>
49
- ${MDTypeScaleStyles.cssText}
50
- </style>
51
-
52
- <style>
53
- .container {
54
- height: 500px;
55
- text-align: center;
56
- padding: 20px;
57
- }
58
-
59
- ox-input-data {
60
- height: 300px;
61
- text-align: start;
62
- }
63
- </style>
64
-
65
- <div class="container md-typescale-body-large-prominent">
66
- <ox-input-data
67
- @change=${(e: Event) => {
68
- const value = (e.target as HTMLInputElement).value
69
- console.log('value : ', value, typeof value)
70
- }}
71
- name=${name}
72
- .value=${value}
73
- ?disabled=${disabled}
74
- >
75
- </ox-input-data>
76
- </div>
77
- `
78
-
79
- export const Regular = Template.bind({})
80
- Regular.args = {
81
- name: 'data'
82
- }
@@ -1,80 +0,0 @@
1
- import '../src/ox-input-direction.js'
2
-
3
- import { html, TemplateResult } from 'lit'
4
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
5
-
6
- export default {
7
- title: 'ox-input-direction',
8
- component: 'ox-input-direction',
9
- argTypes: {
10
- value: { control: 'object' },
11
- name: { control: 'text' },
12
- disabled: { 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
- name?: string
24
- value?: object | string
25
- disabled?: boolean
26
- }
27
-
28
- const Template: Story<ArgTypes> = ({ name = 'options', value, disabled }: ArgTypes) => html`
29
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
30
-
31
- <link href="/themes/light.css" rel="stylesheet" />
32
- <link href="/themes/dark.css" rel="stylesheet" />
33
- <link href="/themes/spacing.css" rel="stylesheet" />
34
-
35
- <link
36
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
37
- rel="stylesheet"
38
- />
39
- <link
40
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
41
- rel="stylesheet"
42
- />
43
- <link
44
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
45
- rel="stylesheet"
46
- />
47
-
48
- <style>
49
- ${MDTypeScaleStyles.cssText}
50
- </style>
51
-
52
- <style>
53
- .container {
54
- height: 500px;
55
- text-align: center;
56
- padding: 20px;
57
-
58
- background-color: var(--md-sys-color-primary-container);
59
- color: var(--md-sys-color-on-primary-container);
60
- }
61
- </style>
62
-
63
- <div class="container">
64
- <ox-input-direction
65
- @change=${(e: Event) => {
66
- console.log((e.target as HTMLInputElement).value)
67
- }}
68
- name=${name}
69
- .value=${value}
70
- ?disabled=${disabled}
71
- >
72
- </ox-input-direction>
73
- </div>
74
- `
75
-
76
- export const Regular = Template.bind({})
77
- Regular.args = {
78
- name: 'options',
79
- value: ''
80
- }
@@ -1,84 +0,0 @@
1
- import '../src/ox-input-duration.js'
2
- import '../src/locale/locale-picker.js'
3
-
4
- import { html, TemplateResult } from 'lit'
5
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
6
-
7
- export default {
8
- title: 'ox-input-duration',
9
- component: 'ox-input-duration',
10
- argTypes: {
11
- value: { control: 'number' },
12
- name: { control: 'text' },
13
- disabled: { control: 'boolean' }
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
- name?: string
25
- value?: number
26
- disabled?: boolean
27
- }
28
-
29
- const Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, disabled }: ArgTypes) => html`
30
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
31
-
32
- <link href="/themes/light.css" rel="stylesheet" />
33
- <link href="/themes/dark.css" rel="stylesheet" />
34
- <link href="/themes/spacing.css" rel="stylesheet" />
35
-
36
- <link
37
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
38
- rel="stylesheet"
39
- />
40
- <link
41
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
42
- rel="stylesheet"
43
- />
44
- <link
45
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
46
- rel="stylesheet"
47
- />
48
-
49
- <style>
50
- ${MDTypeScaleStyles.cssText}
51
- </style>
52
-
53
- <style>
54
- .container {
55
- height: 500px;
56
- text-align: center;
57
- padding: 20px;
58
-
59
- background-color: var(--md-sys-color-primary-container);
60
- color: var(--md-sys-color-on-primary-container);
61
- }
62
- </style>
63
-
64
- <div class="container md-typescale-body-large-prominent">
65
- <locale-picker></locale-picker>
66
- <br /><br />
67
-
68
- <ox-input-duration
69
- @change=${(e: Event) => {
70
- console.log((e.target as HTMLInputElement).value)
71
- }}
72
- name=${name}
73
- .value=${value}
74
- ?disabled=${disabled}
75
- >
76
- </ox-input-duration>
77
- </div>
78
- `
79
-
80
- export const Regular = Template.bind({})
81
- Regular.args = {
82
- name: 'duration',
83
- value: 3601
84
- }