grommet 2.54.0 → 2.56.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/components/Button/Button.js +7 -4
- package/components/Button/stories/CustomThemed/ChildrenPlainOption.stories.js +86 -0
- package/components/Calendar/Calendar.js +24 -16
- package/components/Calendar/index.d.ts +1 -1
- package/components/Calendar/stories/CustomHeader.stories.js +6 -1
- package/components/Calendar/stories/CustomThemed/CustomSizeHeading.stories.js +6 -1
- package/components/Calendar/stories/Dual.stories.js +23 -11
- package/components/Calendar/stories/HeaderLevel.stories.js +6 -1
- package/components/Calendar/stories/Multiple.stories.js +8 -3
- package/components/Calendar/stories/Simple.stories.js +6 -1
- package/components/Cards/Cards.js +164 -10
- package/components/Cards/StyledCellContainer.js +29 -0
- package/components/Cards/index.d.ts +4 -1
- package/components/Cards/propTypes.js +2 -0
- package/components/Cards/stories/Sizable.stories.js +70 -0
- package/components/Cards/stories/onOrder.stories.js +69 -0
- package/components/DataFilter/DataFilter.js +21 -28
- package/components/DateInput/DateInput.js +57 -24
- package/components/DateInput/index.d.ts +1 -0
- package/components/DateInput/utils.js +2 -2
- package/components/Drop/DropContainer.js +59 -3
- package/components/FileInput/FileInput.js +3 -0
- package/components/Form/stories/CustomThemed/FieldCustomStates.stories.js +7 -1
- package/components/Form/stories/FieldStates.stories.js +7 -1
- package/components/FormField/FormField.js +1 -1
- package/components/Grommet/Grommet.js +2 -1
- package/components/Grommet/index.d.ts +27 -0
- package/components/Grommet/propTypes.js +33 -1
- package/components/Layer/LayerContainer.d.ts +40 -0
- package/components/Select/stories/ChildrenRender.stories.js +28 -55
- package/components/SelectMultiple/stories/typescript/Children.stories.tsx +24 -48
- package/components/SelectMultiple/stories/typescript/ValueLabel.stories.tsx +88 -0
- package/components/Stepper/StepConnector.js +68 -0
- package/components/Stepper/Stepper.js +309 -0
- package/components/Stepper/StepperContext.js +43 -0
- package/components/Stepper/StepperDescription.js +26 -0
- package/components/Stepper/StepperHelperText.js +44 -0
- package/components/Stepper/StepperIndicator.js +74 -0
- package/components/Stepper/StepperLabel.js +41 -0
- package/components/Stepper/StepperStep.js +127 -0
- package/components/Stepper/StyledStepper.js +124 -0
- package/components/Stepper/index.d.ts +80 -0
- package/components/Stepper/index.js +18 -0
- package/components/Stepper/propTypes.js +35 -0
- package/components/Stepper/stories/DisabledSteps.stories.js +45 -0
- package/components/Stepper/stories/ErrorStates.stories.js +45 -0
- package/components/Stepper/stories/HorizontalSteps.stories.js +50 -0
- package/components/Stepper/stories/Interactive.stories.js +60 -0
- package/components/Stepper/stories/KeyboardNavigation.stories.js +64 -0
- package/components/Stepper/stories/NestedSubSteps.stories.js +70 -0
- package/components/Stepper/stories/ReadOnly.stories.js +43 -0
- package/components/Stepper/stories/ThemingLightDark.stories.js +58 -0
- package/components/Stepper/stories/VerticalSteps.stories.js +67 -0
- package/components/Tab/Tab.js +19 -6
- package/components/Tabs/Tabs.js +156 -22
- package/components/Tag/Tag.js +4 -3
- package/components/Tag/index.d.ts +5 -4
- package/components/Tag/propTypes.js +3 -2
- package/components/TextInput/StyledTextInput.js +4 -2
- package/components/TextInput/TextInput.js +1 -0
- package/components/TimeInput/README.md +2 -0
- package/components/TimeInput/StyledTimeInput.js +73 -0
- package/components/TimeInput/TimeInput.js +689 -0
- package/components/TimeInput/TimeInputPopup.js +393 -0
- package/components/TimeInput/index.d.ts +41 -0
- package/components/TimeInput/index.js +6 -0
- package/components/TimeInput/propTypes.js +35 -0
- package/components/TimeInput/stories/Controlled.stories.tsx +29 -0
- package/components/TimeInput/stories/Disabled.stories.tsx +13 -0
- package/components/TimeInput/stories/Form.stories.tsx +38 -0
- package/components/TimeInput/stories/ReadOnly.stories.tsx +13 -0
- package/components/TimeInput/stories/Simple.stories.tsx +19 -0
- package/components/TimeInput/stories/Step.stories.tsx +14 -0
- package/components/TimeInput/stories/ThemingLightDark.stories.tsx +22 -0
- package/components/TimeInput/stories/Uncontrolled.stories.tsx +22 -0
- package/components/TimeInput/useSectionedTimeField.js +359 -0
- package/components/TimeInput/utils.js +187 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +12 -0
- package/es6/components/Button/Button.js +7 -4
- package/es6/components/Button/stories/CustomThemed/ChildrenPlainOption.stories.js +81 -0
- package/es6/components/Calendar/Calendar.js +24 -16
- package/es6/components/Calendar/index.d.ts +1 -1
- package/es6/components/Calendar/stories/CustomHeader.stories.js +6 -1
- package/es6/components/Calendar/stories/CustomThemed/CustomSizeHeading.stories.js +6 -1
- package/es6/components/Calendar/stories/Dual.stories.js +23 -11
- package/es6/components/Calendar/stories/HeaderLevel.stories.js +6 -1
- package/es6/components/Calendar/stories/Multiple.stories.js +8 -3
- package/es6/components/Calendar/stories/Simple.stories.js +6 -1
- package/es6/components/Cards/Cards.js +165 -12
- package/es6/components/Cards/StyledCellContainer.js +24 -0
- package/es6/components/Cards/index.d.ts +4 -1
- package/es6/components/Cards/propTypes.js +2 -0
- package/es6/components/Cards/stories/Sizable.stories.js +65 -0
- package/es6/components/Cards/stories/onOrder.stories.js +64 -0
- package/es6/components/DataFilter/DataFilter.js +21 -28
- package/es6/components/DateInput/DateInput.js +57 -24
- package/es6/components/DateInput/index.d.ts +1 -0
- package/es6/components/DateInput/utils.js +2 -2
- package/es6/components/Drop/DropContainer.js +59 -3
- package/es6/components/FileInput/FileInput.js +3 -0
- package/es6/components/Form/stories/CustomThemed/FieldCustomStates.stories.js +7 -1
- package/es6/components/Form/stories/FieldStates.stories.js +7 -1
- package/es6/components/FormField/FormField.js +1 -1
- package/es6/components/Grommet/Grommet.js +2 -1
- package/es6/components/Grommet/index.d.ts +27 -0
- package/es6/components/Grommet/propTypes.js +33 -1
- package/es6/components/Layer/LayerContainer.d.ts +40 -0
- package/es6/components/Select/stories/ChildrenRender.stories.js +29 -56
- package/es6/components/SelectMultiple/stories/typescript/Children.stories.tsx +24 -48
- package/es6/components/SelectMultiple/stories/typescript/ValueLabel.stories.tsx +88 -0
- package/es6/components/Stepper/StepConnector.js +63 -0
- package/es6/components/Stepper/Stepper.js +306 -0
- package/es6/components/Stepper/StepperContext.js +39 -0
- package/es6/components/Stepper/StepperDescription.js +21 -0
- package/es6/components/Stepper/StepperHelperText.js +39 -0
- package/es6/components/Stepper/StepperIndicator.js +69 -0
- package/es6/components/Stepper/StepperLabel.js +36 -0
- package/es6/components/Stepper/StepperStep.js +122 -0
- package/es6/components/Stepper/StyledStepper.js +120 -0
- package/es6/components/Stepper/index.d.ts +80 -0
- package/es6/components/Stepper/index.js +6 -0
- package/es6/components/Stepper/propTypes.js +30 -0
- package/es6/components/Stepper/stories/DisabledSteps.stories.js +41 -0
- package/es6/components/Stepper/stories/ErrorStates.stories.js +41 -0
- package/es6/components/Stepper/stories/HorizontalSteps.stories.js +46 -0
- package/es6/components/Stepper/stories/Interactive.stories.js +56 -0
- package/es6/components/Stepper/stories/KeyboardNavigation.stories.js +60 -0
- package/es6/components/Stepper/stories/NestedSubSteps.stories.js +66 -0
- package/es6/components/Stepper/stories/ReadOnly.stories.js +39 -0
- package/es6/components/Stepper/stories/ThemingLightDark.stories.js +54 -0
- package/es6/components/Stepper/stories/VerticalSteps.stories.js +63 -0
- package/es6/components/Tab/Tab.js +19 -6
- package/es6/components/Tabs/Tabs.js +157 -23
- package/es6/components/Tag/Tag.js +4 -3
- package/es6/components/Tag/index.d.ts +5 -4
- package/es6/components/Tag/propTypes.js +3 -2
- package/es6/components/TextInput/StyledTextInput.js +4 -2
- package/es6/components/TextInput/TextInput.js +1 -0
- package/es6/components/TimeInput/README.md +2 -0
- package/es6/components/TimeInput/StyledTimeInput.js +68 -0
- package/es6/components/TimeInput/TimeInput.js +685 -0
- package/es6/components/TimeInput/TimeInputPopup.js +389 -0
- package/es6/components/TimeInput/index.d.ts +41 -0
- package/es6/components/TimeInput/index.js +1 -0
- package/es6/components/TimeInput/propTypes.js +30 -0
- package/es6/components/TimeInput/stories/Controlled.stories.tsx +29 -0
- package/es6/components/TimeInput/stories/Disabled.stories.tsx +13 -0
- package/es6/components/TimeInput/stories/Form.stories.tsx +38 -0
- package/es6/components/TimeInput/stories/ReadOnly.stories.tsx +13 -0
- package/es6/components/TimeInput/stories/Simple.stories.tsx +19 -0
- package/es6/components/TimeInput/stories/Step.stories.tsx +14 -0
- package/es6/components/TimeInput/stories/ThemingLightDark.stories.tsx +22 -0
- package/es6/components/TimeInput/stories/Uncontrolled.stories.tsx +22 -0
- package/es6/components/TimeInput/useSectionedTimeField.js +356 -0
- package/es6/components/TimeInput/utils.js +183 -0
- package/es6/components/index.d.ts +2 -0
- package/es6/components/index.js +2 -0
- package/es6/index.d.ts +2 -0
- package/es6/languages/default.json +27 -1
- package/es6/themes/base.d.ts +109 -0
- package/es6/themes/base.js +208 -0
- package/es6/utils/index.d.ts +1 -0
- package/es6/utils/styles.js +23 -12
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/index.d.ts +2 -0
- package/languages/default.json +27 -1
- package/package.json +51 -53
- package/themes/base.d.ts +109 -0
- package/themes/base.js +208 -0
- package/utils/index.d.ts +1 -0
- package/utils/styles.js +23 -12
- package/components/TextInput/stories/CustomThemed/CustomSuggestions.stories.tsx +0 -180
- package/components/TextInput/stories/CustomThemed/Themed.stories.js +0 -79
- package/es6/components/TextInput/stories/CustomThemed/CustomSuggestions.stories.tsx +0 -180
- package/es6/components/TextInput/stories/CustomThemed/Themed.stories.js +0 -74
package/es6/themes/base.d.ts
CHANGED
|
@@ -297,6 +297,43 @@ type ContainerExtend = {
|
|
|
297
297
|
};
|
|
298
298
|
};
|
|
299
299
|
|
|
300
|
+
interface StepperStateType {
|
|
301
|
+
indicator?: {
|
|
302
|
+
icon?: React.ReactNode | Icon;
|
|
303
|
+
iconSize?: string;
|
|
304
|
+
background?: BackgroundType;
|
|
305
|
+
color?: ColorType;
|
|
306
|
+
border?: ColorType;
|
|
307
|
+
substep?: {
|
|
308
|
+
iconSize?: string;
|
|
309
|
+
};
|
|
310
|
+
hover?: {
|
|
311
|
+
background?: BackgroundType;
|
|
312
|
+
border?: ColorType;
|
|
313
|
+
color?: ColorType;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
label?: TextProps;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
interface StepperHelperTextStateType extends StepperStateType {
|
|
320
|
+
helperText?: {
|
|
321
|
+
color?: ColorType;
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
interface StepperStatusStateType extends StepperStateType {
|
|
326
|
+
connector?: {
|
|
327
|
+
color?: ColorType;
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
interface StepperStatusWithHelperTextStateType extends StepperStatusStateType {
|
|
332
|
+
helperText?: {
|
|
333
|
+
color?: ColorType;
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
|
|
300
337
|
export interface ThemeType {
|
|
301
338
|
global?: {
|
|
302
339
|
active?: {
|
|
@@ -401,6 +438,7 @@ export interface ThemeType {
|
|
|
401
438
|
large?: string;
|
|
402
439
|
xlarge?: string;
|
|
403
440
|
responsiveBreakpoint?: string;
|
|
441
|
+
[x: string]: string | undefined;
|
|
404
442
|
};
|
|
405
443
|
elevation?: {
|
|
406
444
|
light?: {
|
|
@@ -1220,6 +1258,7 @@ export interface ThemeType {
|
|
|
1220
1258
|
maskedInput?: ContainerExtend;
|
|
1221
1259
|
selectMultiple?: ContainerExtend;
|
|
1222
1260
|
dateInput?: ContainerExtend;
|
|
1261
|
+
timeInput?: ContainerExtend;
|
|
1223
1262
|
fileInput?: ContainerExtend;
|
|
1224
1263
|
radioButton?: ContainerExtend;
|
|
1225
1264
|
radioButtonGroup?: ContainerExtend;
|
|
@@ -2099,6 +2138,42 @@ export interface ThemeType {
|
|
|
2099
2138
|
large?: number;
|
|
2100
2139
|
};
|
|
2101
2140
|
};
|
|
2141
|
+
stepper?: {
|
|
2142
|
+
indicator?: {
|
|
2143
|
+
size?: string;
|
|
2144
|
+
border?: {
|
|
2145
|
+
width?: string;
|
|
2146
|
+
};
|
|
2147
|
+
};
|
|
2148
|
+
label?: {
|
|
2149
|
+
size?: string;
|
|
2150
|
+
substep?: {
|
|
2151
|
+
size?: string;
|
|
2152
|
+
};
|
|
2153
|
+
};
|
|
2154
|
+
connector?: {
|
|
2155
|
+
stroke?: {
|
|
2156
|
+
width?: string;
|
|
2157
|
+
};
|
|
2158
|
+
};
|
|
2159
|
+
description?: TextProps;
|
|
2160
|
+
helperText?: {
|
|
2161
|
+
size?: string;
|
|
2162
|
+
color?: ColorType;
|
|
2163
|
+
};
|
|
2164
|
+
hover?: {
|
|
2165
|
+
background?: BackgroundType;
|
|
2166
|
+
border?: ColorType;
|
|
2167
|
+
};
|
|
2168
|
+
// States: [component].[state].[element].[property]
|
|
2169
|
+
pending?: StepperStatusStateType;
|
|
2170
|
+
current?: StepperStateType;
|
|
2171
|
+
currentCompleted?: StepperStateType;
|
|
2172
|
+
completed?: StepperStatusStateType;
|
|
2173
|
+
error?: StepperStatusWithHelperTextStateType;
|
|
2174
|
+
currentError?: StepperHelperTextStateType;
|
|
2175
|
+
disabled?: StepperStatusWithHelperTextStateType;
|
|
2176
|
+
};
|
|
2102
2177
|
table?: {
|
|
2103
2178
|
caption?: {
|
|
2104
2179
|
margin?: MarginType;
|
|
@@ -2268,6 +2343,40 @@ export interface ThemeType {
|
|
|
2268
2343
|
extend?: ExtendType;
|
|
2269
2344
|
};
|
|
2270
2345
|
};
|
|
2346
|
+
timeInput?: {
|
|
2347
|
+
button?: {
|
|
2348
|
+
margin?: MarginType;
|
|
2349
|
+
};
|
|
2350
|
+
container?: {
|
|
2351
|
+
round?: RoundType;
|
|
2352
|
+
};
|
|
2353
|
+
active?: {
|
|
2354
|
+
background?: ColorType;
|
|
2355
|
+
pad?: string;
|
|
2356
|
+
indicator?: {
|
|
2357
|
+
color?: ColorType;
|
|
2358
|
+
size?: string;
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
drop?: {
|
|
2362
|
+
option?: {
|
|
2363
|
+
background?: ColorType;
|
|
2364
|
+
hover?: {
|
|
2365
|
+
background?: ColorType;
|
|
2366
|
+
};
|
|
2367
|
+
selected?: {
|
|
2368
|
+
background?: ColorType;
|
|
2369
|
+
color?: ColorType;
|
|
2370
|
+
hover?: {
|
|
2371
|
+
background?: ColorType;
|
|
2372
|
+
};
|
|
2373
|
+
};
|
|
2374
|
+
};
|
|
2375
|
+
};
|
|
2376
|
+
icon?: {
|
|
2377
|
+
clock?: React.ReactNode | Icon;
|
|
2378
|
+
};
|
|
2379
|
+
};
|
|
2271
2380
|
tip?: {
|
|
2272
2381
|
content?: BoxProps;
|
|
2273
2382
|
drop?: DropProps;
|
package/es6/themes/base.js
CHANGED
|
@@ -4,6 +4,7 @@ import { AssistListening } from 'grommet-icons/icons/AssistListening';
|
|
|
4
4
|
import { CircleInformation } from 'grommet-icons/icons/CircleInformation';
|
|
5
5
|
import { ClosedCaption } from 'grommet-icons/icons/ClosedCaption';
|
|
6
6
|
import { Expand } from 'grommet-icons/icons/Expand';
|
|
7
|
+
import { FormCheckmark } from 'grommet-icons/icons/FormCheckmark';
|
|
7
8
|
import { FormClose } from 'grommet-icons/icons/FormClose';
|
|
8
9
|
import { FormDown } from 'grommet-icons/icons/FormDown';
|
|
9
10
|
import { FormNext } from 'grommet-icons/icons/FormNext';
|
|
@@ -2480,6 +2481,174 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
2480
2481
|
large: 3
|
|
2481
2482
|
}
|
|
2482
2483
|
},
|
|
2484
|
+
stepper: {
|
|
2485
|
+
indicator: {
|
|
2486
|
+
size: 'medium',
|
|
2487
|
+
// 'small' | 'medium' | 'large'
|
|
2488
|
+
border: {
|
|
2489
|
+
width: '2px'
|
|
2490
|
+
}
|
|
2491
|
+
},
|
|
2492
|
+
label: {
|
|
2493
|
+
size: 'medium',
|
|
2494
|
+
substep: {
|
|
2495
|
+
size: 'small'
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2498
|
+
connector: {
|
|
2499
|
+
stroke: {
|
|
2500
|
+
width: '2px'
|
|
2501
|
+
}
|
|
2502
|
+
},
|
|
2503
|
+
description: {
|
|
2504
|
+
size: 'small',
|
|
2505
|
+
color: 'text-weak'
|
|
2506
|
+
},
|
|
2507
|
+
helperText: {
|
|
2508
|
+
size: 'xsmall',
|
|
2509
|
+
color: 'text-weak'
|
|
2510
|
+
},
|
|
2511
|
+
// States: [component].[state].[element].[property]
|
|
2512
|
+
pending: {
|
|
2513
|
+
indicator: {
|
|
2514
|
+
background: 'background-front',
|
|
2515
|
+
color: 'text-strong',
|
|
2516
|
+
border: 'text-xweak',
|
|
2517
|
+
substep: {
|
|
2518
|
+
iconSize: 'small'
|
|
2519
|
+
},
|
|
2520
|
+
hover: {
|
|
2521
|
+
background: 'background-front',
|
|
2522
|
+
border: 'text-strong'
|
|
2523
|
+
}
|
|
2524
|
+
},
|
|
2525
|
+
label: {
|
|
2526
|
+
color: 'text'
|
|
2527
|
+
},
|
|
2528
|
+
connector: {
|
|
2529
|
+
color: 'border'
|
|
2530
|
+
}
|
|
2531
|
+
},
|
|
2532
|
+
current: {
|
|
2533
|
+
indicator: {
|
|
2534
|
+
icon: StatusGoodSmall,
|
|
2535
|
+
iconSize: 'medium',
|
|
2536
|
+
background: 'brand',
|
|
2537
|
+
color: 'white',
|
|
2538
|
+
border: 'brand',
|
|
2539
|
+
substep: {
|
|
2540
|
+
iconSize: 'small'
|
|
2541
|
+
},
|
|
2542
|
+
hover: {
|
|
2543
|
+
color: 'white'
|
|
2544
|
+
}
|
|
2545
|
+
},
|
|
2546
|
+
label: {
|
|
2547
|
+
color: {
|
|
2548
|
+
dark: 'text-strong',
|
|
2549
|
+
light: 'brand'
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
},
|
|
2553
|
+
currentCompleted: {
|
|
2554
|
+
indicator: {
|
|
2555
|
+
icon: FormCheckmark,
|
|
2556
|
+
iconSize: 'medium',
|
|
2557
|
+
background: 'brand',
|
|
2558
|
+
color: 'white',
|
|
2559
|
+
border: 'brand',
|
|
2560
|
+
substep: {
|
|
2561
|
+
iconSize: 'small'
|
|
2562
|
+
},
|
|
2563
|
+
hover: {
|
|
2564
|
+
color: 'white'
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
label: {
|
|
2568
|
+
color: {
|
|
2569
|
+
dark: 'text-strong',
|
|
2570
|
+
light: 'brand'
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
},
|
|
2574
|
+
completed: {
|
|
2575
|
+
indicator: {
|
|
2576
|
+
icon: FormCheckmark,
|
|
2577
|
+
iconSize: 'medium',
|
|
2578
|
+
background: 'background-front',
|
|
2579
|
+
color: 'brand',
|
|
2580
|
+
border: 'brand',
|
|
2581
|
+
substep: {
|
|
2582
|
+
iconSize: 'small'
|
|
2583
|
+
},
|
|
2584
|
+
hover: {
|
|
2585
|
+
background: 'background-front'
|
|
2586
|
+
}
|
|
2587
|
+
},
|
|
2588
|
+
label: {
|
|
2589
|
+
color: 'text-weak'
|
|
2590
|
+
},
|
|
2591
|
+
connector: {
|
|
2592
|
+
color: 'brand'
|
|
2593
|
+
}
|
|
2594
|
+
},
|
|
2595
|
+
error: {
|
|
2596
|
+
indicator: {
|
|
2597
|
+
icon: StatusCriticalSmall,
|
|
2598
|
+
background: 'background-front',
|
|
2599
|
+
color: 'status-critical',
|
|
2600
|
+
border: 'status-critical',
|
|
2601
|
+
substep: {
|
|
2602
|
+
iconSize: 'small'
|
|
2603
|
+
},
|
|
2604
|
+
hover: {
|
|
2605
|
+
background: 'background-front'
|
|
2606
|
+
}
|
|
2607
|
+
},
|
|
2608
|
+
label: {
|
|
2609
|
+
color: 'text'
|
|
2610
|
+
},
|
|
2611
|
+
connector: {
|
|
2612
|
+
color: 'status-critical'
|
|
2613
|
+
},
|
|
2614
|
+
helperText: {
|
|
2615
|
+
color: 'status-critical'
|
|
2616
|
+
}
|
|
2617
|
+
},
|
|
2618
|
+
currentError: {
|
|
2619
|
+
indicator: {
|
|
2620
|
+
icon: StatusCriticalSmall,
|
|
2621
|
+
background: 'status-critical',
|
|
2622
|
+
color: 'white',
|
|
2623
|
+
border: 'status-critical',
|
|
2624
|
+
substep: {
|
|
2625
|
+
iconSize: 'small'
|
|
2626
|
+
},
|
|
2627
|
+
hover: {
|
|
2628
|
+
color: 'white'
|
|
2629
|
+
}
|
|
2630
|
+
},
|
|
2631
|
+
label: {
|
|
2632
|
+
color: 'status-critical'
|
|
2633
|
+
}
|
|
2634
|
+
},
|
|
2635
|
+
disabled: {
|
|
2636
|
+
indicator: {
|
|
2637
|
+
background: 'background-contrast',
|
|
2638
|
+
color: 'text-weak',
|
|
2639
|
+
border: 'border',
|
|
2640
|
+
substep: {
|
|
2641
|
+
iconSize: 'small'
|
|
2642
|
+
}
|
|
2643
|
+
},
|
|
2644
|
+
label: {
|
|
2645
|
+
color: 'text-weak'
|
|
2646
|
+
},
|
|
2647
|
+
connector: {
|
|
2648
|
+
color: 'border'
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2483
2652
|
table: {
|
|
2484
2653
|
caption: {
|
|
2485
2654
|
margin: {
|
|
@@ -2648,6 +2817,45 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
2648
2817
|
// copy: undefined,
|
|
2649
2818
|
// },
|
|
2650
2819
|
},
|
|
2820
|
+
timeInput: {
|
|
2821
|
+
button: {
|
|
2822
|
+
margin: {
|
|
2823
|
+
right: 'small'
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
container: {
|
|
2827
|
+
round: 'xxsmall'
|
|
2828
|
+
},
|
|
2829
|
+
active: {
|
|
2830
|
+
background: 'active-background',
|
|
2831
|
+
pad: 'xxsmall',
|
|
2832
|
+
indicator: {
|
|
2833
|
+
color: {
|
|
2834
|
+
dark: 'white',
|
|
2835
|
+
light: 'black'
|
|
2836
|
+
},
|
|
2837
|
+
size: 'small'
|
|
2838
|
+
}
|
|
2839
|
+
},
|
|
2840
|
+
drop: {
|
|
2841
|
+
option: {
|
|
2842
|
+
// background: undefined,
|
|
2843
|
+
hover: {
|
|
2844
|
+
background: 'active-background'
|
|
2845
|
+
},
|
|
2846
|
+
selected: {
|
|
2847
|
+
background: 'selected',
|
|
2848
|
+
color: 'white',
|
|
2849
|
+
hover: {
|
|
2850
|
+
// background: undefined,
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
}
|
|
2854
|
+
},
|
|
2855
|
+
icon: {
|
|
2856
|
+
// clock: undefined,
|
|
2857
|
+
}
|
|
2858
|
+
},
|
|
2651
2859
|
tip: {
|
|
2652
2860
|
content: {
|
|
2653
2861
|
// any Box props
|
package/es6/utils/index.d.ts
CHANGED
package/es6/utils/styles.js
CHANGED
|
@@ -30,9 +30,11 @@ export var controlBorderStyle = css(["border:", " solid ", ";border-radius:", ";
|
|
|
30
30
|
return props.theme.global.control.border.radius;
|
|
31
31
|
});
|
|
32
32
|
export var edgeStyle = function edgeStyle(kind, data, responsive, responsiveBreakpoint, theme) {
|
|
33
|
-
var breakpoint =
|
|
33
|
+
var breakpoint = getBreakpointStyle(theme, responsiveBreakpoint);
|
|
34
34
|
if (typeof data === 'string') {
|
|
35
|
-
|
|
35
|
+
var value = theme.global.edgeSize[data] || data;
|
|
36
|
+
var responsiveValue = responsive && breakpoint && breakpoint.edgeSize[data];
|
|
37
|
+
return css(["", ":", ";", ";"], kind, value, responsiveValue ? breakpointStyle(breakpoint, "\n " + kind + ": " + responsiveValue + ";\n ", responsive) : '');
|
|
36
38
|
}
|
|
37
39
|
var result = [];
|
|
38
40
|
var horizontal = data.horizontal,
|
|
@@ -50,32 +52,41 @@ export var edgeStyle = function edgeStyle(kind, data, responsive, responsiveBrea
|
|
|
50
52
|
if (horizontalVerticalEqual || allSidesEqual) {
|
|
51
53
|
// since the values will be the same between vertical & horizontal OR
|
|
52
54
|
// left, right, top, & bottom, we can just choose one
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
+
var allSidesValue = horizontalVerticalEqual ? horizontal : top;
|
|
56
|
+
var allSidesResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[allSidesValue];
|
|
57
|
+
return css(["", ":", ";", ";"], kind, theme.global.edgeSize[allSidesValue] || allSidesValue, allSidesResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + ": " + allSidesResponsiveValue + ";\n ", responsive) : '');
|
|
55
58
|
}
|
|
56
59
|
if (horizontal) {
|
|
57
|
-
|
|
60
|
+
var horizontalResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[horizontal];
|
|
61
|
+
result.push(css(["", "-left:", ";", "-right:", ";", ";"], kind, theme.global.edgeSize[horizontal] || horizontal, kind, theme.global.edgeSize[horizontal] || horizontal, horizontalResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + "-left: " + horizontalResponsiveValue + ";\n " + kind + "-right: " + horizontalResponsiveValue + ";\n ", responsive) : ''));
|
|
58
62
|
}
|
|
59
63
|
if (vertical) {
|
|
60
|
-
|
|
64
|
+
var verticalResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[vertical];
|
|
65
|
+
result.push(css(["", "-top:", ";", "-bottom:", ";", ";"], kind, theme.global.edgeSize[vertical] || vertical, kind, theme.global.edgeSize[vertical] || vertical, verticalResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + "-top: " + verticalResponsiveValue + ";\n " + kind + "-bottom: " + verticalResponsiveValue + ";\n ", responsive) : ''));
|
|
61
66
|
}
|
|
62
67
|
if (top) {
|
|
63
|
-
|
|
68
|
+
var topResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[top];
|
|
69
|
+
result.push(css(["", "-top:", ";", ";"], kind, theme.global.edgeSize[top] || top, topResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + "-top: " + topResponsiveValue + ";\n ", responsive) : ''));
|
|
64
70
|
}
|
|
65
71
|
if (bottom) {
|
|
66
|
-
|
|
72
|
+
var bottomResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[bottom];
|
|
73
|
+
result.push(css(["", "-bottom:", ";", ";"], kind, theme.global.edgeSize[bottom] || bottom, bottomResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + "-bottom: " + bottomResponsiveValue + ";\n ", responsive) : ''));
|
|
67
74
|
}
|
|
68
75
|
if (left) {
|
|
69
|
-
|
|
76
|
+
var leftResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[left];
|
|
77
|
+
result.push(css(["", "-left:", ";", ";"], kind, theme.global.edgeSize[left] || left, leftResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + "-left: " + leftResponsiveValue + ";\n ", responsive) : ''));
|
|
70
78
|
}
|
|
71
79
|
if (right) {
|
|
72
|
-
|
|
80
|
+
var rightResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[right];
|
|
81
|
+
result.push(css(["", "-right:", ";", ";"], kind, theme.global.edgeSize[right] || right, rightResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + "-right: " + rightResponsiveValue + ";\n ", responsive) : ''));
|
|
73
82
|
}
|
|
74
83
|
if (data.start) {
|
|
75
|
-
|
|
84
|
+
var startResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[data.start];
|
|
85
|
+
result.push(css(["", "-inline-start:", ";", ";"], kind, theme.global.edgeSize[data.start] || data.start, startResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + "-inline-start: " + startResponsiveValue + ";\n ", responsive) : ''));
|
|
76
86
|
}
|
|
77
87
|
if (data.end) {
|
|
78
|
-
|
|
88
|
+
var endResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[data.end];
|
|
89
|
+
result.push(css(["", "-inline-end:", ";", ";"], kind, theme.global.edgeSize[data.end] || data.end, endResponsiveValue ? breakpointStyle(breakpoint, "\n " + kind + "-inline-end: " + endResponsiveValue + ";\n ", responsive) : ''));
|
|
79
90
|
}
|
|
80
91
|
return result;
|
|
81
92
|
};
|