@operato/input 8.0.0-beta.0 → 8.0.0-beta.2

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