@operato/input 2.0.0-alpha.98 → 2.0.0-beta.0
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.
- package/CHANGELOG.md +254 -0
- package/demo/index-barcode.html +4 -4
- package/demo/index-checkbox.html +4 -4
- package/demo/index-code.html +4 -4
- package/demo/index-options.html +2 -2
- package/dist/src/ox-buttons-radio.d.ts +9 -5
- package/dist/src/ox-buttons-radio.js +43 -11
- package/dist/src/ox-buttons-radio.js.map +1 -1
- package/dist/src/ox-checkbox.js +23 -19
- package/dist/src/ox-checkbox.js.map +1 -1
- package/dist/src/ox-input-3axis.js +12 -1
- package/dist/src/ox-input-3axis.js.map +1 -1
- package/dist/src/ox-input-3dish.js +16 -11
- package/dist/src/ox-input-3dish.js.map +1 -1
- package/dist/src/ox-input-angle.js +8 -1
- package/dist/src/ox-input-angle.js.map +1 -1
- package/dist/src/ox-input-barcode.js +11 -8
- package/dist/src/ox-input-barcode.js.map +1 -1
- package/dist/src/ox-input-code.js +3 -0
- package/dist/src/ox-input-code.js.map +1 -1
- package/dist/src/ox-input-color.js +8 -6
- package/dist/src/ox-input-color.js.map +1 -1
- package/dist/src/ox-input-crontab.js +29 -25
- package/dist/src/ox-input-crontab.js.map +1 -1
- package/dist/src/ox-input-data.js +15 -6
- package/dist/src/ox-input-data.js.map +1 -1
- package/dist/src/ox-input-duration.js +15 -34
- package/dist/src/ox-input-duration.js.map +1 -1
- package/dist/src/ox-input-file.js +18 -14
- package/dist/src/ox-input-file.js.map +1 -1
- package/dist/src/ox-input-hashtags.js +13 -14
- package/dist/src/ox-input-hashtags.js.map +1 -1
- package/dist/src/ox-input-i18n-label.js +4 -4
- package/dist/src/ox-input-i18n-label.js.map +1 -1
- package/dist/src/ox-input-image.js +2 -2
- package/dist/src/ox-input-image.js.map +1 -1
- package/dist/src/ox-input-key-values.js +6 -6
- package/dist/src/ox-input-key-values.js.map +1 -1
- package/dist/src/ox-input-mass-fraction.js +5 -5
- package/dist/src/ox-input-mass-fraction.js.map +1 -1
- package/dist/src/ox-input-multiple-colors.js +2 -2
- package/dist/src/ox-input-multiple-colors.js.map +1 -1
- package/dist/src/ox-input-options.js +6 -6
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/src/ox-input-partition-keys.js +6 -6
- package/dist/src/ox-input-partition-keys.js.map +1 -1
- package/dist/src/ox-input-privilege.js +13 -16
- package/dist/src/ox-input-privilege.js.map +1 -1
- package/dist/src/ox-input-quantifier.js +5 -5
- package/dist/src/ox-input-quantifier.js.map +1 -1
- package/dist/src/ox-input-range.js +8 -8
- package/dist/src/ox-input-range.js.map +1 -1
- package/dist/src/ox-input-search.js +5 -6
- package/dist/src/ox-input-search.js.map +1 -1
- package/dist/src/ox-input-select-buttons.d.ts +2 -0
- package/dist/src/ox-input-select-buttons.js +14 -21
- package/dist/src/ox-input-select-buttons.js.map +1 -1
- package/dist/src/ox-input-table.js +1 -1
- package/dist/src/ox-input-table.js.map +1 -1
- package/dist/src/ox-input-unit-number.js +5 -5
- package/dist/src/ox-input-unit-number.js.map +1 -1
- package/dist/src/ox-input-value-map.js +9 -13
- package/dist/src/ox-input-value-map.js.map +1 -1
- package/dist/src/ox-input-value-ranges.js +7 -7
- package/dist/src/ox-input-value-ranges.js.map +1 -1
- package/dist/src/ox-input-work-shift.js +7 -7
- package/dist/src/ox-input-work-shift.js.map +1 -1
- package/dist/src/ox-select.d.ts +9 -1
- package/dist/src/ox-select.js +51 -17
- package/dist/src/ox-select.js.map +1 -1
- package/dist/src/ox-zoomable-image.d.ts +17 -0
- package/dist/src/ox-zoomable-image.js +80 -0
- package/dist/src/ox-zoomable-image.js.map +1 -0
- package/dist/stories/ox-buttons-radio.stories.d.ts +31 -0
- package/dist/stories/ox-buttons-radio.stories.js +81 -0
- package/dist/stories/ox-buttons-radio.stories.js.map +1 -0
- package/dist/stories/ox-checkbox.stories.d.ts +6 -0
- package/dist/stories/ox-checkbox.stories.js +57 -13
- package/dist/stories/ox-checkbox.stories.js.map +1 -1
- package/dist/stories/ox-input-3axis.stories.d.ts +5 -0
- package/dist/stories/ox-input-3axis.stories.js +32 -10
- package/dist/stories/ox-input-3axis.stories.js.map +1 -1
- package/dist/stories/ox-input-3dish.stories.d.ts +5 -0
- package/dist/stories/ox-input-3dish.stories.js +35 -13
- package/dist/stories/ox-input-3dish.stories.js.map +1 -1
- package/dist/stories/ox-input-angle.stories.d.ts +5 -0
- package/dist/stories/ox-input-angle.stories.js +36 -13
- package/dist/stories/ox-input-angle.stories.js.map +1 -1
- package/dist/stories/ox-input-barcode.stories.d.ts +5 -0
- package/dist/stories/ox-input-barcode.stories.js +35 -18
- package/dist/stories/ox-input-barcode.stories.js.map +1 -1
- package/dist/stories/ox-input-code.stories.d.ts +5 -0
- package/dist/stories/ox-input-code.stories.js +38 -13
- package/dist/stories/ox-input-code.stories.js.map +1 -1
- package/dist/stories/ox-input-crontab.stories.d.ts +5 -0
- package/dist/stories/ox-input-crontab.stories.js +35 -12
- package/dist/stories/ox-input-crontab.stories.js.map +1 -1
- package/dist/stories/ox-input-data.stories.d.ts +5 -0
- package/dist/stories/ox-input-data.stories.js +34 -11
- package/dist/stories/ox-input-data.stories.js.map +1 -1
- package/dist/stories/ox-input-duration.stories.d.ts +5 -0
- package/dist/stories/ox-input-duration.stories.js +36 -13
- package/dist/stories/ox-input-duration.stories.js.map +1 -1
- package/dist/stories/ox-input-file.stories.d.ts +5 -0
- package/dist/stories/ox-input-file.stories.js +39 -16
- package/dist/stories/ox-input-file.stories.js.map +1 -1
- package/dist/stories/ox-input-hashtags.stories.d.ts +5 -0
- package/dist/stories/ox-input-hashtags.stories.js +35 -12
- package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
- package/dist/stories/ox-input-i18n-label.stories.d.ts +5 -0
- package/dist/stories/ox-input-i18n-label.stories.js +35 -12
- package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
- package/dist/stories/ox-input-key-values.stories.d.ts +5 -0
- package/dist/stories/ox-input-key-values.stories.js +35 -12
- package/dist/stories/ox-input-key-values.stories.js.map +1 -1
- package/dist/stories/ox-input-mass-fraction.stories.d.ts +5 -0
- package/dist/stories/ox-input-mass-fraction.stories.js +36 -13
- package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
- package/dist/stories/ox-input-multiple-colors.stories.d.ts +5 -0
- package/dist/stories/ox-input-multiple-colors.stories.js +31 -149
- package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
- package/dist/stories/ox-input-options.stories.d.ts +5 -0
- package/dist/stories/ox-input-options.stories.js +34 -11
- package/dist/stories/ox-input-options.stories.js.map +1 -1
- package/dist/stories/ox-input-partition-keys.stories.d.ts +5 -0
- package/dist/stories/ox-input-partition-keys.stories.js +34 -11
- package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
- package/dist/stories/ox-input-privilege.stories.d.ts +5 -0
- package/dist/stories/ox-input-privilege.stories.js +36 -18
- package/dist/stories/ox-input-privilege.stories.js.map +1 -1
- package/dist/stories/ox-input-quantifier.stories.d.ts +5 -0
- package/dist/stories/ox-input-quantifier.stories.js +37 -10
- package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
- package/dist/stories/ox-input-range.stories.d.ts +5 -0
- package/dist/stories/ox-input-range.stories.js +32 -5
- package/dist/stories/ox-input-range.stories.js.map +1 -1
- package/dist/stories/ox-input-search.stories.d.ts +5 -0
- package/dist/stories/ox-input-search.stories.js +35 -12
- package/dist/stories/ox-input-search.stories.js.map +1 -1
- package/dist/stories/ox-input-select-buttons.stories.d.ts +5 -0
- package/dist/stories/ox-input-select-buttons.stories.js +36 -14
- package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
- package/dist/stories/ox-input-unit.stories.d.ts +5 -0
- package/dist/stories/ox-input-unit.stories.js +40 -13
- package/dist/stories/ox-input-unit.stories.js.map +1 -1
- package/dist/stories/ox-input-value-map.stories.d.ts +5 -0
- package/dist/stories/ox-input-value-map.stories.js +36 -13
- package/dist/stories/ox-input-value-map.stories.js.map +1 -1
- package/dist/stories/ox-input-value-ranges.stories.d.ts +5 -0
- package/dist/stories/ox-input-value-ranges.stories.js +36 -13
- package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
- package/dist/stories/ox-input-work-shift.stories.d.ts +5 -0
- package/dist/stories/ox-input-work-shift.stories.js +36 -13
- package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
- package/dist/stories/ox-select-set-options.stories.d.ts +53 -0
- package/dist/stories/ox-select-set-options.stories.js +183 -0
- package/dist/stories/ox-select-set-options.stories.js.map +1 -0
- package/dist/stories/ox-select.stories.d.ts +5 -0
- package/dist/stories/ox-select.stories.js +33 -7
- package/dist/stories/ox-select.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/ox-buttons-radio.ts +37 -5
- package/src/ox-checkbox.ts +23 -19
- package/src/ox-input-3axis.ts +12 -1
- package/src/ox-input-3dish.ts +16 -11
- package/src/ox-input-angle.ts +8 -1
- package/src/ox-input-barcode.ts +11 -8
- package/src/ox-input-code.ts +3 -0
- package/src/ox-input-color.ts +8 -6
- package/src/ox-input-crontab.ts +29 -25
- package/src/ox-input-data.ts +15 -6
- package/src/ox-input-duration.ts +15 -34
- package/src/ox-input-file.ts +18 -14
- package/src/ox-input-hashtags.ts +14 -16
- package/src/ox-input-i18n-label.ts +4 -4
- package/src/ox-input-image.ts +2 -2
- package/src/ox-input-key-values.ts +6 -6
- package/src/ox-input-mass-fraction.ts +5 -5
- package/src/ox-input-multiple-colors.ts +2 -2
- package/src/ox-input-options.ts +6 -6
- package/src/ox-input-partition-keys.ts +6 -6
- package/src/ox-input-privilege.ts +13 -16
- package/src/ox-input-quantifier.ts +5 -5
- package/src/ox-input-range.ts +8 -8
- package/src/ox-input-search.ts +5 -6
- package/src/ox-input-select-buttons.ts +19 -24
- package/src/ox-input-table.ts +1 -1
- package/src/ox-input-unit-number.ts +5 -5
- package/src/ox-input-value-map.ts +9 -13
- package/src/ox-input-value-ranges.ts +7 -7
- package/src/ox-input-work-shift.ts +7 -7
- package/src/ox-select.ts +60 -13
- package/src/ox-zoomable-image.ts +75 -0
- package/stories/ox-buttons-radio.stories.ts +96 -0
- package/stories/ox-checkbox.stories.ts +61 -14
- package/stories/ox-input-3axis.stories.ts +35 -12
- package/stories/ox-input-3dish.stories.ts +38 -15
- package/stories/ox-input-angle.stories.ts +39 -15
- package/stories/ox-input-barcode.stories.ts +37 -18
- package/stories/ox-input-code.stories.ts +42 -15
- package/stories/ox-input-crontab.stories.ts +43 -14
- package/stories/ox-input-data.stories.ts +38 -14
- package/stories/ox-input-duration.stories.ts +39 -15
- package/stories/ox-input-file.stories.ts +41 -16
- package/stories/ox-input-hashtags.stories.ts +42 -12
- package/stories/ox-input-i18n-label.stories.ts +55 -31
- package/stories/ox-input-key-values.stories.ts +44 -14
- package/stories/ox-input-mass-fraction.stories.ts +40 -15
- package/stories/ox-input-multiple-colors.stories.ts +34 -151
- package/stories/ox-input-options.stories.ts +37 -13
- package/stories/ox-input-partition-keys.stories.ts +42 -13
- package/stories/ox-input-privilege.stories.ts +45 -20
- package/stories/ox-input-quantifier.stories.ts +38 -10
- package/stories/ox-input-range.stories.ts +34 -5
- package/stories/ox-input-search.stories.ts +37 -12
- package/stories/ox-input-select-buttons.stories.ts +40 -16
- package/stories/ox-input-unit.stories.ts +43 -14
- package/stories/ox-input-value-map.stories.ts +40 -15
- package/stories/ox-input-value-ranges.stories.ts +40 -15
- package/stories/ox-input-work-shift.stories.ts +39 -15
- package/stories/ox-select-set-options.stories.ts +215 -0
- package/stories/ox-select.stories.ts +37 -7
- package/themes/dark-hc.css +151 -0
- package/themes/dark-mc.css +151 -0
- package/themes/dark.css +151 -0
- package/themes/grist-theme.css +169 -0
- package/themes/light-hc.css +151 -0
- package/themes/light-mc.css +151 -0
- package/themes/light.css +151 -0
- package/themes/md-typescale-styles.css +100 -0
- package/themes/spacing.css +43 -0
- package/themes/state-color.css +6 -0
- package/themes/app-theme.css +0 -145
- package/themes/input-theme.css +0 -32
@@ -1,13 +1,15 @@
|
|
1
1
|
import '../src/ox-input-multiple-colors.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-multiple-colors',
|
7
8
|
component: 'ox-input-multiple-colors',
|
8
9
|
argTypes: {
|
9
10
|
value: { control: 'array' },
|
10
|
-
disabled: { control: 'boolean' }
|
11
|
+
disabled: { control: 'boolean' },
|
12
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
11
13
|
}
|
12
14
|
}
|
13
15
|
|
@@ -19,9 +21,16 @@ interface Story<T> {
|
|
19
21
|
|
20
22
|
interface ArgTypes {
|
21
23
|
disabled: boolean
|
24
|
+
theme?: string
|
22
25
|
}
|
23
26
|
|
24
|
-
const Template: Story<ArgTypes> = ({ disabled }: ArgTypes) => html`
|
27
|
+
const Template: Story<ArgTypes> = ({ disabled, theme = 'light' }: ArgTypes) => html`
|
28
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
29
|
+
|
30
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
31
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
32
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
33
|
+
|
25
34
|
<link
|
26
35
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
27
36
|
rel="stylesheet"
|
@@ -36,160 +45,34 @@ const Template: Story<ArgTypes> = ({ disabled }: ArgTypes) => html`
|
|
36
45
|
/>
|
37
46
|
|
38
47
|
<style>
|
39
|
-
|
40
|
-
|
41
|
-
--primary-color-rgb: 56, 162, 91;
|
42
|
-
--primary-color: rgb(var(--primary-color-rgb));
|
43
|
-
--secondary-color-rgb: 71, 97, 114;
|
44
|
-
--secondary-color: rgb(var(--secondary-color-rgb));
|
45
|
-
--focus-color: var(--theme-white-color);
|
46
|
-
--primary-background-color: var(--secondary-color);
|
47
|
-
--secondary-background-color: #183936;
|
48
|
-
--main-section-background-color: #f7f6f4;
|
49
|
-
--theme-white-color: #fff;
|
50
|
-
--theme-black-color: rgba(0, 0, 0, 0.9);
|
51
|
-
|
52
|
-
--focus-background-color: var(--primary-color);
|
53
|
-
--primary-text-color: var(--theme-black-color);
|
54
|
-
--secondary-text-color: #218f62;
|
55
|
-
|
56
|
-
--opacity-dark-color: rgba(0, 0, 0, 0.4);
|
57
|
-
--opacity-light-color: rgba(255, 255, 255, 0.8);
|
58
|
-
|
59
|
-
/* status color */
|
60
|
-
--status-success-color: #35a24a;
|
61
|
-
--status-warning-color: #ee8d03;
|
62
|
-
--status-danger-color: #d14946;
|
63
|
-
--status-info-color: #398ace;
|
64
|
-
|
65
|
-
/* common style */
|
66
|
-
--border-radius: 4px;
|
67
|
-
--border-dark-color: 1px solid rgba(0, 0, 0, 0.15);
|
68
|
-
--border-light-color: 1px solid rgba(255, 255, 255, 0.3);
|
69
|
-
|
70
|
-
--box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
|
71
|
-
|
72
|
-
--theme-font: 'Noto', Helvetica;
|
73
|
-
|
74
|
-
--margin-default: 9px;
|
75
|
-
--margin-narrow: 4px;
|
76
|
-
--margin-wide: 15px;
|
77
|
-
--padding-default: var(--margin-default);
|
78
|
-
--padding-narrow: var(--margin-narrow);
|
79
|
-
--padding-wide: var(--margin-wide);
|
80
|
-
|
81
|
-
--scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
|
82
|
-
--scrollbar-thumb-hover-color: var(--primary-color);
|
83
|
-
|
84
|
-
--fontsize-default: 14px;
|
85
|
-
--fontsize-small: 13px;
|
86
|
-
--fontsize-large: 16px;
|
87
|
-
|
88
|
-
/* app layout style */
|
89
|
-
--app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
|
90
|
-
|
91
|
-
/* title & description style */
|
92
|
-
--title-margin: var(--margin-narrow) 0;
|
93
|
-
--title-font: bold 24px var(--theme-font);
|
94
|
-
--title-text-color: var(--secondary-color);
|
95
|
-
--title-font-mobile: bold 20px var(--theme-font);
|
96
|
-
|
97
|
-
--page-description-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
|
98
|
-
--page-description-font: normal var(--fontsize-default) / 1.2rem var(--theme-font);
|
99
|
-
--page-description-color: var(--secondary-text-color);
|
100
|
-
|
101
|
-
--subtitle-padding: 12px 5px 3px 5px;
|
102
|
-
--subtitle-font: bold 18px var(--theme-font);
|
103
|
-
--subtitle-text-color: var(--primary-color);
|
104
|
-
--subtitle-border-bottom: 1px solid var(--primary-color);
|
105
|
-
|
106
|
-
/* icon style */
|
107
|
-
--icon-tiny-size: 24px;
|
108
|
-
--icon-default-size: 36px;
|
109
|
-
--icon-big-size: 48px;
|
110
|
-
--icon-default-color: var(--theme-white-color);
|
111
|
-
|
112
|
-
/* material design component themes */
|
113
|
-
--md-theme-on-primary: var(--theme-white-color);
|
114
|
-
--md-theme-primary: var(--secondary-text-color);
|
115
|
-
--md-theme-on-secondary: var(--theme-white-color);
|
116
|
-
--md-theme-secondary: var(--primary-color);
|
117
|
-
--md-button-outline-color: var(--primary-color);
|
118
|
-
--md-danger-button-primary-color: var(--status-danger-color);
|
119
|
-
--md-danger-button-outline-color: var(--status-danger-color);
|
120
|
-
--md-button-outline-width: 1px;
|
121
|
-
|
122
|
-
/* button style */
|
123
|
-
--button-background-color: #fafbfc;
|
124
|
-
--button-background-focus-color: var(--primary-color);
|
125
|
-
--button-border: var(--border-dark-color);
|
126
|
-
--button-border-radius: var(--border-radius);
|
127
|
-
--button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
|
128
|
-
--button-padding: var(--padding-default);
|
129
|
-
--button-color: var(--secondary-color);
|
130
|
-
--button-font: normal 15px var(--theme-font);
|
131
|
-
--button-text-transform: capitalize;
|
132
|
-
--button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
133
|
-
--button-activ-border: 1px solid var(--primary-color);
|
134
|
-
|
135
|
-
--button-primary-background-color: var(--primary-color);
|
136
|
-
--button-primary-active-background-color: var(--status-success-color);
|
137
|
-
--button-primary-padding: var(--margin-default) var(--margin-wide);
|
138
|
-
--button-primary-color: var(--theme-white-color);
|
139
|
-
--button-primary-font: bold 16px var(--theme-font);
|
140
|
-
|
141
|
-
/* table style */
|
142
|
-
--th-padding: var(--padding-default);
|
143
|
-
--th-border-top: 2px solid var(--secondary-color);
|
144
|
-
--th-text-transform: capitalize;
|
145
|
-
--th-font: bold var(--fontsize-small) var(--theme-font);
|
146
|
-
--th-color: rgba(var(--secondary-color-rgb), 0.8);
|
147
|
-
|
148
|
-
--tr-background-color: var(--theme-white-color);
|
149
|
-
--tr-background-odd-color: rgba(255, 255, 255, 0.4);
|
150
|
-
--tr-background-hover-color: #e1f5fe;
|
151
|
-
--td-border-line: 1px solid rgba(0, 0, 0, 0.05);
|
152
|
-
--td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
|
153
|
-
--td-padding: var(--padding-default);
|
154
|
-
--td-font: normal 13px var(--theme-font);
|
155
|
-
--td-color: var(--secondary-color);
|
156
|
-
|
157
|
-
--label-cell-background-color: #f6f6f6; /* th or td common background color */
|
48
|
+
${MDTypeScaleStyles.cssText}
|
49
|
+
</style>
|
158
50
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
--input-padding: 6px 2px;
|
165
|
-
--input-min-width: 200px;
|
166
|
-
--input-font: normal var(--fontsize-default) var(--theme-font);
|
167
|
-
--input-hint-font: normal var(--fontsize-small) var(--theme-font);
|
168
|
-
--input-hint-color: #666;
|
169
|
-
--input-container-max-width: 900px;
|
170
|
-
--fieldset-margin: var(--padding-wide) 0;
|
171
|
-
--fieldset-padding: 0 var(--padding-wide) var(--padding-wide) var(--padding-wide);
|
172
|
-
--legend-padding: var(--padding-default) 0;
|
173
|
-
--legend-color: var(--secondary-text-color);
|
174
|
-
--legend-font: bold 16px var(--theme-font);
|
175
|
-
}
|
51
|
+
<style>
|
52
|
+
.container {
|
53
|
+
height: 500px;
|
54
|
+
text-align: center;
|
55
|
+
padding: 20px;
|
176
56
|
|
177
|
-
|
178
|
-
|
179
|
-
/* subtitle style */
|
180
|
-
--subtitle-margin: 0;
|
181
|
-
}
|
57
|
+
background-color: var(--md-sys-color-primary-container);
|
58
|
+
color: var(--md-sys-color-on-primary-container);
|
182
59
|
}
|
183
60
|
</style>
|
184
61
|
|
185
|
-
<
|
186
|
-
.
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
62
|
+
<script>
|
63
|
+
document.body.classList.add('${theme}')
|
64
|
+
</script>
|
65
|
+
|
66
|
+
<div class="container md-typescale-body-large-prominent">
|
67
|
+
<ox-input-multiple-colors
|
68
|
+
.value=${['red', 'yellow']}
|
69
|
+
@change=${(e: Event) => {
|
70
|
+
console.log((e.target as HTMLInputElement).value)
|
71
|
+
}}
|
72
|
+
?disabled=${disabled}
|
73
|
+
>
|
74
|
+
</ox-input-multiple-colors>
|
75
|
+
</div>
|
193
76
|
`
|
194
77
|
|
195
78
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-options.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-options',
|
@@ -8,7 +9,8 @@ export default {
|
|
8
9
|
argTypes: {
|
9
10
|
value: { control: 'object' },
|
10
11
|
name: { control: 'text' },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
+
disabled: { control: 'boolean' },
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
12
14
|
}
|
13
15
|
}
|
14
16
|
|
@@ -22,10 +24,15 @@ interface ArgTypes {
|
|
22
24
|
name?: string
|
23
25
|
value?: object
|
24
26
|
disabled?: boolean
|
27
|
+
theme?: string
|
25
28
|
}
|
26
29
|
|
27
|
-
const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled }: ArgTypes) => html`
|
28
|
-
<link href="/
|
30
|
+
const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled, theme = 'light' }: ArgTypes) => html`
|
31
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
32
|
+
|
33
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
34
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
35
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
29
36
|
|
30
37
|
<link
|
31
38
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -39,20 +46,37 @@ const Template: Story<ArgTypes> = ({ name = 'options', value = {}, disabled }: A
|
|
39
46
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
40
47
|
rel="stylesheet"
|
41
48
|
/>
|
49
|
+
|
42
50
|
<style>
|
43
|
-
|
51
|
+
${MDTypeScaleStyles.cssText}
|
52
|
+
</style>
|
53
|
+
|
54
|
+
<style>
|
55
|
+
.container {
|
56
|
+
height: 500px;
|
57
|
+
text-align: center;
|
58
|
+
padding: 20px;
|
59
|
+
|
60
|
+
background-color: var(--md-sys-color-primary-container);
|
61
|
+
color: var(--md-sys-color-on-primary-container);
|
44
62
|
}
|
45
63
|
</style>
|
46
64
|
|
47
|
-
<
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
65
|
+
<script>
|
66
|
+
document.body.classList.add('${theme}')
|
67
|
+
</script>
|
68
|
+
|
69
|
+
<div class="container md-typescale-body-large-prominent">
|
70
|
+
<ox-input-options
|
71
|
+
@change=${(e: Event) => {
|
72
|
+
console.log((e.target as HTMLInputElement).value)
|
73
|
+
}}
|
74
|
+
name=${name}
|
75
|
+
.value=${value}
|
76
|
+
?disabled=${disabled}
|
77
|
+
>
|
78
|
+
</ox-input-options>
|
79
|
+
</div>
|
56
80
|
`
|
57
81
|
|
58
82
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-partition-keys.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-partition-keys',
|
@@ -8,7 +9,8 @@ export default {
|
|
8
9
|
argTypes: {
|
9
10
|
value: { control: 'object' },
|
10
11
|
name: { control: 'text' },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
+
disabled: { control: 'boolean' },
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
12
14
|
}
|
13
15
|
}
|
14
16
|
|
@@ -22,10 +24,20 @@ interface ArgTypes {
|
|
22
24
|
name?: string
|
23
25
|
value?: object
|
24
26
|
disabled?: boolean
|
27
|
+
theme?: string
|
25
28
|
}
|
26
29
|
|
27
|
-
const Template: Story<ArgTypes> = ({
|
28
|
-
|
30
|
+
const Template: Story<ArgTypes> = ({
|
31
|
+
name = 'partition-keys',
|
32
|
+
value = {},
|
33
|
+
disabled,
|
34
|
+
theme = 'light'
|
35
|
+
}: ArgTypes) => html`
|
36
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
37
|
+
|
38
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
39
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
40
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
29
41
|
|
30
42
|
<link
|
31
43
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -39,20 +51,37 @@ const Template: Story<ArgTypes> = ({ name = 'partition-keys', value = {}, disabl
|
|
39
51
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
40
52
|
rel="stylesheet"
|
41
53
|
/>
|
54
|
+
|
42
55
|
<style>
|
43
|
-
|
56
|
+
${MDTypeScaleStyles.cssText}
|
57
|
+
</style>
|
58
|
+
|
59
|
+
<style>
|
60
|
+
.container {
|
61
|
+
height: 500px;
|
62
|
+
text-align: center;
|
63
|
+
padding: 20px;
|
64
|
+
|
65
|
+
background-color: var(--md-sys-color-primary-container);
|
66
|
+
color: var(--md-sys-color-on-primary-container);
|
44
67
|
}
|
45
68
|
</style>
|
46
69
|
|
47
|
-
<
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
70
|
+
<script>
|
71
|
+
document.body.classList.add('${theme}')
|
72
|
+
</script>
|
73
|
+
|
74
|
+
<div class="container md-typescale-body-large-prominent">
|
75
|
+
<ox-input-partition-keys
|
76
|
+
@change=${(e: Event) => {
|
77
|
+
console.log((e.target as HTMLInputElement).value)
|
78
|
+
}}
|
79
|
+
name=${name}
|
80
|
+
.value=${value}
|
81
|
+
?disabled=${disabled}
|
82
|
+
>
|
83
|
+
</ox-input-partition-keys>
|
84
|
+
</div>
|
56
85
|
`
|
57
86
|
|
58
87
|
export const Regular = Template.bind({})
|
@@ -2,6 +2,7 @@ import '../src/ox-input-privilege.js'
|
|
2
2
|
import '../src/locale/locale-picker.js'
|
3
3
|
|
4
4
|
import { html, TemplateResult } from 'lit'
|
5
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
6
|
|
6
7
|
export default {
|
7
8
|
title: 'ox-input-privilege',
|
@@ -9,7 +10,8 @@ export default {
|
|
9
10
|
argTypes: {
|
10
11
|
value: { control: 'number' },
|
11
12
|
name: { control: 'text' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
+
disabled: { control: 'boolean' },
|
14
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
13
15
|
}
|
14
16
|
}
|
15
17
|
|
@@ -29,10 +31,21 @@ interface ArgTypes {
|
|
29
31
|
super: boolean
|
30
32
|
} | null
|
31
33
|
disabled?: boolean
|
34
|
+
theme?: string
|
32
35
|
}
|
33
36
|
|
34
|
-
const Template: Story<ArgTypes> = ({
|
35
|
-
|
37
|
+
const Template: Story<ArgTypes> = ({
|
38
|
+
name = 'privilege',
|
39
|
+
value = null,
|
40
|
+
privileges,
|
41
|
+
disabled,
|
42
|
+
theme = 'light'
|
43
|
+
}: ArgTypes) => html`
|
44
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
45
|
+
|
46
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
47
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
48
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
36
49
|
|
37
50
|
<link
|
38
51
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -46,29 +59,41 @@ const Template: Story<ArgTypes> = ({ name = 'privilege', value = null, privilege
|
|
46
59
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
47
60
|
rel="stylesheet"
|
48
61
|
/>
|
62
|
+
|
49
63
|
<style>
|
50
|
-
|
51
|
-
|
64
|
+
${MDTypeScaleStyles.cssText}
|
65
|
+
</style>
|
52
66
|
|
53
|
-
|
54
|
-
|
55
|
-
|
67
|
+
<style>
|
68
|
+
.container {
|
69
|
+
height: 500px;
|
70
|
+
text-align: center;
|
71
|
+
padding: 20px;
|
72
|
+
|
73
|
+
background-color: var(--md-sys-color-primary-container);
|
74
|
+
color: var(--md-sys-color-on-primary-container);
|
56
75
|
}
|
57
76
|
</style>
|
58
77
|
|
59
|
-
<
|
60
|
-
|
78
|
+
<script>
|
79
|
+
document.body.classList.add('${theme}')
|
80
|
+
</script>
|
81
|
+
|
82
|
+
<div class="container md-typescale-body-large-prominent">
|
83
|
+
<locale-picker></locale-picker>
|
84
|
+
<br /><br />
|
61
85
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
86
|
+
<ox-input-privilege
|
87
|
+
@change=${(e: Event) => {
|
88
|
+
console.log((e.target as HTMLInputElement).value)
|
89
|
+
}}
|
90
|
+
name=${name}
|
91
|
+
.value=${value}
|
92
|
+
.privileges=${privileges}
|
93
|
+
?disabled=${disabled}
|
94
|
+
>
|
95
|
+
</ox-input-privilege>
|
96
|
+
</div>
|
72
97
|
`
|
73
98
|
|
74
99
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-quantifier.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
import { OxInputQuantifier } from '../src/ox-input-quantifier.js'
|
6
7
|
|
@@ -10,7 +11,8 @@ export default {
|
|
10
11
|
argTypes: {
|
11
12
|
name: { control: 'text' },
|
12
13
|
value: { control: 'array' },
|
13
|
-
disabled: { control: 'boolean' }
|
14
|
+
disabled: { control: 'boolean' },
|
15
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
14
16
|
}
|
15
17
|
}
|
16
18
|
|
@@ -24,10 +26,15 @@ interface ArgTypes {
|
|
24
26
|
name?: string
|
25
27
|
value?: number[]
|
26
28
|
disabled?: boolean
|
29
|
+
theme?: string
|
27
30
|
}
|
28
31
|
|
29
|
-
const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled }: ArgTypes) => html`
|
30
|
-
<link href="/
|
32
|
+
const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled, theme = 'light' }: ArgTypes) => html`
|
33
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
34
|
+
|
35
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
36
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
37
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
31
38
|
|
32
39
|
<link
|
33
40
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -42,13 +49,34 @@ const Template: Story<ArgTypes> = ({ name = 'quantifier', value, disabled }: Arg
|
|
42
49
|
rel="stylesheet"
|
43
50
|
/>
|
44
51
|
|
45
|
-
<
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
+
<style>
|
53
|
+
${MDTypeScaleStyles.cssText}
|
54
|
+
</style>
|
55
|
+
|
56
|
+
<style>
|
57
|
+
.container {
|
58
|
+
height: 500px;
|
59
|
+
text-align: center;
|
60
|
+
padding: 20px;
|
61
|
+
|
62
|
+
background-color: var(--md-sys-color-primary-container);
|
63
|
+
color: var(--md-sys-color-on-primary-container);
|
64
|
+
}
|
65
|
+
</style>
|
66
|
+
|
67
|
+
<script>
|
68
|
+
document.body.classList.add('${theme}')
|
69
|
+
</script>
|
70
|
+
|
71
|
+
<div class="container md-typescale-body-large-prominent">
|
72
|
+
<ox-input-quantifier
|
73
|
+
name=${name}
|
74
|
+
.value=${value}
|
75
|
+
@change=${(e: Event) => console.log((e.target as OxInputQuantifier).value)}
|
76
|
+
?disabled=${disabled}
|
77
|
+
>
|
78
|
+
</ox-input-quantifier>
|
79
|
+
</div>
|
52
80
|
`
|
53
81
|
|
54
82
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-range.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-range',
|
@@ -11,7 +12,8 @@ export default {
|
|
11
12
|
step: { control: 'number' },
|
12
13
|
min: { control: 'number' },
|
13
14
|
max: { control: 'number' },
|
14
|
-
disabled: { control: 'boolean' }
|
15
|
+
disabled: { control: 'boolean' },
|
16
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
15
17
|
}
|
16
18
|
}
|
17
19
|
|
@@ -28,6 +30,7 @@ interface ArgTypes {
|
|
28
30
|
min?: number
|
29
31
|
max?: number
|
30
32
|
disabled?: boolean
|
33
|
+
theme?: string
|
31
34
|
}
|
32
35
|
|
33
36
|
const Template: Story<ArgTypes> = ({
|
@@ -36,9 +39,14 @@ const Template: Story<ArgTypes> = ({
|
|
36
39
|
step = 1,
|
37
40
|
min = 0,
|
38
41
|
max = 100,
|
39
|
-
disabled
|
42
|
+
disabled,
|
43
|
+
theme = 'light'
|
40
44
|
}: ArgTypes) => html`
|
41
|
-
<link href="/
|
45
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
46
|
+
|
47
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
48
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
49
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
42
50
|
|
43
51
|
<link
|
44
52
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -53,8 +61,29 @@ const Template: Story<ArgTypes> = ({
|
|
53
61
|
rel="stylesheet"
|
54
62
|
/>
|
55
63
|
|
56
|
-
<
|
57
|
-
|
64
|
+
<style>
|
65
|
+
${MDTypeScaleStyles.cssText}
|
66
|
+
</style>
|
67
|
+
|
68
|
+
<style>
|
69
|
+
.container {
|
70
|
+
height: 500px;
|
71
|
+
text-align: center;
|
72
|
+
padding: 20px;
|
73
|
+
|
74
|
+
background-color: var(--md-sys-color-primary-container);
|
75
|
+
color: var(--md-sys-color-on-primary-container);
|
76
|
+
}
|
77
|
+
</style>
|
78
|
+
|
79
|
+
<script>
|
80
|
+
document.body.classList.add('${theme}')
|
81
|
+
</script>
|
82
|
+
|
83
|
+
<div class="container md-typescale-body-large-prominent">
|
84
|
+
<ox-input-range name=${name} value=${value} step=${step} min=${min} max=${max} ?disabled=${disabled}>
|
85
|
+
</ox-input-range>
|
86
|
+
</div>
|
58
87
|
`
|
59
88
|
|
60
89
|
export const Regular = Template.bind({})
|