@okshaun/components 2.0.2 → 4.0.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/dist/icon-metadata.json +385 -41
- package/dist/index.js +13414 -5259
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +1245 -263
- package/dist/{preset-DAmO4B54.js → preset-BOFHjPdQ.js} +2265 -1727
- package/dist/preset-BOFHjPdQ.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/conditions.json +75 -51
- package/dist/specs/keyframes.json +33 -0
- package/dist/specs/recipes.json +359 -103
- package/dist/specs/semantic-tokens.json +152 -44
- package/dist/specs/tokens.json +21 -36
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +499 -43
- package/dist/styles.css +18229 -7568
- package/dist/svgs/barcode-off.svg +1 -0
- package/dist/svgs/cheese.svg +1 -0
- package/dist/svgs/collapse-vertical.svg +1 -0
- package/dist/svgs/expand-vertical.svg +1 -0
- package/dist/svgs/magnet.svg +1 -0
- package/dist/svgs/spinner.svg +1 -0
- package/dist/svgs/to-date-backward.svg +1 -0
- package/dist/svgs/to-date-forward.svg +1 -0
- package/dist/types/index.d.ts +2804 -296
- package/package.json +4 -2
- package/src/recipes/autocomplete.ts +266 -0
- package/src/recipes/avatar.ts +1 -1
- package/src/recipes/badge.ts +31 -43
- package/src/recipes/breakpointIndicator.ts +11 -0
- package/src/recipes/button.ts +172 -223
- package/src/recipes/calendar.ts +91 -0
- package/src/recipes/card.ts +4 -70
- package/src/recipes/chip.ts +213 -142
- package/src/recipes/dateMenus.ts +40 -0
- package/src/recipes/dateTimeMenus.ts +43 -0
- package/src/recipes/icon.ts +25 -6
- package/src/recipes/kbd.ts +56 -0
- package/src/recipes/list.ts +17 -1
- package/src/recipes/listDensity.ts +66 -0
- package/src/recipes/listItem.ts +29 -161
- package/src/recipes/listItemGroup.ts +17 -39
- package/src/recipes/menu.ts +17 -3
- package/src/recipes/modal.ts +70 -39
- package/src/recipes/radio.ts +6 -6
- package/src/recipes/recipes-regular.ts +2 -0
- package/src/recipes/recipes-slot.ts +8 -2
- package/src/recipes/segmentedFields.ts +192 -0
- package/src/recipes/segmentedInputs.ts +109 -0
- package/src/recipes/select.ts +8 -1
- package/src/recipes/skeleton.ts +72 -0
- package/src/recipes/spinner.ts +27 -24
- package/src/recipes/tag.ts +218 -210
- package/src/recipes/text.ts +37 -19
- package/src/recipes/textInput.ts +106 -117
- package/src/recipes/themeSwitcher.ts +3 -3
- package/src/recipes/timeMenus.ts +110 -0
- package/src/recipes/toggle.ts +3 -1
- package/src/styles/primitives/animations.ts +3 -0
- package/src/styles/primitives/shadows.ts +26 -60
- package/src/styles/primitives/zIndex.ts +1 -0
- package/src/styles/semantics/colors.ts +43 -0
- package/src/styles/semantics/shadows.ts +4 -30
- package/src/styles/semantics/zIndex.ts +2 -0
- package/src/styles/utilities/conditions.ts +61 -51
- package/src/styles/utilities/dropShadows.ts +51 -0
- package/src/styles/utilities/filters.ts +22 -7
- package/src/styles/utilities/globalStyle.ts +5 -2
- package/src/styles/utilities/index.ts +3 -0
- package/src/styles/utilities/keyframes.ts +31 -4
- package/src/styles/utilities/recipeGlobalStyles.ts +22 -0
- package/src/styles/utilities/shadowDefinitions.ts +112 -0
- package/src/utils/dsChain.ts +113 -0
- package/src/utils/dsComponent.ts +44 -0
- package/src/utils/dsPart.ts +41 -0
- package/src/utils/mergeAriaDescribedBy.ts +7 -0
- package/dist/preset-DAmO4B54.js.map +0 -1
- package/src/recipes/datePicker.ts +0 -212
- package/src/recipes/timePicker.ts +0 -199
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attribute name that names an interactive part inside a design-system
|
|
3
|
+
* component. Always lowercase and hyphenated; HTML lowercases attribute names,
|
|
4
|
+
* so a camelCase spelling would silently produce a different attribute.
|
|
5
|
+
*/
|
|
6
|
+
export const DS_PART_ATTRIBUTE = 'data-ds-part';
|
|
7
|
+
|
|
8
|
+
/** Attribute record applied to a named part of a design-system component. */
|
|
9
|
+
export type DsPartAttribute = {
|
|
10
|
+
'data-ds-part': string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Returns the `data-ds-part` attribute for a named part of a component.
|
|
15
|
+
*
|
|
16
|
+
* Internal instrumentation with the same status as `data-ds-component`: emitted
|
|
17
|
+
* automatically, not a supported public API, and not part of any prop type.
|
|
18
|
+
* **It is not a test handle** — tests query by role, or by the `data-testid` a
|
|
19
|
+
* consumer supplied. Do not document it, type it, or reference it from a test
|
|
20
|
+
* outside this repository.
|
|
21
|
+
*
|
|
22
|
+
* It exists for the collector, which needs to tell apart the interactive parts
|
|
23
|
+
* of one component: a click on a `Select`'s trigger is a different event from a
|
|
24
|
+
* click on a chip's remove control inside it, and both report the same
|
|
25
|
+
* `data-ds-component` and the same chain. The part name is what separates them,
|
|
26
|
+
* and it is the DS's to assign because only the DS knows its own anatomy.
|
|
27
|
+
*
|
|
28
|
+
* Spread the result before the component's rest props so a consumer-supplied
|
|
29
|
+
* value in rest props still wins, matching `dsComponent`.
|
|
30
|
+
*
|
|
31
|
+
* The chain mechanism reads `data-testid` only (see `Box` and
|
|
32
|
+
* `~/utils/dsChain`), so this attribute never contributes a chain node.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <Box role="combobox" {...dsPart('trigger')} {...triggerProps} />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export const dsPart = (part: string): DsPartAttribute => ({
|
|
40
|
+
[DS_PART_ATTRIBUTE]: part,
|
|
41
|
+
});
|